/* ============================================================
   KEY DASHBOARD — STYLE v4
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:             #08080d;
  --bg2:            #0d0d14;
  --surface:        rgba(255,255,255,0.04);
  --surface-solid:  #14141f;
  --surface-hover:  rgba(255,255,255,0.07);
  --border:         rgba(255,255,255,0.06);
  --text:           #e4e4ef;
  --text-muted:     #6b6b88;
  --radius:         14px;
  --radius-sm:      10px;
  --accent:         #7c5cfc;
  --accent-glow:    rgba(124,92,252,0.35);
  --accent-hover:   #9179ff;
  --accent-rgb:     124,92,252;
  --success:        #34d399;
  --danger:         #f87171;
  --shadow:         rgba(0,0,0,0.35);
}

/* ---------- LIGHT MODE ---------- */
[data-mode="light"] {
  --bg:            #f3f3f8;
  --bg2:           #e9e9f0;
  --surface:       rgba(255,255,255,0.7);
  --surface-solid: #ffffff;
  --surface-hover: rgba(0,0,0,0.04);
  --border:        rgba(0,0,0,0.08);
  --text:          #1a1a2e;
  --text-muted:    #6e6e8a;
  --success:       #16a34a;
  --danger:        #dc2626;
  --shadow:        rgba(0,0,0,0.08);
}

/* ---------- COLOR THEMES ---------- */
[data-theme="red"]    { --accent:#ef4444; --accent-glow:rgba(239,68,68,.3);  --accent-hover:#f87171; --accent-rgb:239,68,68; }
[data-theme="orange"] { --accent:#f97316; --accent-glow:rgba(249,115,22,.3); --accent-hover:#fb923c; --accent-rgb:249,115,22; }
[data-theme="yellow"] { --accent:#eab308; --accent-glow:rgba(234,179,8,.3);  --accent-hover:#facc15; --accent-rgb:234,179,8; }
[data-theme="green"]  { --accent:#22c55e; --accent-glow:rgba(34,197,94,.3);  --accent-hover:#4ade80; --accent-rgb:34,197,94; }
[data-theme="blue"]   { --accent:#3b82f6; --accent-glow:rgba(59,130,246,.3); --accent-hover:#60a5fa; --accent-rgb:59,130,246; }
[data-theme="cyan"]   { --accent:#06b6d4; --accent-glow:rgba(6,182,212,.3);  --accent-hover:#22d3ee; --accent-rgb:6,182,212; }
[data-theme="purple"] { --accent:#7c5cfc; --accent-glow:rgba(124,92,252,.3); --accent-hover:#9179ff; --accent-rgb:124,92,252; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow-x: hidden;
  transition: background 0.35s, color 0.35s;
}

body::before {
  content: ''; position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(var(--accent-rgb),0.06), transparent),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(var(--accent-rgb),0.03), transparent);
  pointer-events: none; z-index: 0;
  transition: background 0.5s;
}
body > * { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   THEME TOGGLE
   ============================================================ */
.theme-toggle {
  position: fixed; top: 16px; right: 16px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.theme-toggle:hover { background: var(--surface-hover); transform: scale(1.08); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle svg { width: 20px; height: 20px; transition: opacity 0.3s; }

/* ============================================================
   NOTIFICATION
   ============================================================ */
.notification {
  position: fixed; top: 20px; right: 20px;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  min-width: 260px; max-width: 380px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px var(--shadow);
  transform: translateX(calc(100% + 40px));
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
  overflow: hidden;
}
.notification.show { transform: translateX(0); }

.notification::after {
  content: ''; position: absolute;
  bottom: 0; left: 0;
  height: 3px; width: 100%;
  background: var(--success);
  transform-origin: left;
  animation: none;
}
.notification.show::after {
  animation: notifShrink var(--notif-dur, 2.8s) linear forwards;
}
.notification.error::after { background: var(--danger); }

@keyframes notifShrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.notif-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.notif-icon.success { background: rgba(52,211,153,0.12); color: var(--success); }
.notif-icon.error   { background: rgba(248,113,113,0.12); color: var(--danger); }
.notif-icon svg { width: 18px; height: 18px; }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 2px; }
.notif-msg   { font-size: 0.8rem; color: var(--text-muted); }

.notif-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; padding: 4px;
  line-height: 1; flex-shrink: 0;
  transition: color 0.2s;
}
.notif-close:hover { color: var(--text); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrapper {
  text-align: center; max-width: 420px; width: 100%;
  padding: 24px; animation: fadeUp 0.5s ease;
}

.lock-icon {
  width: 68px; height: 68px;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px var(--accent-glow);
  color: #fff;
}
.lock-icon svg { width: 30px; height: 30px; }

.login-wrapper h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.login-wrapper .subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: 0.9rem; }

.input-field {
  width: 100%; padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  font-family: inherit;
}
.input-field.mono {
  font-family: 'JetBrains Mono','Fira Code',monospace;
  letter-spacing: 1.2px;
}
.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.error-msg { color: var(--danger); font-size: 0.8rem; margin: 10px 0; min-height: 20px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  font-family: inherit; white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
  color: #fff; box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 28px var(--accent-glow); filter: brightness(1.1); }

.btn-full { width: 100%; }
.btn-sm { padding: 9px 20px; font-size: 0.85rem; border-radius: 8px; }

.btn-outline {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
}
.btn-outline:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #000));
  color: #fff; box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-accent:hover:not(:disabled) { box-shadow: 0 6px 28px var(--accent-glow); filter: brightness(1.1); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-wrapper {
  width: 100%; max-width: 800px;
  padding: 30px 20px 60px;
  animation: fadeUp 0.5s ease;
}

.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.dash-header h1 {
  font-size: 1.5rem; font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 16px;
  transition: border-color 0.3s, background 0.35s;
}
.card:hover { border-color: rgba(var(--accent-rgb),0.15); }

.card-title {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 16px;
}

/* stats */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.stat-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  text-align: center;
  position: relative; overflow: hidden;
  transition: background 0.35s;
}
.stat-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #3b82f6));
  opacity: 0.7;
}
.stat-box .number {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #3b82f6));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-box .label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* settings */
.setting-group { margin-bottom: 16px; }
.setting-group:last-child { margin-bottom: 0; }
.setting-label { display: block; font-weight: 500; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.setting-input-row { display: flex; gap: 10px; }
.setting-input-row .input-field { flex: 1; min-width: 0; }
.setting-input-row .btn { flex-shrink: 0; }

.link-preview {
  margin-top: 10px; padding: 10px 14px;
  background: var(--bg2); border-radius: 8px;
  font-size: 0.82rem; color: var(--text-muted); word-break: break-all;
  transition: background 0.35s;
}

/* color picker */
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--dot-color);
  border: 3px solid transparent;
  cursor: pointer; transition: all 0.2s ease;
}
.color-dot:hover { transform: scale(1.12); }
.color-dot.active {
  border-color: var(--text);
  transform: scale(1.12);
  box-shadow: 0 0 16px var(--dot-color);
}

/* tab switcher */
.tab-switcher {
  display: flex;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 4px;
  position: relative;
  margin-bottom: 16px;
  transition: background 0.35s;
}
.tab-slider {
  position: absolute; top: 4px; left: 4px;
  width: calc(50% - 4px); height: calc(100% - 8px);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
.tab-slider.pos-1 { transform: translateX(100%); }
.tab-slider.pos-2 { transform: translateX(200%); }

/* 3-tab variant */
.tab-3 .tab-slider { width: calc(33.333% - 4px); }

.tab-btn {
  flex: 1; padding: 10px 8px;
  border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; z-index: 1;
  font-weight: 600; font-size: 0.85rem; font-family: inherit;
  transition: color 0.3s; border-radius: 8px;
}
.tab-btn.active { color: var(--text); }

.tab-panel { display: none; animation: fadeTab 0.35s ease; }
.tab-panel.active { display: block; }
@keyframes fadeTab { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* tables */
.log-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.log-table th {
  text-align: left; color: var(--text-muted);
  font-weight: 500; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.log-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.log-table tr:last-child td { border-bottom: none; }
.log-table tbody tr { transition: background 0.15s; }
.log-table tbody tr:hover { background: var(--surface-hover); }
.log-table .ip { font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 0.8rem; color: var(--accent); }
.log-table .country { color: var(--text); }
.log-table .time { color: var(--text-muted); font-size: 0.8rem; }
.empty-row td { color: var(--text-muted); text-align: center; font-style: italic; }

.flag-img {
  width: 20px; height: 14px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 6px;
  object-fit: cover;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 { text-align: center; animation: fadeUp 0.5s ease; }
.page-404 .code {
  font-size: 8rem; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.15), rgba(var(--accent-rgb),0.04));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.page-404 .msg { color: var(--text-muted); font-size: 1.1rem; margin-top: 8px; }

/* ============================================================
   SCANNER PAGE
   ============================================================ */
.scanner-wrapper {
  text-align: center; max-width: 560px; width: 100%;
  padding: 24px; animation: fadeUp 0.5s ease;
}

.scanner-header { margin-bottom: 36px; }
.game-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 30px; padding: 6px 16px 6px 6px;
  margin-bottom: 16px; font-size: 0.8rem; color: var(--text-muted);
}
.game-badge img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.scanner-header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.scanner-header p { color: var(--text-muted); font-size: 0.9rem; }

/* scan button — wide pill */
.scan-btn {
  width: 260px; height: 68px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 0 40px var(--accent-glow);
  color: #fff; font-family: inherit;
  font-size: 1.05rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
}
.scan-btn:hover { transform: scale(1.04); box-shadow: 0 0 60px var(--accent-glow); }
.scan-btn:active { transform: scale(0.96); }
.scan-btn svg { width: 24px; height: 24px; fill: #fff; }

/* scanning */
.scanning-area {
  display: none; flex-direction: column; align-items: center; gap: 20px;
  animation: fadeUp 0.4s ease;
}
.scanning-area.active { display: flex; }

.radar-container { width: 170px; height: 170px; position: relative; margin: 0 auto; }
.radar-ring { position: absolute; inset: 0; border: 2px solid rgba(var(--accent-rgb),0.12); border-radius: 50%; }
.radar-ring:nth-child(2) { inset: 18px; border-color: rgba(var(--accent-rgb),0.16); }
.radar-ring:nth-child(3) { inset: 36px; border-color: rgba(var(--accent-rgb),0.22); }
.radar-ring:nth-child(4) { inset: 54px; border-color: rgba(var(--accent-rgb),0.28); }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(var(--accent-rgb),0.3) 40deg, transparent 50deg);
  animation: radarSweep 2s linear infinite;
}
.radar-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 16px var(--accent-glow);
  animation: pulse 1.5s ease infinite;
}
@keyframes radarSweep { to { transform: rotate(360deg); } }

.scan-progress { width: 280px; height: 4px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.scan-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 4px; transition: width 0.3s ease;
}
.scan-status { color: var(--text-muted); font-size: 0.85rem; min-height: 22px; }

/* result */
.result-area {
  display: none; flex-direction: column; align-items: center; gap: 16px;
  animation: resultReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.result-area.active { display: flex; }

.result-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 32px; width: 100%; max-width: 480px;
  text-align: center;
  transition: background 0.35s;
}

.found-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--success);
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
}
.found-dot {
  width: 8px; height: 8px;
  background: var(--success); border-radius: 50%;
  animation: pulse 1.5s ease infinite;
}

.server-info {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 8px; font-size: 1.05rem; font-weight: 600;
}
.server-flag { width: 28px; height: 20px; border-radius: 3px; object-fit: cover; }

.player-count { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }
.player-count span { color: var(--accent); font-weight: 700; }

.game-thumb {
  width: 100%; max-width: 420px;
  border-radius: var(--radius-sm); margin-bottom: 22px;
  border: 1px solid var(--border);
}

.play-btn-large {
  width: 100%; padding: 16px 0;
  border-radius: var(--radius-sm);
  font-size: 1.05rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 10px;
}

.search-again-btn {
  font-size: 0.85rem;
  padding: 10px 24px;
}
.search-again-btn svg { width: 16px; height: 16px; }

/* 404 branch */
.branch-404 { text-align: center; animation: fadeUp 0.5s ease; }
.branch-404 h1 { font-size: 3rem; font-weight: 800; color: var(--text-muted); }
.branch-404 p { color: var(--text-muted); margin-top: 8px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes resultReveal { from { opacity:0; transform:scale(.92) translateY(20px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 640px) {
  body { align-items: flex-start; }
  .dashboard-wrapper { padding: 20px 14px 40px; }
  .dash-header h1 { font-size: 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat-box { padding: 14px 8px; }
  .stat-box .number { font-size: 1.4rem; }
  .stat-box .label { font-size: 0.65rem; }
  .card { padding: 18px 16px; }
  .setting-input-row { flex-direction: column; }
  .setting-input-row .btn { width: 100%; }
  .log-table th, .log-table td { padding: 8px 6px; font-size: 0.78rem; }
  .log-table .ip { font-size: 0.68rem; }
  .color-dot { width: 32px; height: 32px; }
  .scanner-wrapper { padding: 20px 16px; }
  .scanner-header h1 { font-size: 1.3rem; }
  .scan-btn { width: 200px; height: 56px; font-size: 0.9rem; }
  .radar-container { width: 140px; height: 140px; }
  .radar-ring:nth-child(2) { inset: 14px; }
  .radar-ring:nth-child(3) { inset: 28px; }
  .radar-ring:nth-child(4) { inset: 42px; }
  .result-card { padding: 22px 16px; }
  .game-thumb { max-width: 100%; }
  .scan-progress { width: 220px; }
  .login-wrapper { padding: 20px 16px; }
  .page-404 .code { font-size: 5rem; }
  .theme-toggle { width: 36px; height: 36px; top: 12px; right: 12px; }
  .theme-toggle svg { width: 17px; height: 17px; }
  .notification { min-width: 220px; max-width: calc(100vw - 32px); top: 14px; right: 14px; padding: 14px 14px; font-size: 0.85rem; }
  .unsupported-wrapper { padding: 20px 16px; }
  .unsupported-wrapper h1 { font-size: 1.3rem; }
  .btn-chrome { font-size: 0.85rem; padding: 12px 20px; }
}

/* ============================================================
   UNSUPPORTED BROWSER PAGE
   ============================================================ */
.unsupported-wrapper {
  text-align: center;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  animation: fadeUp 0.5s ease;
}

.unsupported-icon {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  background: rgba(248,113,113,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--danger);
}
.unsupported-icon svg { width: 36px; height: 36px; }

.unsupported-wrapper h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.unsupported-msg {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

.btn-chrome {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 1rem;
}

/* ============================================================
   DEVICE BADGE
   ============================================================ */
.device-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: var(--surface-hover);
  color: var(--text-muted);
}
.device-badge.computer { color: var(--accent); background: rgba(var(--accent-rgb),0.1); }
.device-badge.android  { color: #34d399; background: rgba(52,211,153,0.1); }
.device-badge.ios      { color: #60a5fa; background: rgba(96,165,250,0.1); }
.device-badge.console  { color: #f97316; background: rgba(249,115,22,0.1); }

/* ============================================================
   GAME STATS BAR
   ============================================================ */
.game-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 10px 0 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

/* Clickable buttons — Favorite & Notify */
.game-stat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s, transform 0.15s;
  flex: 1;
}
.game-stat-btn svg {
  width: 22px; height: 22px;
  transition: stroke 0.2s, fill 0.2s;
}
.game-stat-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.game-stat-btn:active { transform: scale(0.9); }

/* Active / toggled state */
.game-stat-btn.active-fav {
  color: #f59e0b;
}
.game-stat-btn.active-fav svg {
  fill: #f59e0b;
  stroke: #f59e0b;
}
.game-stat-btn.active-notify {
  color: var(--accent);
}
.game-stat-btn.active-notify svg {
  fill: rgba(var(--accent-rgb), 0.2);
  stroke: var(--accent);
}

/* Vertical divider */
.game-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

/* Like / Dislike counts — read-only display */
.game-stat-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  flex: 1;
}
.game-stat-count svg {
  width: 22px; height: 22px;
  stroke: var(--text-muted);
}

/* Thumbs up tinted green */
.game-stat-count:not(.dislike) {
  color: #34d399;
}
.game-stat-count:not(.dislike) svg { stroke: #34d399; }

/* Thumbs down tinted red */
.game-stat-count.dislike {
  color: var(--danger);
}
.game-stat-count.dislike svg { stroke: var(--danger); }

/* Light mode overrides */
[data-mode="light"] .game-stat-btn:hover { background: rgba(0,0,0,0.05); }

@media (max-width: 640px) {
  .game-stat-btn  { padding: 6px 10px; font-size: 0.7rem; }
  .game-stat-count { padding: 6px 10px; font-size: 0.7rem; }
  .game-stat-btn svg, .game-stat-count svg { width: 18px; height: 18px; }
  .game-stat-rating { flex: 1.6; }
}

/* ============================================================
   LIKE / DISLIKE RATING BAR
   ============================================================ */

/* Outer wrapper — column flex, fills available space */
.game-stat-rating {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 2;
  min-width: 0;
}

/* Row 1: 👍 on left, 👎 on right */
.rating-icons-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-icon { width: 26px; height: 26px; }
.like-icon    { stroke: #34d399; }
.dislike-icon { stroke: var(--danger); }

/* Row 2: full-width bar */
.rating-bar {
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: rgba(248,113,113,0.35);   /* muted red track */
  overflow: hidden;
  position: relative;
}

.rating-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 5px;
  background: #34d399;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Row 3: count left, count right */
.rating-counts-row {
  display: flex;
  justify-content: space-between;
}

.rating-label {
  font-size: 0.8rem;
  font-weight: 700;
}
.like-label    { color: #34d399; }
.dislike-label { color: var(--danger); }

