/* Vein Lattice — Biomechanics · Organic Lattice Wind style
   Fully readable, uncompressed CSS. */

@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-0: #06080a;
  --bg-1: #0b0f12;
  --bg-2: #111619;
  --bg-3: #171d21;
  --line: #1e2a26;
  --line-2: #2a3a33;
  --vein: #3f5a4e;
  --sinew: #7ea38c;
  --pulse: #b7f0c6;
  --acid: #9dff9a;
  --blood: #b83a3a;
  --bone: #d8e3d3;
  --muted: #6f7d75;
  --text: #cad6cc;
  --danger: #ff6b6b;
  --gold: #d8b878;
}

html, body { background: var(--bg-0); color: var(--text); font-family: 'Segoe UI', 'Inter', system-ui, sans-serif; min-height: 100vh; line-height: 1.5; }

a { color: var(--sinew); text-decoration: none; }
a:hover { color: var(--pulse); }

/* Organic lattice backdrop */
body {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(126,163,140,0.08), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(157,255,154,0.05), transparent 40%),
    linear-gradient(180deg, #06080a 0%, #0a0e11 100%);
  background-attachment: fixed;
}

.lattice-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.35;
  background-image:
    linear-gradient(45deg, rgba(63,90,78,0.15) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(63,90,78,0.15) 1px, transparent 1px);
  background-size: 42px 42px;
}

.container { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(6,8,10,0.95), rgba(11,15,18,0.85));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%; position: relative; flex-shrink: 0;
  background: radial-gradient(circle at center, rgba(157,255,154,0.15) 0%, transparent 70%), var(--bg-0);
  border: 1px solid rgba(157,255,154,0.3);
  box-shadow: 0 0 18px rgba(157,255,154,0.2), inset 0 0 8px rgba(0,0,0,0.6);
}
.brand-mark::before {
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' text='%239dff9a'%3E%3Cpath d='M20,50 Q35,20 50,50 T80,50' fill='none' stroke='%239dff9a' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M30,30 Q50,60 70,30' fill='none' stroke='%239dff9a' stroke-width='1.5' stroke-dasharray='2 4'/%3E%3Cpath d='M50,10 L50,90' fill='none' stroke='%239dff9a' stroke-width='1' opacity='0.5'/%3E%3Ccircle cx='50' cy='50' r='3' fill='%239dff9a'/%3E%3Ccircle cx='35' cy='40' r='1.5' fill='%239dff9a'/%3E%3Ccircle cx='65' cy='40' r='1.5' fill='%239dff9a'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  opacity: 0.9;
}
.brand-name { font-family: 'Michroma', 'Segoe UI', 'Inter', system-ui, sans-serif; font-size: 20px; font-weight: 700; letter-spacing: 0.14em; color: var(--bone); text-transform: uppercase; }
.brand-name span { color: var(--acid); text-shadow: 0 0 8px rgba(157,255,154,0.35); }

.primary-nav { display: flex; gap: 28px; }
.primary-nav a { color: var(--bone); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid transparent; }
.primary-nav a:hover, .primary-nav a.active { border-bottom-color: var(--acid); color: var(--acid); }

.header-actions { display: flex; align-items: center; gap: 18px; }

/* User dropdown */
.user-menu { position: relative; }
.user-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-2); color: var(--bone);
  border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 999px;
  cursor: pointer; font-size: 13px; letter-spacing: 0.06em;
}
.user-btn:hover { border-color: var(--sinew); color: var(--acid); }
.user-btn .avatar { width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #b7f0c6, #3f5a4e); }
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 220px; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 8px; box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--bone);
  border-radius: 8px; font-size: 14px;
}
.user-dropdown a:hover { background: var(--bg-3); color: var(--acid); }
.user-dropdown .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.user-dropdown .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sinew); }

/* ===== Hero ===== */
.hero {
  position: relative; padding: 80px 0 60px; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 {
  font-size: 56px; line-height: 1.05; color: var(--bone); letter-spacing: -0.01em;
  text-transform: uppercase; font-weight: 800;
}
.hero h1 em { font-style: normal; color: var(--acid); }
.hero p { margin-top: 20px; color: var(--muted); font-size: 17px; max-width: 560px; }
.hero-cta { margin-top: 32px; display: flex; gap: 14px; }

/* ===== Hero visual (neural fibrous network) ===== */
.hero-visual {
  position: relative;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
}
.hv-atmosphere {
  position: absolute;
  width: 64%; height: 64%;
  border-radius: 50%;
  background: rgba(157,255,154,0.10);
  filter: blur(60px);
  animation: hvPulse 4s ease-in-out infinite;
}
.hv-atmosphere::after {
  content: "";
  position: absolute;
  width: 50%; height: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(157,255,154,0.15);
  filter: blur(30px);
}

.hv-core {
  position: relative;
  z-index: 10;
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(157,255,154,0.35);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(157,255,154,0.18);
}
.hv-core-ring {
  position: absolute;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(157,255,154,0.55);
  animation: hvSpin 10s linear infinite;
}
.hv-core-dot {
  position: absolute;
  top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
}
.hv-core-fill {
  position: absolute;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 24px var(--acid);
  animation: hvPulse 2.5s ease-in-out infinite;
}

.hv-lattice {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  z-index: 1;
}
.hv-vein {
  stroke: var(--acid);
  stroke-width: 0.5;
  stroke-dasharray: 4 4;
  fill: none;
}
.hv-vein-thick {
  stroke: var(--acid);
  stroke-width: 1.5;
  stroke-linecap: round;
  fill: none;
  opacity: 0.8;
}
.hv-web {
  fill: none;
  stroke: var(--acid);
  stroke-width: 0.5;
  opacity: 0.18;
}

.hv-node {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px var(--acid);
  z-index: 5;
  animation: hvPulse 2s ease-in-out infinite;
}
.hv-node.sm { width: 4.5px; height: 4.5px; }

.hv-particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--acid);
  opacity: 0.25;
  z-index: 5;
  animation: hvPing 3s ease-out infinite;
}
.hv-particle.delay { animation-delay: 1s; }

.hv-frame {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(157,255,154,0.05);
  border-radius: 20px;
  pointer-events: none;
}
.hv-corner {
  position: absolute;
  width: 28px; height: 28px;
  pointer-events: none;
}
.hv-corner.tl { top: 0; left: 0; border-top: 1px solid rgba(157,255,154,0.30); border-left: 1px solid rgba(157,255,154,0.30); }
.hv-corner.br { bottom: 0; right: 0; border-bottom: 1px solid rgba(157,255,154,0.30); border-right: 1px solid rgba(157,255,154,0.30); }

@keyframes hvSpin { to { transform: rotate(360deg); } }
@keyframes hvPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes hvPing { 0% { transform: scale(0.8); opacity: 0.6; } 70% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(2.2); opacity: 0; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-size: 14px; letter-spacing: 0.08em;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--bone);
  text-transform: uppercase; cursor: pointer; transition: all .18s ease;
}
.btn:hover { border-color: var(--acid); color: var(--acid); }
.btn-primary {
  background: linear-gradient(180deg, #9dff9a, #4fbf60);
  color: #06110a; border-color: transparent; font-weight: 700;
  box-shadow: 0 6px 24px rgba(157,255,154,0.25);
}
.btn-primary:hover { color: #06110a; filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-danger { background: #2a1414; border-color: #4a2020; color: #ff8b8b; }
.btn-block { width: 100%; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-title h2 { font-size: 28px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--bone); }
.section-title a { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ===== Game grid ===== */

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.game-card {
  position: relative; border-radius: 14px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line-2);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--acid); box-shadow: 0 12px 40px rgba(157,255,154,0.15); }
.game-thumb {
  aspect-ratio: 4/5; position: relative;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line);
}
.game-thumb .glyph {
  width: 78px; height: 78px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b7f0c6, #3f5a4e 60%, #0b0f12 100%);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.6), 0 0 22px rgba(157,255,154,0.25);
  position: relative;
}
.game-thumb .glyph::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px dashed rgba(157,255,154,0.25);
}
.game-body { padding: 12px 14px 14px; }
.game-title { font-size: 14px; color: var(--bone); font-weight: 600; letter-spacing: 0.02em; }
.game-meta { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 12px; }
.game-meta .rating { color: var(--gold); }

/* ===== Lattice banner ===== */
.lattice-banner {
  border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(157,255,154,0.08);
}
.lattice-banner img {
  display: block; width: 100%; height: auto;
}

/* ===== Recharge ladder ===== */
.ladder-card {
  border: 1px solid var(--line-2); background: var(--bg-2); border-radius: 18px; padding: 32px;
}
.ladder-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.ladder-table th, .ladder-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.ladder-table th { text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; color: var(--muted); font-weight: 600; }
.ladder-table tr:last-child td { border-bottom: none; color: var(--acid); font-weight: 600; }


/* ===== Forms ===== */
.auth-wrap { min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.auth-card {
  width: 100%; max-width: 460px; padding: 40px; border-radius: 20px;
  background: var(--bg-1); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.auth-card h1 { font-size: 26px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--bone); margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.form-row input, .form-row select, .form-row textarea {
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--bone); padding: 12px 14px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .15s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--acid); }
.form-footnote { color: var(--muted); font-size: 13px; margin-top: 12px; text-align: center; }

/* ===== Panels ===== */
.panel { border: 1px solid var(--line-2); background: var(--bg-1); border-radius: 18px; padding: 28px; }
.panel h2 { font-size: 20px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--bone); margin-bottom: 18px; }

/* ===== Layout with sidebar (user center) ===== */
.uc-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 40px 0 80px; }
.uc-side { border: 1px solid var(--line-2); background: var(--bg-1); border-radius: 16px; padding: 20px; height: fit-content; }
.uc-side .who { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.uc-side .who .avatar { width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #b7f0c6, #3f5a4e); }
.uc-side .who .name { color: var(--bone); font-weight: 600; }
.uc-side .who .role { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.uc-side nav { display: flex; flex-direction: column; margin-top: 14px; }
.uc-side nav a {
  padding: 12px 14px; color: var(--bone); border-radius: 10px; font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.uc-side nav a:hover, .uc-side nav a.active { background: var(--bg-3); color: var(--acid); }
.uc-side nav a .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sinew); }

/* ===== Tables ===== */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; }
.table tr:hover td { background: rgba(157,255,154,0.03); }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.badge.success { background: rgba(157,255,154,0.12); color: var(--acid); border: 1px solid rgba(157,255,154,0.3); }
.badge.fail { background: rgba(255,107,107,0.1); color: var(--danger); border: 1px solid rgba(255,107,107,0.3); }
.badge.pending { background: rgba(216,184,120,0.1); color: var(--gold); border: 1px solid rgba(216,184,120,0.3); }

/* ===== Recharge page ===== */
.recharge-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding: 40px 0 80px; }
.recharge-preview { margin: 6px 0 18px; padding: 14px 16px; border: 1px solid rgba(160,255,120,0.18); border-radius: 12px; background: linear-gradient(180deg, rgba(20,32,22,0.6), rgba(10,18,12,0.6)); box-shadow: inset 0 0 24px rgba(160,255,120,0.06); }
.recharge-preview .rp-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; color: #b7c7bd; letter-spacing: 0.04em; }
.recharge-preview .rp-row strong { color: #d8ffcf; font-weight: 700; }
.recharge-preview .rp-row.total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed rgba(160,255,120,0.25); font-size: 15px; }
.recharge-preview .rp-row.total span { color: #eafff0; text-transform: uppercase; letter-spacing: 0.12em; }
.recharge-preview .rp-row.total strong { color: #a8ff6b; font-size: 18px; text-shadow: 0 0 12px rgba(160,255,120,0.5); }

/* ===== Legal pages ===== */
.legal { padding: 60px 0 100px; }
.legal .doc { max-width: 820px; margin: 0 auto; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 18px; padding: 48px; }
.legal h1 { font-size: 34px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone); margin-bottom: 8px; }
.legal .kicker { color: var(--acid); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 24px; }
.legal h2 { font-size: 20px; color: var(--acid); margin: 32px 0 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.legal h3 { font-size: 16px; color: var(--bone); margin: 20px 0 10px; }
.legal p { margin-bottom: 12px; color: var(--text); }
.legal ul { margin: 0 0 16px 22px; }
.legal li { margin-bottom: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; }
.legal th, .legal td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.legal th { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line); background: #05070a; padding: 46px 0 30px; margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--acid); margin-bottom: 14px; }
.footer-grid a { display: block; color: var(--muted); font-size: 13px; padding: 5px 0; }
.footer-grid a:hover { color: var(--acid); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; }
.alert.ok { background: rgba(157,255,154,0.08); border: 1px solid rgba(157,255,154,0.3); color: var(--acid); }
.alert.err { background: rgba(255,107,107,0.08); border: 1px solid rgba(255,107,107,0.3); color: var(--danger); }

/* Responsive */
@media (max-width: 960px) {
  .primary-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .hero-visual { max-width: 320px; margin: 0 auto; }
  .uc-wrap { grid-template-columns: 1fr; }
  .recharge-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row.two { grid-template-columns: 1fr; }
}
