*, *::before, *::after {
  box-sizing: border-box;
  min-width: 0;
}

:root {
  --bg: #070b14;
  --bg-2: #0f172a;
  --surface: rgba(17, 24, 39, 0.78);
  --surface-2: rgba(30, 41, 59, 0.92);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --muted: #94a3b8;

  --violet: #8b5cf6;
  --indigo: #6366f1;
  --cyan: #06b6d4;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --gold: #facc15;

  --prizma-gradient: linear-gradient(
    135deg,
    #8b5cf6 0%,
    #6366f1 22%,
    #06b6d4 45%,
    #22c55e 65%,
    #f59e0b 82%,
    #ef4444 100%
  );

  --glass-gradient: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.015)
  );

  --primary-gradient: linear-gradient(135deg, #8b5cf6, #6366f1);
  --gold-gradient: linear-gradient(135deg, #facc15, #eab308);
  --danger-gradient: linear-gradient(135deg, #ef4444, #b91c1c);

  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
  --shadow-glow: 0 0 24px rgba(139, 92, 246, 0.18);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.10), transparent 24%),
    radial-gradient(circle at bottom center, rgba(34, 197, 94, 0.06), transparent 30%),
    linear-gradient(180deg, #050816 0%, #0b1220 50%, #0f172a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background:
    linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.04) 35%, transparent 48%),
    linear-gradient(160deg, transparent 35%, rgba(139,92,246,0.05) 50%, transparent 62%);
}


/* ─── Screen & Panel Width Fix ───────────────────────────────────────────── */
.screen,
#adminAddQuestionPanel,
#adminQuestionListPanel,
#friendsCreateScreen,
#friendsWaitingScreen,
#friendsPlayScreen,
#friendsResultScreen {
  width: 100%;
  max-width: 100%;
}

.form-stack,
.form-stack > * {
  max-width: 100%;
  width: 100%;
}

input, select, textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
}

.phone-frame {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background: linear-gradient(180deg, rgba(5,8,22,0.94), rgba(10,16,30,0.97));
  border-left: 1px solid rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.35);
  overflow-x: hidden;
  overflow-y: auto;
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(139,92,246,0.10), transparent 20%),
    radial-gradient(circle at 80% 8%, rgba(6,182,212,0.10), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(245,158,11,0.05), transparent 22%);
}

.app-shell {
  min-height: 100vh;
  padding: 18px 16px 98px;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.6px;
}

.brand-gradient {
  background: var(--prizma-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.small-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.card {
  background: var(--glass-gradient);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 26px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(10,16,30,0.84), rgba(10,16,30,0.84)) padding-box,
    linear-gradient(135deg, rgba(139,92,246,0.18), rgba(6,182,212,0.10), rgba(255,255,255,0.04)) border-box;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.hero-card {
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -50px;
  top: -60px;
  background: radial-gradient(circle, rgba(139,92,246,0.14), transparent 65%);
  pointer-events: none;
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
}

.hero-card p {
  margin-bottom: 0;
}

.wallet-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:
    linear-gradient(rgba(10,16,30,0.80), rgba(10,16,30,0.80)) padding-box,
    linear-gradient(135deg, rgba(250,204,21,0.35), rgba(139,92,246,0.26), rgba(6,182,212,0.20)) border-box;
  box-shadow:
    var(--shadow-soft),
    0 0 18px rgba(250, 204, 21, 0.08);
}

.badge {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
}

.form-stack {
  display: grid;
  gap: 10px;
}

input,
select,
button {
  width: 100%;
  max-width: 100%;
  border: none;
  outline: none;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 14px;
  box-sizing: border-box;
}

input,
select {
  background: rgba(36, 48, 72, 0.76);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.05);
  transition: 0.18s ease;
}

input::placeholder {
  color: #8d9ab0;
}

input:focus,
select:focus {
  border-color: rgba(99,102,241,0.65);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

button {
  cursor: pointer;
  color: white;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: scale(0.985);
}

.primary-btn {
  background: var(--primary-gradient);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.20);
}

.secondary-btn {
  background: linear-gradient(135deg, #334155, #475569);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-card {
  text-align: left;
  min-height: 102px;
  background:
    linear-gradient(rgba(15,23,42,0.92), rgba(15,23,42,0.92)) padding-box,
    linear-gradient(135deg, rgba(99,102,241,0.22), rgba(6,182,212,0.10), rgba(255,255,255,0.04)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(0,0,0,0.16);
}

.active-mode {
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.24) inset,
    0 0 18px rgba(139,92,246,0.12);
  transform: translateY(-1px);
}

.mode-title {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.mode-desc {
  display: block;
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 400;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.category-card {
  min-height: 102px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  color: white;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(10,16,30,0.96));
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.05) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
  pointer-events: none;
}

.category-card:hover::after {
  transform: translateX(120%);
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.22);
}

.category-card.sports::before {
  background: linear-gradient(135deg, rgba(6,182,212,0.20), rgba(34,197,94,0.08), transparent 65%);
}

.category-card.politics::before {
  background: linear-gradient(135deg, rgba(139,92,246,0.20), rgba(239,68,68,0.08), transparent 65%);
}

.category-card.movies::before {
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(239,68,68,0.06), transparent 65%);
}

.category-icon {
  font-size: 24px;
  position: relative;
  z-index: 1;
}

.category-name {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  position: relative;
  z-index: 1;
}

.category-mode {
  font-size: 12px;
  color: #aeb9c9;
  position: relative;
  z-index: 1;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.message {
  min-height: 22px;
  margin-top: 10px;
  font-size: 14px;
  white-space: pre-wrap;
}

.muted {
  color: var(--muted);
}

.mini-user {
  background:
    linear-gradient(rgba(17,24,39,0.85), rgba(17,24,39,0.85)) padding-box,
    linear-gradient(135deg, rgba(250,204,21,0.28), rgba(139,92,246,0.22)) border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: 0 0 16px rgba(250,204,21,0.07);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(8, 12, 24, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.05);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 18px;
  z-index: 20;
}

.nav-btn {
  background: linear-gradient(135deg, #1f2937, #273449);
  border-radius: 16px;
  padding: 12px 10px;
}

.active-nav {
  background: var(--primary-gradient);
  box-shadow: var(--shadow-glow);
}

.danger-nav {
  background: var(--danger-gradient);
}

.result-good {
  color: #86efac;
}

.result-bad {
  color: #fca5a5;
}

.hidden {
  display: none !important;
}

@media (max-width: 380px) {
  .button-row,
  .mode-grid,
  .category-grid,
  .bottom-nav {
    grid-template-columns: 1fr 1fr;
  }
}
/* ─── Back Button ─────────────────────────────────────────────────────────── */
.back-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  width: auto !important;
  min-width: unset;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
  transform: none;
}

/* ─── Progress Bar ────────────────────────────────────────────────────────── */
.progress-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--prizma-gradient);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ─── Wallet Balances ────────────────────────────────────────────────────── */
.wallet-balances {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wallet-balances h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.wallet-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
}

.mini-divider {
  color: rgba(255, 255, 255, 0.25);
  margin: 0 2px;
  font-size: 11px;
}

/* ─── Friends ────────────────────────────────────────────────────────────── */
.card-selected {
  border: 1px solid rgba(139, 92, 246, 0.6) !important;
  background: rgba(139, 92, 246, 0.08) !important;
}

/* Soru sayısı grid */
.count-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.count-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.count-btn span { font-size: 20px; font-weight: 700; color: var(--text); }
.count-btn small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.count-btn:hover:not(:disabled) { border-color: rgba(139,92,246,0.5); background: rgba(139,92,246,0.08); }
.count-btn.count-selected { border-color: #8b5cf6; background: rgba(139,92,246,0.15); }
.disabled-count { opacity: 0.35; cursor: not-allowed; }

/* Waiting room */
.players-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 10px 14px;
}
.player-name { font-size: 14px; font-weight: 600; }
.player-status { font-size: 14px; }

/* Loading dots */
.loading-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.loading-dots span {
  width: 8px; height: 8px;
  background: var(--muted);
  border-radius: 50%;
  animation: dot-bounce 1.2s infinite ease-in-out;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Results */
.result-card { margin-bottom: 0; }
.result-question { font-size: 15px; font-weight: 600; margin: 6px 0 12px; }
.result-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.result-bar-row { display: flex; align-items: center; gap: 8px; }
.result-option {
  font-size: 12px;
  color: var(--muted);
  width: 90px;
  min-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-option.my-pick { color: #a78bfa; font-weight: 700; }
.result-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}
.result-bar-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.fill-a { background: linear-gradient(90deg, #8b5cf6, #6366f1); }
.fill-b { background: linear-gradient(90deg, #ec4899, #f43f5e); }
.result-pct { font-size: 12px; color: var(--muted); width: 32px; text-align: right; }

/* Player answers */
.player-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.player-ans-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.ans-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.ans-A { background: rgba(139,92,246,0.2); color: #a78bfa; }
.ans-B { background: rgba(236,72,153,0.2); color: #f472b6; }
.ans-none { background: rgba(255,255,255,0.06); color: var(--muted); }

/* ─── Admin Form ─────────────────────────────────────────────────────────── */
.admin-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

.admin-row > div {
  min-width: 0;
  flex: 1;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  padding: 10px 0;
}
.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #8b5cf6;
  cursor: pointer;
}

textarea {
  background: var(--input-bg, rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
textarea:focus {
  outline: none;
  border-color: rgba(139,92,246,0.5);
}

/* Önizleme */
.preview-media {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}
.preview-option {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
.preview-a { background: rgba(139,92,246,0.15); color: #a78bfa; }
.preview-b { background: rgba(236,72,153,0.15); color: #f472b6; }

/* ─── Question Media ─────────────────────────────────────────────────────── */
.question-media-slot { margin-bottom: 4px; }

.question-media {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 14px;
  margin-bottom: 12px;
  display: block;
  background: rgba(255,255,255,0.03);
}

/* ─── Option Blocks (Admin) ──────────────────────────────────────────────── */
.option-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
  width: 100%;
}
.option-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.option-label-badge {
  background: rgba(139,92,246,0.2);
  color: #a78bfa;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}
.remove-option-btn {
  background: rgba(239,68,68,0.1);
  border: none;
  color: #fca5a5;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  width: auto;
}
.remove-option-btn:hover { background: rgba(239,68,68,0.2); transform: none; }
.opt-media-fields { display: flex; flex-direction: column; gap: 6px; }
.opt-preview img, .opt-preview video {
  width: 100%; max-height: 120px;
  object-fit: cover; border-radius: 10px;
}
.opt-preview-text { font-size: 12px; color: var(--muted); }

/* Preview options grid */
.preview-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.preview-option-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.preview-option-card img, .preview-option-card video {
  width: 100%; max-height: 80px;
  object-fit: cover; border-radius: 8px;
}

/* ─── Game Option Buttons ────────────────────────────────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.option-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 14px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  text-align: center;
  width: 100%;
}
.option-btn:hover:not(:disabled) {
  border-color: rgba(139,92,246,0.5);
  background: rgba(139,92,246,0.08);
  transform: translateY(-2px);
}
.option-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.option-btn img, .option-btn video {
  width: 100%;
  max-height: 100px;
  object-fit: cover;
  border-radius: 10px;
}
.option-btn-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* ─── Admin Tabs ─────────────────────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 6px;
}
.admin-tab {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--muted);
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-tab.active-tab {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.4);
  color: #a78bfa;
}

/* ─── Question List ──────────────────────────────────────────────────────── */
.question-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 12px 14px;
}
.question-list-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.question-list-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #a78bfa;
  font-weight: 700;
}
.question-list-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.question-list-meta {
  font-size: 11px;
  color: var(--muted);
}
.question-list-actions { flex-shrink: 0; }
.edit-q-btn { font-size: 12px; padding: 6px 12px; }

/* ─── Auto-width exceptions ──────────────────────────────────────────────── */
.back-btn,
.remove-option-btn,
.admin-tab,
.count-btn,
.badge,
.edit-q-btn {
  width: auto !important;
  max-width: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.admin-tabs {
  display: flex;
  gap: 6px;
}

.admin-tabs .admin-tab {
  flex: 1;
  display: flex !important;
}

/* ─── Phase Label ─────────────────────────────────────────────────────────── */
.phase-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  display: inline-block;
}
.phase-own     { background: rgba(139,92,246,0.18); color: #a78bfa; }
.phase-predict { background: rgba(251,146,60,0.18); color: #fb923c; }

.selected-own {
  border-color: #fb923c !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 2px rgba(251,146,60,0.3);
}
.faded-own {
  opacity: 0.45 !important;
}

/* ─── Winner Banner ───────────────────────────────────────────────────────── */
.winner-banner { text-align: center; padding: 24px 16px; }
.winner-crown  { font-size: 40px; margin: 0 0 8px; }
.winner-name   { font-size: 20px; font-weight: 800; color: var(--text); }
.winner-score  { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ─── Score Table ─────────────────────────────────────────────────────────── */
.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
}
.score-row-me  { color: #a78bfa; font-weight: 700; }
.score-rank    { width: 24px; font-weight: 700; color: var(--muted); }
.score-name    { flex: 1; }
.score-pts     { font-weight: 700; }

/* ─── Result Enhancements ─────────────────────────────────────────────────── */
.majority-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.majority-pick  { color: #4ade80 !important; font-weight: 700; }

.pred-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.pred-ok   { background: rgba(74,222,128,0.15); color: #4ade80; }
.pred-fail { background: rgba(248,113,113,0.15); color: #f87171; }

/* ─── File Upload Button ──────────────────────────────────────────────────── */
.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(139,92,246,0.12);
  color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  width: fit-content;
}
.file-upload-label:hover {
  background: rgba(139,92,246,0.22);
}

/* ─── Room List ───────────────────────────────────────────────────────────── */
.room-list-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  margin-bottom: 10px;
}
.room-list-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.room-list-cat  { font-weight: 700; font-size: 15px; color: var(--text); }
.room-list-meta { font-size: 12px; color: var(--muted); }
.room-status {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}
.room-status-done { color: #4ade80; }
.room-status-wait { color: #fb923c; }
.room-status-play { color: #a78bfa; }
.room-list-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.room-list-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.room-list-btn.muted-btn {
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  cursor: default;
}
.room-delete-btn {
  flex: 0 0 auto;
  width: 48px;
  padding: 11px 0;
  border-radius: 12px;
  border: 1px solid rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.1);
  color: #f87171;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
