/* ==================== RESET & BASE ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #ef4444; --red-light: #ff7a8a; --red-dark: #c82333;
  --red-bg: rgba(239, 68, 68, 0.15); --red-bg-solid: #301a1e;
  --blue: #3b8bff; --blue-light: #6db3ff; --blue-dark: #2468d4;
  --blue-bg: rgba(59, 139, 255, 0.15); --blue-bg-solid: #1a2030;
  --passive: #c9a258; --passive-light: #e8c86e; --passive-bg: rgba(201, 162, 88, 0.18);
  --death: #1a1a2e; --death-light: #333355;
  --bg-primary: #0c0e18; --bg-secondary: #141624; --bg-card: #1c1f34; --bg-elevated: #262a44;
  --text-primary: #eef0f6; --text-secondary: #9da2be; --text-muted: #636880;
  --border: rgba(255, 255, 255, 0.09); --border-light: rgba(255, 255, 255, 0.14);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25); --shadow-md: 0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.45); --shadow-xl: 0 16px 60px rgba(0,0,0,0.55);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary); color: var(--text-primary);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  user-select: none; -webkit-user-select: none; overflow: hidden;
  touch-action: manipulation; -ms-touch-action: manipulation;
}

/* ==================== SCREENS ==================== */
.screen { display: none; width: 100%; height: 100%; }
.screen.active { display: flex; }

/* ==================== SETUP SCREEN ==================== */
.setup-screen {
  align-items: center; justify-content: center; overflow-y: auto;
  padding-top: env(safe-area-inset-top);
  background: radial-gradient(ellipse at 20% 50%, rgba(239,68,68,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(59,139,255,0.1) 0%, transparent 50%), var(--bg-primary);
}
.setup-container { text-align: center; max-width: 420px; width: 90%; padding: 20px; padding-top: env(safe-area-inset-top); }

.logo { margin-bottom: 32px; }
.logo-icon {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--blue) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 50px rgba(239,68,68,0.35), 0 0 50px rgba(59,139,255,0.35); position: relative;
}
.logo-crosshair { width: 32px; height: 32px; border: 3px solid white; border-radius: 50%; position: relative; }
.logo-crosshair::before, .logo-crosshair::after { content: ""; position: absolute; background: white; }
.logo-crosshair::before { width: 2px; height: 100%; left: 50%; top: 0; transform: translateX(-50%); }
.logo-crosshair::after { width: 100%; height: 2px; top: 50%; left: 0; transform: translateY(-50%); }
.logo-title {
  font-family: "Bebas Neue", "Inter", sans-serif; font-size: 56px; font-weight: 400;
  letter-spacing: 8px; line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #c8cde6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-subtitle { font-size: 13px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: var(--text-secondary); margin-top: 4px; }

.setup-card {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 32px 28px; box-shadow: var(--shadow-lg);
}
.setup-card h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; letter-spacing: 1px; }

.join-game-row { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.join-code-input {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 14px; color: var(--text-primary); font-size: 16px; font-weight: 700;
  text-align: center; letter-spacing: 4px; text-transform: uppercase; outline: none;
}
.join-code-input:focus { border-color: var(--blue); }
.join-code-input::placeholder { color: var(--text-muted); letter-spacing: 1px; font-size: 13px; }
.btn-join {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm);
  background: var(--blue); color: white; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.btn-join:hover { background: var(--blue-light); transform: translateY(-1px); }

.setup-divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; margin: 16px 0; }
.setup-divider::before, .setup-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.setup-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.setup-option label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.setup-option select {
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 8px 12px; color: var(--text-primary); font-size: 13px; font-weight: 600; cursor: pointer; outline: none;
}

/* Mode Selector (lobby) */
.mode-selector {
  display: flex; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border-light);
}
.mode-btn {
  flex: 1; padding: 10px 12px; border: none; background: var(--bg-card);
  color: var(--text-secondary); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all var(--transition); letter-spacing: 0.3px;
}
.mode-btn + .mode-btn { border-left: 1px solid var(--border-light); }
.mode-btn.active {
  background: linear-gradient(135deg, var(--blue) 0%, #5b6cff 100%);
  color: white; font-weight: 800;
}
.mode-btn:not(.active):hover { background: var(--bg-elevated); color: var(--text-primary); }

.lobby-mode-selector {
  margin-bottom: 14px; padding: 12px 14px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.lobby-mode-label {
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}

/* Mode Popup (local play) */
.local-play-wrapper { position: relative; }
.mode-popup {
  display: none; flex-direction: column; gap: 6px;
  margin-top: 8px; padding: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); animation: fadeIn 0.2s ease;
}
.mode-popup.active { display: flex; }
.mode-popup-label {
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; text-align: center;
}
.mode-popup-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-primary); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.mode-popup-btn:hover { background: var(--bg-elevated); border-color: var(--blue); }
.mode-popup-desc {
  font-size: 11px; font-weight: 600; color: var(--text-muted); margin-left: 8px;
}

.setup-teams { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 28px; }
.setup-team { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-md); font-weight: 700; font-size: 14px; }
.setup-team-red { background: var(--red-bg); color: var(--red-light); }
.setup-team-blue { background: var(--blue-bg); color: var(--blue-light); }
.team-color-dot { width: 12px; height: 12px; border-radius: 50%; }
.team-color-dot.red { background: var(--red); }
.team-color-dot.blue { background: var(--blue); }
.vs-text { font-size: 12px; font-weight: 800; color: var(--text-muted); letter-spacing: 2px; }

.btn-primary {
  width: 100%; padding: 16px; margin-top: 0; border: none; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--red) 0%, #8b5cf6 50%, var(--blue) 100%); color: white;
  font-size: 16px; font-weight: 800; letter-spacing: 2px; cursor: pointer;
  transition: all var(--transition); box-shadow: 0 4px 24px rgba(239,68,68,0.3), 0 4px 24px rgba(59,139,255,0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 32px rgba(239,68,68,0.45), 0 6px 32px rgba(59,139,255,0.35); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  width: 100%; padding: 14px; border: 1px solid var(--border-light); border-radius: var(--radius-md);
  background: transparent; color: var(--text-secondary); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.btn-secondary:hover { background: var(--bg-card); color: var(--text-primary); }

/* How to Play */
.how-to-play { margin-top: 20px; }
.how-to-play-toggle {
  background: transparent; border: 1px solid var(--border-light); border-radius: var(--radius-md);
  padding: 10px 20px; color: var(--text-secondary); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all var(--transition); width: 100%;
}
.how-to-play-toggle:hover { background: var(--bg-card); color: var(--text-primary); }
.how-to-play-content {
  display: none; text-align: left; margin-top: 12px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 24px;
}
.how-to-play-content.open { display: block; animation: fadeIn 0.2s ease; }
.how-to-play-content ol { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.how-to-play-content li { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.how-to-play-content li strong { color: var(--text-primary); }
.setup-footer { margin-top: 16px; font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* ==================== LOBBY SCREEN ==================== */
.lobby-screen {
  flex-direction: column; align-items: center;
  background: radial-gradient(ellipse at 30% 30%, rgba(239,68,68,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(59,139,255,0.08) 0%, transparent 50%), var(--bg-primary);
  overflow-y: auto;
}

.lobby-container { width: 100%; max-width: 700px; padding: 20px; padding-top: calc(20px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.lobby-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-right: 52px; }
.lobby-title { font-family: "Bebas Neue", sans-serif; font-size: 28px; letter-spacing: 3px; flex: 1; }
.lobby-code-box {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 16px;
}
.lobby-code-label { font-size: 9px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; }
.lobby-code { font-size: 20px; font-weight: 900; letter-spacing: 4px; color: #ffcc00; text-shadow: 0 0 10px rgba(255,204,0,0.3); }

.lobby-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.lobby-team {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; min-height: 200px;
}
.lobby-team-red { border-top: 3px solid var(--red); }
.lobby-team-blue { border-top: 3px solid var(--blue); }

.lobby-team-header {
  display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800;
  margin-bottom: 16px; letter-spacing: 1px;
}
.lobby-team-red .lobby-team-header { color: var(--red-light); }
.lobby-team-blue .lobby-team-header { color: var(--blue-light); }

.lobby-role-section { margin-bottom: 14px; }
.lobby-role-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2px; color: var(--text-muted);
  margin-bottom: 6px; text-transform: uppercase;
}

.lobby-slot {
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--border-light);
  cursor: pointer; transition: all var(--transition); margin-bottom: 6px;
  display: flex; align-items: center;
}
.lobby-slot:hover { border-color: rgba(255,255,255,0.3); background: var(--bg-card); }
.lobby-slot.slot-filled { border-style: solid; background: var(--bg-card); cursor: default; }

.lobby-team-red .lobby-slot.slot-filled { border-color: rgba(220,53,69,0.3); }
.lobby-team-blue .lobby-slot.slot-filled { border-color: rgba(43,125,233,0.3); }

.slot-empty { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.slot-player { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.slot-me { color: #ffcc00; text-shadow: 0 0 8px rgba(255,204,0,0.3); }

.lobby-slot-spymaster { min-height: 44px; }
.lobby-slot-spymaster .slot-empty::before { content: "👁 "; }

.lobby-agents-list { display: flex; flex-direction: column; gap: 4px; }

.lobby-footer { text-align: center; }
.lobby-status { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }

/* ==================== PROFILE BUTTON ==================== */
.profile-btn {
  position: fixed; top: calc(16px + env(safe-area-inset-top)); right: 16px; min-width: 44px; height: 44px;
  padding: 0 14px; border-radius: 22px; border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); cursor: pointer;
  z-index: 100; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.profile-btn:hover { background: rgba(255,255,255,0.15); transform: scale(1.05); }
.profile-icon { font-size: 13px; font-weight: 800; color: #fff; text-transform: uppercase; white-space: nowrap; }
.profile-btn.logged-in {
  width: 44px; min-width: 44px; padding: 0; border-radius: 50%;
  background: linear-gradient(135deg, #7c8fff 0%, #a855f7 100%); border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 12px rgba(168,85,247,0.3);
}

/* ==================== AUTH MODAL ==================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 200;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: var(--bg-secondary); border-radius: var(--radius-xl); padding: 28px;
  max-width: 360px; width: 90%; position: relative; box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; background: none; border: none;
  font-size: 24px; color: var(--text-muted); cursor: pointer; padding: 4px 8px; line-height: 1;
}
.modal-close:hover { color: #fff; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; padding: 10px; border: none; background: var(--bg-card); color: var(--text-muted);
  font-size: 14px; font-weight: 700; border-radius: 10px; cursor: pointer; transition: all var(--transition);
}
.auth-tab.active { background: linear-gradient(135deg, #7c8fff 0%, #a855f7 100%); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  padding: 12px 14px; border: 2px solid var(--border); border-radius: 10px;
  background: var(--bg-card); color: #fff; font-size: 14px; font-weight: 600;
}
.auth-form input::placeholder { color: var(--text-muted); }
.auth-form input:focus { outline: none; border-color: #7c8fff; }
.auth-submit {
  padding: 12px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #7c8fff 0%, #a855f7 100%); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all var(--transition);
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 4px 18px rgba(168,85,247,0.45); }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-btn {
  padding: 12px; border: 2px solid var(--border-light); border-radius: 10px;
  background: #fff; color: #333; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.google-btn:hover { background: #f3f4f6; transform: translateY(-2px); }
.auth-error { color: #f87171; font-size: 13px; font-weight: 600; text-align: center; margin: 0; min-height: 20px; }

/* ==================== NICKNAME MODAL ==================== */
.nickname-modal { max-width: 340px; text-align: center; }
.nickname-title { color: #fff; font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.nickname-subtitle { color: var(--text-muted); font-size: 13px; margin: 0 0 18px; }

/* ==================== FRIENDS POPUP ==================== */
.friends-popup {
  position: fixed; top: 70px; right: 16px; width: 300px; max-height: 450px;
  background: var(--bg-secondary); border-radius: 16px; box-shadow: var(--shadow-xl);
  z-index: 150; display: none; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border);
}
.friends-popup.active { display: flex; }
.friends-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.friends-username { font-weight: 800; color: #fff; font-size: 14px; }
.friends-signout {
  padding: 6px 12px; border: none; border-radius: 8px; background: var(--bg-card);
  color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer;
}
.friends-signout:hover { background: var(--bg-elevated); color: #fff; }
.friends-search { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.friends-search input {
  flex: 1; padding: 8px 12px; border: 2px solid var(--border); border-radius: 8px;
  background: var(--bg-card); color: #fff; font-size: 13px;
}
.friends-search input:focus { outline: none; border-color: #7c8fff; }
.friends-search button {
  padding: 8px 14px; border: none; border-radius: 8px; background: #7c8fff;
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
}
.friends-search-result { padding: 0 16px; }
.search-result-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.search-result-item span { font-size: 13px; font-weight: 600; color: #fff; }
.search-result-item button { padding: 6px 12px; border: none; border-radius: 6px; background: #7c8fff; color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.friends-tabs { display: flex; border-bottom: 1px solid var(--border); }
.friends-tab {
  flex: 1; padding: 10px; border: none; background: none; color: var(--text-muted);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all var(--transition);
}
.friends-tab.active { color: #fff; border-bottom: 2px solid #7c8fff; }
.friends-list, .requests-list { flex: 1; overflow-y: auto; padding: 8px 0; max-height: 250px; }
.friend-item, .request-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.friend-item:hover, .request-item:hover { background: var(--bg-card); }
.friend-info { display: flex; align-items: center; gap: 8px; }
.friend-name { font-size: 13px; font-weight: 600; color: #fff; }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.5); display: inline-block; }
.offline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); display: inline-block; }
.friend-invite-btn {
  padding: 6px 12px; border: none; border-radius: 6px;
  background: linear-gradient(135deg, var(--red) 0%, var(--blue) 100%);
  color: #fff; font-size: 11px; font-weight: 700; cursor: pointer;
}
.friend-invite-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.request-actions { display: flex; gap: 6px; }
.request-accept, .request-decline { padding: 6px 10px; border: none; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; }
.request-accept { background: #34d399; color: #fff; }
.request-decline { background: var(--bg-card); color: var(--text-muted); }
.empty-list { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ==================== INVITE NOTIFICATION ==================== */
.invite-notification { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 250; display: none; }
.invite-notification.active { display: block; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { transform: translateX(-50%) translateY(-20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.invite-content {
  background: linear-gradient(135deg, var(--red) 0%, var(--blue) 100%);
  border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow-lg); max-width: 320px; text-align: center;
}
.invite-text { color: #fff; font-size: 14px; font-weight: 600; margin: 0 0 12px 0; line-height: 1.4; }
.invite-text span { font-weight: 800; }
.invite-actions { display: flex; gap: 8px; }
.invite-accept, .invite-decline { flex: 1; padding: 10px; border: none; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all var(--transition); }
.invite-accept { background: #fff; color: var(--blue); }
.invite-accept:hover { transform: scale(1.02); }
.invite-decline { background: rgba(255,255,255,0.2); color: #fff; }

/* ==================== GAME HEADER ==================== */
.game-screen { flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.game-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  min-height: 56px; flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.btn-icon {
  width: 36px; height: 36px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-card); color: var(--text-primary); }
.header-title { font-family: "Bebas Neue", sans-serif; font-size: 22px; letter-spacing: 3px; color: var(--text-primary); }
.header-center { position: absolute; left: 50%; transform: translateX(-50%); }
.score-bar { display: flex; align-items: center; gap: 4px; background: var(--bg-card); border-radius: 50px; padding: 4px 6px; border: 1px solid var(--border); }
.score-team { display: flex; flex-direction: column; align-items: center; padding: 4px 14px; border-radius: 50px; transition: all var(--transition); }
.score-team.active-team { box-shadow: inset 0 0 12px rgba(255,255,255,0.1); }
.score-red { color: var(--red-light); }
.score-red.active-team { background: var(--red-bg); }
.score-blue { color: var(--blue-light); }
.score-blue.active-team { background: var(--blue-bg); }
.score-count { font-size: 22px; font-weight: 900; line-height: 1; }
.score-label { font-size: 9px; font-weight: 800; letter-spacing: 1.5px; opacity: 0.7; }
.score-divider { color: var(--text-muted); font-weight: 300; font-size: 18px; }
.header-right { display: flex; align-items: center; gap: 8px; }

/* Role Badge */
.role-badge {
  display: flex; align-items: center; padding: 6px 14px; border-radius: 50px;
  font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid var(--border-light);
}
.role-badge-red { background: var(--red-bg); color: var(--red-light); border-color: rgba(220,53,69,0.3); }
.role-badge-blue { background: var(--blue-bg); color: var(--blue-light); border-color: rgba(43,125,233,0.3); }

/* Spymaster Toggle (local only) */
.btn-spymaster {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1px solid var(--border-light); border-radius: 50px; background: var(--bg-card);
  color: var(--text-secondary); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn-spymaster:hover { border-color: rgba(255,255,255,0.2); color: var(--text-primary); }
.btn-spymaster.active {
  background: linear-gradient(135deg, rgba(255,200,50,0.25), rgba(255,150,50,0.25));
  border-color: rgba(255,200,50,0.5); color: #ffcc00;
  box-shadow: 0 0 10px rgba(255,200,50,0.2);
}

/* ==================== TURN BAR ==================== */
.turn-bar {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  flex-shrink: 0; flex-wrap: wrap; transition: background var(--transition);
}
.turn-bar.turn-red { background: linear-gradient(90deg, rgba(239,68,68,0.14) 0%, var(--bg-secondary) 100%); border-bottom-color: rgba(239,68,68,0.25); }
.turn-bar.turn-blue { background: linear-gradient(90deg, rgba(59,139,255,0.14) 0%, var(--bg-secondary) 100%); border-bottom-color: rgba(59,139,255,0.25); }
.turn-indicator { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.turn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.turn-dot.dot-red { background: var(--red); box-shadow: 0 0 10px rgba(239,68,68,0.6); }
.turn-dot.dot-blue { background: var(--blue); box-shadow: 0 0 10px rgba(59,139,255,0.6); }
.turn-text { font-size: 15px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.clue-area { flex: 1; display: flex; justify-content: center; }
.clue-display { display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 50px; padding: 6px 16px; }
.clue-word { font-size: 16px; font-weight: 800; color: var(--text-primary); letter-spacing: 1px; }
.clue-number { font-size: 16px; font-weight: 900; color: #ffcc00; background: rgba(255,204,0,0.12); padding: 2px 10px; border-radius: 20px; text-shadow: 0 0 6px rgba(255,204,0,0.3); }
.guesses-left { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.clue-input-area { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.clue-input {
  background: var(--bg-card); border: 1.5px solid var(--border-light); border-radius: var(--radius-md);
  padding: 12px 16px; color: var(--text-primary); font-size: 16px; font-weight: 600;
  flex: 1; min-width: 140px; outline: none; transition: border-color var(--transition);
}
.clue-input:focus { border-color: var(--blue); box-shadow: 0 0 8px rgba(59,139,255,0.2); }
.clue-input::placeholder { color: var(--text-muted); }
.clue-count-input {
  background: var(--bg-card); border: 1.5px solid var(--border-light); border-radius: var(--radius-md);
  padding: 12px 10px; color: var(--text-primary); font-size: 16px; font-weight: 700;
  width: 56px; text-align: center; outline: none; -moz-appearance: textfield; appearance: textfield;
}
.clue-count-input::-webkit-outer-spin-button, .clue-count-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.clue-count-input:focus { border-color: var(--blue); box-shadow: 0 0 8px rgba(59,139,255,0.2); }
.clue-count-input::placeholder { color: var(--text-muted); }
.btn-give-clue { padding: 12px 24px; border: none; border-radius: var(--radius-md); background: var(--blue); color: white; font-size: 15px; font-weight: 700; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-give-clue:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,139,255,0.3); }
.btn-end-turn { padding: 12px 22px; border: 1.5px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-elevated); color: var(--text-primary); font-size: 15px; font-weight: 700; cursor: pointer; transition: all var(--transition); flex-shrink: 0; white-space: nowrap; }
.btn-end-turn:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }

/* ==================== GAME BOARD ==================== */
.board-container { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
.board {
  display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(5, 1fr);
  gap: 6px; width: 100%; max-width: 900px; aspect-ratio: 6 / 4.2;
  max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px);
}

/* ==================== CARDS ==================== */
.card {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--bg-card) 0%, #1a1d32 100%); border: 2px solid var(--border-light); border-radius: var(--radius-md);
  cursor: pointer; transition: all 0.15s ease; overflow: hidden; padding: 4px;
}
.card.no-click { cursor: default; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity var(--transition); }
.card:hover:not(.revealed):not(.game-ended):not(.no-click) { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 12px rgba(139,92,246,0.15); border-color: rgba(255,255,255,0.3); }
.card:hover:not(.revealed):not(.game-ended):not(.no-click)::before { opacity: 1; background: rgba(255,255,255,0.04); }
.card:active:not(.revealed):not(.game-ended):not(.no-click) { transform: translateY(0) scale(0.97); }
.card-word { font-size: clamp(5px, 1vw, 11px); font-weight: 800; text-align: center; letter-spacing: 0.1px; text-transform: uppercase; line-height: 1.2; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.card-word-long { font-size: clamp(4px, 0.8vw, 9px); letter-spacing: -0.3px; }
.card-word-xlong { font-size: clamp(3.5px, 0.7vw, 7.5px); letter-spacing: -0.5px; }
.card-reveal-icon { position: absolute; bottom: 4px; right: 4px; opacity: 0.5; z-index: 1; }

/* Guider View */
.card.spy-red { border-color: var(--red); background: linear-gradient(135deg, rgba(239,68,68,0.35) 0%, rgba(239,68,68,0.15) 100%); }
.card.spy-red::after { content: ""; position: absolute; top: 4px; left: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); opacity: 1; box-shadow: 0 0 8px rgba(239,68,68,0.6); }
.card.spy-red .card-word { color: #ffd0d0; }
.card.spy-blue { border-color: var(--blue); background: linear-gradient(135deg, rgba(59,139,255,0.35) 0%, rgba(59,139,255,0.15) 100%); }
.card.spy-blue::after { content: ""; position: absolute; top: 4px; left: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); opacity: 1; box-shadow: 0 0 8px rgba(59,139,255,0.6); }
.card.spy-blue .card-word { color: #d0e4ff; }
.card.spy-passive { border-color: var(--passive); background: linear-gradient(135deg, rgba(201,162,88,0.28) 0%, rgba(201,162,88,0.12) 100%); }
.card.spy-passive::after { content: ""; position: absolute; top: 4px; left: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--passive); opacity: 0.85; }
.card.spy-death_red {
  border-color: #ff2222;
  border-width: 2.5px;
  background: #050505;
  box-shadow: inset 0 0 30px rgba(255, 0, 0, 0.12), 0 0 14px rgba(255, 0, 0, 0.25);
}
.card.spy-death_red::after {
  content: "\2620";
  position: absolute; top: 3px; left: 5px;
  font-size: 14px; line-height: 1; color: #ff4444;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(255, 68, 68, 0.8));
}
.card.spy-death_red .card-word { color: #ff4444; text-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }

.card.spy-death_blue {
  border-color: #4488ff;
  border-width: 2.5px;
  background: #050505;
  box-shadow: inset 0 0 30px rgba(68, 136, 255, 0.12), 0 0 14px rgba(68, 136, 255, 0.25);
}
.card.spy-death_blue::after {
  content: "\2620";
  position: absolute; top: 3px; left: 5px;
  font-size: 14px; line-height: 1; color: #4488ff;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(68, 136, 255, 0.8));
}
.card.spy-death_blue .card-word { color: #4488ff; text-shadow: 0 0 10px rgba(68, 136, 255, 0.5); }

/* Revealed */
.card.revealed { cursor: default; transform: none; }
.card.card-flip-out { animation: flipOut 0.25s ease-in forwards; pointer-events: none; }
.card.card-flip-in { animation: flipIn 0.25s ease-out forwards; }
.card.revealed-red { background: linear-gradient(135deg, #f04555 0%, #c82333 100%); border-color: #f04555; box-shadow: 0 2px 16px rgba(239,68,68,0.4); }
.card.revealed-red .card-word { color: white; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.card.revealed-blue { background: linear-gradient(135deg, #4a94ff 0%, #2468d4 100%); border-color: #4a94ff; box-shadow: 0 2px 16px rgba(59,139,255,0.4); }
.card.revealed-blue .card-word { color: white; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.card.revealed-passive { background: linear-gradient(135deg, #c9a258 0%, #a07c3a 100%); border-color: #c9a258; opacity: 0.75; }
.card.revealed-passive .card-word { color: #fdf3dc; }
.card.revealed-death_red {
  background: #040404;
  border-color: #ff2222; border-width: 2.5px;
  box-shadow: 0 0 28px rgba(255, 0, 0, 0.45), inset 0 0 24px rgba(255, 0, 0, 0.08);
  animation: deathReveal 0.5s ease;
}
.card.revealed-death_red .card-word { color: #ff3333; text-shadow: 0 0 14px rgba(255, 0, 0, 0.7); }
.card.revealed-death_blue {
  background: #040404;
  border-color: #4488ff; border-width: 2.5px;
  box-shadow: 0 0 28px rgba(68, 136, 255, 0.45), inset 0 0 24px rgba(68, 136, 255, 0.08);
  animation: deathReveal 0.5s ease;
}
.card.revealed-death_blue .card-word { color: #4488ff; text-shadow: 0 0 14px rgba(68, 136, 255, 0.7); }
@keyframes deathReveal {
  0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 rgba(255,0,0,0); }
  40% { transform: scale(1.08); box-shadow: 0 0 40px rgba(255,0,0,0.6); }
  70% { transform: scale(0.98); }
  100% { transform: scale(1); box-shadow: 0 0 24px rgba(255,0,0,0.4); }
}
.card.game-ended { opacity: 0.5; cursor: default; }
.card.game-ended.spy-death_red, .card.game-ended.spy-death_blue { opacity: 0.75; }
.card.game-ended:hover { transform: none; box-shadow: none; }

/* ==================== COUNTDOWN OVERLAY ==================== */
.countdown-overlay {
  position: fixed; inset: 0; background: rgba(10,12,20,0.95); backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center; z-index: 550;
}
.countdown-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
.countdown-card {
  text-align: center; padding: 40px 32px;
}
.countdown-message {
  font-size: 18px; font-weight: 700; color: var(--text-secondary);
  margin-bottom: 24px; letter-spacing: 0.5px; line-height: 1.5;
}
.countdown-message .team-name-red { color: var(--red-light); font-weight: 900; }
.countdown-message .team-name-blue { color: var(--blue-light); font-weight: 900; }
.countdown-number {
  font-family: "Bebas Neue", sans-serif;
  font-size: 120px; font-weight: 400; line-height: 1;
  color: var(--text-primary); letter-spacing: 4px;
  animation: countdownPulse 1s ease-in-out infinite;
}
@keyframes countdownPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
}

/* ==================== GAME OVER ==================== */
.game-over-overlay {
  position: fixed; inset: 0; background: rgba(15,17,23,0.85); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; z-index: 500;
}
.game-over-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.game-over-card {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 40px 32px; text-align: center; max-width: 380px; width: 90%; box-shadow: var(--shadow-xl);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.game-over-icon { margin-bottom: 16px; }
.game-over-title { font-size: 28px; font-weight: 900; margin-bottom: 8px; letter-spacing: 1px; }
.game-over-message { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.5; }
.game-over-actions { display: flex; flex-direction: column; gap: 0; }

/* ==================== SIDE MENU ==================== */
.side-menu-overlay { position: fixed; inset: 0; background: rgba(15,17,23,0.6); backdrop-filter: blur(4px); z-index: 600; display: none; }
.side-menu-overlay.active { display: block; }
.side-menu {
  position: fixed; top: 0; left: 0; width: 300px; height: 100%; background: var(--bg-secondary);
  border-right: 1px solid var(--border); box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column; animation: slideInLeft 0.25s ease;
}
@keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.side-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.side-menu-header h3 { font-size: 16px; font-weight: 700; }
.side-menu-body { flex: 1; overflow-y: auto; padding: 12px 0; }
.side-menu-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  border: none; background: transparent; color: var(--text-primary); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background var(--transition); text-align: left;
}
.side-menu-item:hover { background: var(--bg-card); }
.side-menu-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }
.side-menu-section { padding: 8px 20px; }
.side-menu-section h4 { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px; }
.clue-log { display: flex; flex-direction: column; gap: 6px; }
.clue-log-empty { font-size: 13px; color: var(--text-muted); }
.clue-log-entry { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-card); }
.clue-log-red { border-left: 3px solid var(--red); }
.clue-log-blue { border-left: 3px solid var(--blue); }
.clue-log-team { font-size: 11px; font-weight: 800; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.clue-log-red .clue-log-team { background: var(--red-bg); color: var(--red-light); }
.clue-log-blue .clue-log-team { background: var(--blue-bg); color: var(--blue-light); }
.clue-log-word { font-size: 13px; font-weight: 700; color: var(--text-primary); flex: 1; }
.clue-log-count { font-size: 13px; font-weight: 800; color: var(--text-secondary); background: var(--bg-elevated); padding: 2px 8px; border-radius: 10px; }

/* ==================== ANIMATIONS ==================== */
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.shake { animation: shake 0.4s ease; }
@keyframes flipOut {
  0% { transform: perspective(600px) rotateY(0deg); }
  100% { transform: perspective(600px) rotateY(90deg); }
}
@keyframes flipIn {
  0% { transform: perspective(600px) rotateY(90deg); }
  100% { transform: perspective(600px) rotateY(0deg); }
}

.board .card:not(.revealed) { animation: cardEntry 0.3s ease backwards; }
.board .card:nth-child(1)  { animation-delay: 0.02s; } .board .card:nth-child(2)  { animation-delay: 0.04s; }
.board .card:nth-child(3)  { animation-delay: 0.06s; } .board .card:nth-child(4)  { animation-delay: 0.08s; }
.board .card:nth-child(5)  { animation-delay: 0.10s; } .board .card:nth-child(6)  { animation-delay: 0.12s; }
.board .card:nth-child(7)  { animation-delay: 0.14s; } .board .card:nth-child(8)  { animation-delay: 0.16s; }
.board .card:nth-child(9)  { animation-delay: 0.18s; } .board .card:nth-child(10) { animation-delay: 0.20s; }
.board .card:nth-child(11) { animation-delay: 0.22s; } .board .card:nth-child(12) { animation-delay: 0.24s; }
.board .card:nth-child(13) { animation-delay: 0.26s; } .board .card:nth-child(14) { animation-delay: 0.28s; }
.board .card:nth-child(15) { animation-delay: 0.30s; } .board .card:nth-child(16) { animation-delay: 0.32s; }
.board .card:nth-child(17) { animation-delay: 0.34s; } .board .card:nth-child(18) { animation-delay: 0.36s; }
.board .card:nth-child(19) { animation-delay: 0.38s; } .board .card:nth-child(20) { animation-delay: 0.40s; }
.board .card:nth-child(21) { animation-delay: 0.42s; } .board .card:nth-child(22) { animation-delay: 0.44s; }
.board .card:nth-child(23) { animation-delay: 0.46s; } .board .card:nth-child(24) { animation-delay: 0.48s; }
.board .card:nth-child(25) { animation-delay: 0.50s; }
.board .card:nth-child(26) { animation-delay: 0.52s; } .board .card:nth-child(27) { animation-delay: 0.54s; }
.board .card:nth-child(28) { animation-delay: 0.56s; } .board .card:nth-child(29) { animation-delay: 0.58s; }
.board .card:nth-child(30) { animation-delay: 0.60s; }
@keyframes cardEntry { from { opacity: 0; transform: translateY(8px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.score-team.active-team .score-count { animation: scorePulse 2s ease-in-out infinite; }
@keyframes scorePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .game-header { padding: 8px 12px; min-height: 48px; }
  .header-title { font-size: 18px; letter-spacing: 2px; }
  .score-count { font-size: 18px; }
  .score-team { padding: 4px 10px; }
  .score-label { font-size: 8px; }
  .btn-spymaster { padding: 6px 10px; font-size: 11px; }
  .btn-spymaster svg { width: 14px; height: 14px; }
  .role-badge { padding: 4px 10px; font-size: 10px; }
  .turn-bar { padding: 8px 12px; gap: 8px; }
  .turn-text { font-size: 12px; }
  .clue-input { min-width: 100px; padding: 10px 12px; font-size: 15px; }
  .clue-count-input { width: 50px; padding: 10px 8px; font-size: 15px; }
  .btn-give-clue { padding: 10px 18px; font-size: 14px; }
  .btn-end-turn { padding: 10px 16px; font-size: 14px; }
  .board-container { padding: 8px; }
  .board { gap: 4px; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); }
  .card { border-radius: var(--radius-sm); border-width: 1.5px; }
  .card-word { font-size: clamp(5.5px, 1.8vw, 10px); letter-spacing: 0; }
  .card-word-long { font-size: clamp(4.5px, 1.4vw, 8px); letter-spacing: -0.3px; }
  .card-word-xlong { font-size: clamp(3.5px, 1.2vw, 6.5px); letter-spacing: -0.5px; }
  .lobby-teams { grid-template-columns: 1fr; gap: 12px; }
  .lobby-team { min-height: auto; }
}

@media (max-width: 480px) {
  .header-center { position: static; transform: none; order: 3; width: 100%; display: flex; justify-content: center; margin-top: -4px; }
  .game-header { flex-wrap: wrap; padding: 8px 10px 4px; }
  .score-bar { padding: 2px 4px; }
  .score-team { padding: 2px 8px; }
  .score-count { font-size: 16px; }
  .clue-display { padding: 4px 12px; gap: 6px; }
  .clue-word { font-size: 14px; }
  .clue-number { font-size: 14px; padding: 1px 8px; }
  .turn-bar { padding: 6px 10px; }
  .clue-input-area { gap: 6px; }
  .clue-input { min-width: 90px; padding: 10px 10px; font-size: 14px; }
  .clue-count-input { width: 46px; padding: 10px 6px; font-size: 14px; }
  .btn-give-clue { padding: 10px 14px; font-size: 13px; }
  .btn-end-turn { padding: 10px 12px; font-size: 13px; }
  .board { gap: 3px; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
  .card { border-radius: 6px; padding: 2px; }
  .card-word { font-size: clamp(5px, 2.2vw, 9px); letter-spacing: 0; }
  .card-word-long { font-size: clamp(4px, 1.7vw, 7px); letter-spacing: -0.3px; }
  .card-word-xlong { font-size: clamp(3px, 1.4vw, 5.5px); letter-spacing: -0.5px; }
  .card.spy-red::after, .card.spy-blue::after, .card.spy-passive::after { width: 6px; height: 6px; top: 3px; left: 3px; }
  .card.spy-death_red::after, .card.spy-death_blue::after { font-size: 11px; top: 2px; left: 3px; }
  .card-reveal-icon { bottom: 2px; right: 2px; }
  .card-reveal-icon svg { width: 14px; height: 14px; }
  .side-menu { width: 260px; }
  .logo-title { font-size: 42px; letter-spacing: 5px; }
  .logo-icon { width: 56px; height: 56px; }
  .logo-crosshair { width: 24px; height: 24px; }
  .setup-card { padding: 24px 20px; }
  .lobby-header { flex-wrap: wrap; }
  .lobby-code { font-size: 18px; }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
