
/* ============================================================
   TOKENS
============================================================ */
:root {
  --c1: #00e5b0;
  --c2: #7c5cfc;
  --c3: #ff4e6a;
  --bg0: #07090f;
  --bg1: #0d1018;
  --bg2: #131722;
  --bg3: #1b2133;
  --card: #111520;
  --card2: #192031;
  --bdr: rgba(255,255,255,0.06);
  --bdr2: rgba(255,255,255,0.11);
  --tx: #e8ecf8;
  --tx2: #7a85a3;
  --tx3: #404866;
  --ff: 'Plus Jakarta Sans', sans-serif;
  --ffs: 'Playfair Display', serif;
  --navH: 58px;
  --tabH: 62px;
  --r: 14px;
  --rL: 20px;
  --shadow: 0 12px 40px rgba(0,0,0,0.55);
  --shadowCard: 0 4px 24px rgba(0,0,0,0.4);
  --glow: 0 0 32px rgba(0,229,176,0.18);
  --glass: rgba(13,16,24,0.9);
}
[data-theme="light"] {
  --bg0: #eef0f9;
  --bg1: #e6e9f5;
  --bg2: #dde1f0;
  --bg3: #d3d8ec;
  --card: #ffffff;
  --card2: #f4f6ff;
  --bdr: rgba(0,0,0,0.06);
  --bdr2: rgba(0,0,0,0.11);
  --tx: #0f1221;
  --tx2: #4a5370;
  --tx3: #8890b0;
  --shadow: 0 12px 40px rgba(0,0,0,0.12);
  --shadowCard: 0 4px 24px rgba(0,0,0,0.08);
  --glow: 0 0 32px rgba(0,200,150,0.14);
  --glass: rgba(238,240,249,0.92);
}

/* ============================================================
   RESET
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff);
  background: var(--bg0);
  color: var(--tx);
  min-height: 100vh;
  overflow-x: hidden;
  /* Mobile: content offset below top nav + above bottom tabs */
  padding-top: var(--navH);
  padding-bottom: var(--tabH);
  transition: background 0.3s ease, color 0.3s ease;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--ff); color: inherit; }
input, textarea { font-family: var(--ff); border: none; outline: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
* { -webkit-tap-highlight-color: transparent; }

/* ============================================================
   KEYFRAMES
============================================================ */
@keyframes fadeUp   { from { opacity:0; transform:translateY(22px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeIn   { from { opacity:0 } to { opacity:1 } }
@keyframes popIn    { from { opacity:0; transform:scale(0.9) } to { opacity:1; transform:scale(1) } }
@keyframes slideDown{ from { opacity:0; transform:translateY(-8px) } to { opacity:1; transform:translateY(0) } }
@keyframes slideUp  { from { opacity:0; transform:translateY(8px) } to { opacity:1; transform:translateY(0) } }
@keyframes gradMove { 0%,100% { background-position:0% 50% } 50% { background-position:100% 50% } }
@keyframes float    { 0%,100% { transform:translateY(0) } 50% { transform:translateY(-14px) } }
@keyframes orbSpin  { to { transform:rotate(360deg) } }
@keyframes pulseDot { 0%,100% { box-shadow:0 0 0 0 rgba(0,229,176,0.5) } 60% { box-shadow:0 0 0 8px rgba(0,229,176,0) } }
@keyframes heartBeat{ 0%{transform:scale(1)} 30%{transform:scale(1.5)} 60%{transform:scale(0.9)} 100%{transform:scale(1)} }
@keyframes shimmerBar{0%{background-position:-200% 0}100%{background-position:200% 0}}

/* ============================================================
   AMBIENT BACKGROUND
============================================================ */
.orbs { position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.orb {
  position:absolute; border-radius:50%; filter:blur(80px);
  animation: float 12s ease-in-out infinite;
  opacity: 0.1;
}
[data-theme="light"] .orb { opacity: 0.05; }
.orb1 { width: min(500px, 70vw); height: min(500px, 70vw); background:var(--c1); top:-15%; left:-15%; animation-delay:0s; }
.orb2 { width: min(420px, 60vw); height: min(420px, 60vw); background:var(--c2); bottom:-12%; right:-12%; animation-delay:5s; }
.orb3 { width: min(280px, 40vw); height: min(280px, 40vw); background:var(--c3); top:35%; left:55%; animation-delay:9s; opacity:0.06; }

/* ============================================================
   TOP NAVBAR
============================================================ */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--navH);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bdr);
}

.nav-logo {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  background: linear-gradient(130deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Spacer pushes links/burger to right */
.nav-spacer { flex: 1; }

/* Desktop nav links — hidden on mobile, shown on md+ */
.nav-links {
  display: none; /* hidden by default (mobile) */
  align-items: center;
  gap: 2px;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--tx2);
  padding: 7px 12px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--c1);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--tx); }
.nav-links a.act { color: var(--c1); }
.nav-links a.act::after,
.nav-links a:hover::after { width: calc(100% - 24px); }

/* Hamburger button — always visible */
.burger {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--bdr);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.burger:hover { background: var(--card2); }
.burger .bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--tx);
  border-radius: 2px;
  transition: all 0.28s ease;
}
.burger.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   DROPDOWN SIDE MENU
============================================================ */
.dropmenu {
  position: fixed;
  top: var(--navH);
  right: 0;
  z-index: 999;
  width: min(270px, calc(100vw - 20px));
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--bdr2);
  border-top: none;
  border-bottom-left-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
  animation: slideDown 0.2s ease;
  transform-origin: top right;
}
.dropmenu.hidden { display: none; }

.dm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 11px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--tx2);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.dm-item:hover { background: var(--card2); color: var(--tx); border-color: var(--bdr); }
.dm-item svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; }

.dm-divider { height: 1px; background: var(--bdr); margin: 2px 0; }

/* toggle */
.dm-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.pill-sw {
  width: 40px; height: 22px; border-radius: 11px;
  background: var(--bg2); border: 1px solid var(--bdr);
  position: relative; cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}
.pill-sw.on { background: var(--c1); }
.pill-sw::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  transition: transform 0.28s ease;
}
.pill-sw.on::after { transform: translateX(18px); }

/* auth buttons in dropdown */
.dm-btn-line {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border-radius: 11px;
  font-size: 0.84rem; font-weight: 600;
  border: 1.5px solid var(--bdr);
  color: var(--tx2);
  transition: all 0.2s;
  cursor: pointer;
}
.dm-btn-line svg { width:15px; height:15px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; }
.dm-btn-line:hover { border-color: var(--c1); color: var(--c1); background: rgba(0,229,176,0.06); }

.dm-btn-fill {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border-radius: 11px;
  font-size: 0.84rem; font-weight: 700;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #07090f;
  transition: all 0.2s;
  cursor: pointer;
}
.dm-btn-fill svg { width:15px; height:15px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2.5; stroke: #07090f; }
.dm-btn-fill:hover { filter: brightness(1.1); box-shadow: var(--glow); }

.dm-btn-red {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border-radius: 11px;
  font-size: 0.84rem; font-weight: 600;
  border: 1.5px solid rgba(255,78,106,0.35);
  color: var(--c3);
  transition: all 0.2s;
  cursor: pointer;
}
.dm-btn-red svg { width:15px; height:15px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; }
.dm-btn-red:hover { background: rgba(255,78,106,0.1); }

.user-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,229,176,0.07);
  border: 1px solid rgba(0,229,176,0.2);
  border-radius: 12px; padding: 10px 12px;
  margin-bottom: 2px;
}
.user-av {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #07090f; font-size: 0.9rem;
}
.user-info { min-width: 0; }
.user-name { font-weight: 700; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.69rem; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   BOTTOM TAB BAR  (mobile only — hidden on ≥ 768px)
============================================================ */
.bottomtabs {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--tabH);
  display: flex;
  align-items: stretch;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--bdr);
  /* Safe area for iPhone notch */
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabitem {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--tx3);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 8px 4px;
  position: relative;
  min-width: 0;
  border: none;
  background: none;
  font-family: var(--ff);
}
.tabitem svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none; stroke-width: 1.8;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.tabitem span { white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 100%; }
.tabitem.act { color: var(--c1); }
.tabitem.act svg { transform: scale(1.15); }
.tabitem::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--c1);
  border-radius: 0 0 3px 3px;
  transition: width 0.2s ease;
}
.tabitem.act::before { width: 28px; }

/* ============================================================
   MAIN CONTENT AREA
============================================================ */
main { position: relative; z-index: 1; }

/* Pages */
.pg { display: none; animation: fadeUp 0.35s ease both; }
.pg.act { display: block; }

/* Wrapper */
.W {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 36px;
}

/* ============================================================
   SECTION HEADING
============================================================ */
.sec-lbl {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--c1);
  margin-bottom: 8px;
}
.sec-h {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
}
.sec-p {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: var(--tx2);
  line-height: 1.7;
  margin-top: 10px;
  max-width: 520px;
}
.sec-head { margin-bottom: 28px; }

/* Gradient text */
.gtx {
  background: linear-gradient(120deg, var(--c1) 0%, var(--c2) 55%, var(--c3) 100%);
  background-size: 200% 200%;
  animation: gradMove 5s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   HOME PAGE — HERO
============================================================ */
.hero {
  min-height: calc(100svh - var(--navH) - var(--tabH));
  display: flex;
  align-items: center;
  padding: 28px 16px;
}

.hero-wrap {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,229,176,0.09);
  border: 1px solid rgba(0,229,176,0.25);
  border-radius: 30px;
  padding: 5px 13px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--c1);
  margin-bottom: 18px;
  animation: fadeUp 0.4s ease both;
}
.bdot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c1);
  flex-shrink: 0;
  animation: pulseDot 2.2s infinite;
}

.hero-title {
  font-size: clamp(2rem, 8vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  animation: fadeUp 0.4s 0.1s ease both;
}

.hero-desc {
  font-size: clamp(0.88rem, 2.5vw, 1rem);
  color: var(--tx2);
  line-height: 1.72;
  margin: 16px 0 26px;
  max-width: 500px;
  animation: fadeUp 0.4s 0.2s ease both;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeUp 0.4s 0.3s ease both;
}
.hbtn-p {
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #07090f;
  box-shadow: 0 4px 20px rgba(0,229,176,0.3);
  transition: transform 0.22s, box-shadow 0.22s;
  white-space: nowrap;
}
.hbtn-p:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,229,176,0.45); }
.hbtn-s {
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1.5px solid var(--bdr2);
  color: var(--tx2);
  transition: all 0.22s;
  white-space: nowrap;
}
.hbtn-s:hover { border-color: var(--c2); color: var(--c2); }

/* hero stats */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
  animation: fadeUp 0.4s 0.4s ease both;
}
.st-val {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.st-lbl { font-size: 0.71rem; color: var(--tx3); margin-top: 2px; }

/* Desktop hero split */
.hero-grid { display: block; }

.hero-visual {
  display: none; /* hidden mobile */
}

/* Mini cards in hero visual */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  transform: perspective(900px) rotateY(-7deg) rotateX(4deg);
  transition: transform 0.5s ease;
}
.mini-grid:hover { transform: perspective(900px) rotateY(0) rotateX(0); }
.mc {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: 16px;
  padding: 18px;
  transition: transform 0.28s;
}
.mc:hover { transform: translateY(-4px); }
.mc.g1 { border-color: rgba(0,229,176,0.25); background: rgba(0,229,176,0.04); }
.mc.g2 { border-color: rgba(124,92,252,0.25); background: rgba(124,92,252,0.04); }
.mc-ic { font-size: 1.9rem; margin-bottom: 9px; }
.mc-tt { font-weight: 700; font-size: 0.86rem; margin-bottom: 3px; }
.mc-st { font-size: 0.7rem; color: var(--tx3); }

/* ============================================================
   GAMES PAGE
============================================================ */

/* Horizontal scroll chips */
.hscroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin-bottom: 6px;
}
.hscroll::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: 30px;
  padding: 7px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--c2); color: var(--c2); }
.chip-rank { color: var(--c1); font-weight: 800; }

/* Filter buttons */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0;
}
.fb {
  padding: 7px 15px;
  border-radius: 30px;
  font-size: 0.77rem;
  font-weight: 600;
  border: 1.5px solid var(--bdr);
  color: var(--tx2);
  white-space: nowrap;
  transition: all 0.2s;
  cursor: pointer;
}
.fb.act, .fb:hover { background: var(--c1); color: #07090f; border-color: var(--c1); }

/* Games grid — mobile first */
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 col on mobile */
  gap: 12px;
}

.gcard {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--rL);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  animation: popIn 0.35s ease both;
}
.gcard:hover {
  transform: translateY(-5px);
  border-color: rgba(0,229,176,0.3);
  box-shadow: var(--shadowCard), var(--glow);
}
.gthumb {
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  position: relative;
  overflow: hidden;
}
.gthumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--card), transparent 55%);
}
.gbadge {
  position: absolute; top: 7px; right: 7px; z-index: 1;
  background: var(--c1); color: #07090f;
  font-size: 0.58rem; font-weight: 800;
  padding: 2px 7px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.gbody { padding: 11px; }
.gtitle { font-weight: 700; font-size: 0.82rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ggenre { font-size: 0.67rem; color: var(--tx3); margin-bottom: 8px; }
.gfoot { display: flex; align-items: center; justify-content: space-between; }
.grating { font-size: 0.75rem; color: var(--c1); font-weight: 700; }
.gplays { font-size: 0.65rem; color: var(--tx3); margin-top: 1px; }
.gplaybtn {
  padding: 5px 10px; border-radius: 7px; font-size: 0.7rem; font-weight: 700;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #07090f; transition: all 0.2s;
}
.gplaybtn:hover { filter: brightness(1.1); }

/* ============================================================
   QUOTES PAGE
============================================================ */
.quotes-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 col mobile */
  gap: 16px;
}

.qcard {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--rL);
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  animation: fadeUp 0.4s ease both;
}
.qcard::before {
  content: '\201C';
  position: absolute; top: -10px; left: 14px;
  font-family: var(--ffs);
  font-size: 7rem; line-height: 1;
  color: var(--c1); opacity: 0.07;
  pointer-events: none;
}
.qcard:hover { transform: translateY(-4px); border-color: rgba(124,92,252,0.3); box-shadow: var(--shadowCard); }
.qtext {
  font-family: var(--ffs);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.78;
  color: var(--tx);
  position: relative; z-index: 1;
}
.qauthor { display: flex; align-items: center; gap: 10px; }
.qav {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.82rem;
  flex-shrink: 0;
}
.qname { font-weight: 700; font-size: 0.84rem; }
.qrole { font-size: 0.69rem; color: var(--tx3); margin-top: 2px; }

.qfoot {
  display: flex; align-items: center; gap: 7px;
  border-top: 1px solid var(--bdr);
  padding-top: 12px;
}
.lbtn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 0.77rem; font-weight: 600;
  color: var(--tx2); border: 1px solid var(--bdr);
  transition: all 0.2s; cursor: pointer;
}
.lbtn svg { width: 13px; height: 13px; flex-shrink: 0; transition: transform 0.15s; fill: none; stroke: currentColor; stroke-width: 2; }
.lbtn:hover, .lbtn.liked { color: var(--c3); border-color: rgba(255,78,106,0.4); background: rgba(255,78,106,0.07); }
.lbtn.liked svg { fill: currentColor; animation: heartBeat 0.4s ease; }

.cbtn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 0.77rem; font-weight: 600;
  color: var(--tx2); border: 1px solid var(--bdr);
  margin-left: auto;
  transition: all 0.2s; cursor: pointer;
}
.cbtn svg { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; }
.cbtn:hover { color: var(--c1); border-color: rgba(0,229,176,0.35); background: rgba(0,229,176,0.07); }

/* Comment section */
.cmtbox {
  background: var(--bg2);
  border-radius: 12px;
  padding: 13px;
  display: flex; flex-direction: column; gap: 10px;
}
.cmtbox.hidden { display: none; }
.cmtlist {
  display: flex; flex-direction: column; gap: 7px;
  max-height: 160px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--c2) transparent;
}
.cmtitem {
  background: var(--card);
  border-radius: 9px; padding: 9px 11px;
  font-size: 0.77rem; color: var(--tx2);
  animation: slideUp 0.2s ease;
  line-height: 1.5;
}
.cmtitem strong { color: var(--tx); font-weight: 600; }
.cmttime { font-size: 0.67rem; color: var(--tx3); float: right; margin-left: 6px; }
.cmtrow { display: flex; gap: 7px; }
.cmtinput {
  flex: 1; min-width: 0;
  background: var(--card);
  border: 1.5px solid var(--bdr);
  border-radius: 9px; padding: 9px 12px;
  font-size: 0.8rem; color: var(--tx);
  transition: border 0.2s;
}
.cmtinput:focus { border-color: var(--c1); }
.cmtpost {
  flex-shrink: 0;
  padding: 9px 14px; border-radius: 9px;
  background: var(--c1); color: #07090f;
  font-weight: 700; font-size: 0.78rem;
  transition: filter 0.2s;
}
.cmtpost:hover { filter: brightness(1.1); }

/* ============================================================
   ABOUT PAGE
============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.acards { display: flex; flex-direction: column; gap: 12px; }
.acard {
  display: flex; align-items: flex-start; gap: 13px;
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 16px;
  transition: all 0.25s;
  animation: slideUp 0.4s ease both;
}
.acard:nth-child(2) { animation-delay: 0.08s; }
.acard:nth-child(3) { animation-delay: 0.16s; }
.acard:hover { border-color: rgba(0,229,176,0.25); transform: translateX(5px); }

.aicon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.ai1 { background: rgba(0,229,176,0.1); border: 1px solid rgba(0,229,176,0.2); }
.ai2 { background: rgba(124,92,252,0.1); border: 1px solid rgba(124,92,252,0.2); }
.ai3 { background: rgba(255,78,106,0.1); border: 1px solid rgba(255,78,106,0.2); }
.atitle { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.adesc { font-size: 0.79rem; color: var(--tx2); line-height: 1.6; }

/* Orbit — desktop only */
.orbit-panel { display: none; }

/* ============================================================
   TALK PAGE
============================================================ */
.talk-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.talkcard {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--rL);
  padding: 20px;
}
.talkcard-title { font-weight: 800; font-size: 1rem; margin-bottom: 14px; }

/* Threads */
.threads { display: flex; flex-direction: column; gap: 9px; }
.thr {
  display: flex; gap: 10px;
  background: var(--bg2);
  border: 1px solid transparent;
  border-radius: 12px; padding: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.thr:hover { border-color: var(--bdr); background: var(--card2); }
.thr-av {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem; flex-shrink: 0;
}
.thr-name { font-weight: 600; font-size: 0.81rem; margin-bottom: 2px; }
.thr-msg { font-size: 0.75rem; color: var(--tx2); line-height: 1.45; }
.thr-ts { font-size: 0.67rem; color: var(--tx3); margin-top: 3px; }
.ondot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 5px #22c55e; margin-right: 4px; vertical-align: middle; }

/* Chat */
.chat-body { display: flex; flex-direction: column; height: clamp(240px, 40vw, 320px); }
.chat-msgs {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px 0 10px;
  scrollbar-width: thin; scrollbar-color: var(--c2) transparent;
}
.bubble {
  max-width: 84%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.52;
  animation: fadeUp 0.22s ease;
}
.bubble.them {
  align-self: flex-start;
  background: var(--card2);
  border: 1px solid var(--bdr);
  border-bottom-left-radius: 4px;
}
.bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #07090f; font-weight: 500;
  border-bottom-right-radius: 4px;
}
.bubble-who { font-size: 0.63rem; font-weight: 700; color: var(--tx3); margin-bottom: 2px; }
.chat-input-row {
  display: flex; gap: 7px;
  padding-top: 11px; border-top: 1px solid var(--bdr);
}
.chat-inp {
  flex: 1; min-width: 0;
  background: var(--bg2); border: 1.5px solid var(--bdr);
  border-radius: 10px; padding: 9px 12px;
  font-size: 0.82rem; color: var(--tx);
  transition: border 0.2s;
}
.chat-inp:focus { border-color: var(--c1); }
.chat-send {
  flex-shrink: 0;
  padding: 9px 15px; border-radius: 10px;
  background: var(--c1); color: #07090f;
  font-weight: 700; font-size: 0.82rem;
  transition: filter 0.2s;
}
.chat-send:hover { filter: brightness(1.1); }

/* ============================================================
   AUTH MODAL
============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  width: 100%; max-width: 400px;
  background: var(--card);
  border: 1px solid var(--bdr2);
  border-radius: 22px;
  padding: clamp(18px, 5vw, 32px);
  box-shadow: var(--shadow), var(--glow);
  animation: popIn 0.25s ease;
}
.modal-hd { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.modal-title { font-weight: 900; font-size: 1.35rem; letter-spacing: -0.5px; }
.modal-sub { font-size: 0.8rem; color: var(--tx2); margin-top: 3px; }
.modal-close {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--tx2);
  flex-shrink: 0;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--card2); color: var(--tx); }
.fg { margin-bottom: 13px; }
.fg label { display: block; font-size: 0.77rem; font-weight: 600; color: var(--tx2); margin-bottom: 5px; }
.fi {
  width: 100%;
  background: var(--bg2); border: 1.5px solid var(--bdr);
  border-radius: 10px; padding: 10px 13px;
  font-size: 0.87rem; color: var(--tx);
  transition: border 0.2s;
}
.fi:focus { border-color: var(--c1); }
.fsub {
  width: 100%; padding: 12px;
  border-radius: 12px; font-weight: 700; font-size: 0.9rem;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #07090f;
  transition: transform 0.2s, filter 0.2s;
  margin-top: 4px;
}
.fsub:hover { filter: brightness(1.1); transform: translateY(-1px); }
.msw { text-align: center; margin-top: 14px; font-size: 0.79rem; color: var(--tx2); }
.msw a { color: var(--c1); font-weight: 600; cursor: pointer; }

/* ============================================================
   TOAST
============================================================ */
.toast {
  position: fixed;
  bottom: calc(var(--tabH) + 12px);
  right: 16px;
  z-index: 1200;
  background: var(--card);
  border: 1px solid var(--bdr2);
  border-radius: 12px;
  padding: 11px 16px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 500;
  box-shadow: var(--shadow);
  max-width: min(320px, calc(100vw - 32px));
  animation: slideUp 0.3s ease;
}
.toast.hidden { display: none; }
.toast.ok { border-color: rgba(0,229,176,0.35); }
.toast.err { border-color: rgba(255,78,106,0.4); }

/* ============================================================
   FOOTER
============================================================ */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--bdr);
  padding: 18px 16px;
  text-align: center;
  font-size: 0.73rem; color: var(--tx3);
}
footer em { color: var(--c1); font-style: normal; }

/* ============================================================
   SCROLLBAR
============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--c2); }

/* ============================================================
   ★ RESPONSIVE BREAKPOINTS (mobile-first)
============================================================ */

/* — Tiny phones (< 360px) — */
@media (max-width: 359px) {
  .hero-btns { flex-direction: column; }
  .hbtn-p, .hbtn-s { width: 100%; text-align: center; }
  .filters { gap: 5px; }
  .fb { padding: 5px 10px; font-size: 0.72rem; }
  .gthumb { height: 80px; font-size: 2rem; }
}

/* — Small phones (360px – 479px) — */
/* defaults are already mobile, nothing extra */

/* — Large phones / small tablets (480px+) — */
@media (min-width: 480px) {
  .W { padding: 28px 20px 40px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .gthumb { height: 110px; font-size: 2.8rem; }
  .quotes-grid { grid-template-columns: 1fr; } /* still 1 col */
}

/* — Tablets portrait (640px+) — */
@media (min-width: 640px) {
  .W { padding: 32px 24px 48px; }
  .games-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .quotes-grid { grid-template-columns: repeat(2, 1fr); }
  .gthumb { height: 120px; }
  .hero-stats { gap: 28px; }
}

/* — Tablets landscape / small desktop (768px+) — */
@media (min-width: 768px) {
  /* Hide bottom tabs, remove their body padding */
  body { padding-bottom: 0; }
  .bottomtabs { display: none; }

  /* Show desktop nav links */
  .nav-links { display: flex; }

  /* Toast sits at bottom of screen on desktop */
  .toast { bottom: 20px; }

  /* Hero min-height without tab bar */
  .hero { min-height: calc(100svh - var(--navH)); padding: 40px 24px; }

  /* Two-col about */
  .about-layout { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .orbit-panel { display: flex; align-items: center; justify-content: center; }

  /* Two-col talk */
  .talk-layout { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* 3-col quotes */
  .quotes-grid { grid-template-columns: repeat(3, 1fr); }

  /* Games 3-col */
  .games-grid { grid-template-columns: repeat(3, 1fr); }
}

/* — Desktop (1024px+) — */
@media (min-width: 1024px) {
  .W { padding: 44px 32px 60px; }

  /* Hero split layout */
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
  }
  .hero { padding: 60px 32px; }
  .hero-visual { display: block; }

  /* Games 4-col */
  .games-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .gthumb { height: 130px; font-size: 3rem; }
}

/* — Wide desktop (1280px+) — */
@media (min-width: 1280px) {
  .W { padding: 48px 40px 64px; }
}
