:root {
  /* Modern Playful Theme */
  --bg-color: #F87171;
  /* Soft Red/Orange Base */
  --bg-gradient: linear-gradient(135deg, #F97316 0%, #F59E0B 100%);
  /* Orange to Amber */

  --card-bg: #FFFFFF;
  --card-border: none;
  --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --text-primary: #1E293B;
  /* Slate 800 */
  --text-secondary: #64748B;
  /* Slate 500 */

  /* Brand Colors */
  --primary: #F97316;
  /* Orange 500 */
  --primary-hover: #EA580C;
  /* Orange 600 */
  --primary-glow: rgba(249, 115, 22, 0.3);

  --accent: #84CC16;
  /* Lime 500 - Valid Success/Go color */
  --accent-glow: rgba(132, 204, 22, 0.3);

  /* Feedback Colors */
  --success: #22C55E;
  --error: #EF4444;

  /* Spacing & Radius */
  --radius-lg: 24px;
  /* Big rounded corners */
  --radius-md: 16px;
  --spacing-md: 1.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.5;
}

/* Card Styling (Formerly Glass) */
.glass-panel {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  /* Remove backdrop blur as we are solid now, but keep transition */
  transition: transform 0.2s ease;
}

.container {
  width: 100%;
  max-width: 420px;
  /* Slightly narrower for mobile card feel */
  padding: 1.5rem;
  margin: 0 auto;
}

/* Wider Container for Livescore (Desktop) */
@media (min-width: 768px) {
  .container.container-wide {
    max-width: 800px;
  }
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
  background: none;
  /* Removed gradient text for cleaner look */
  -webkit-text-fill-color: initial;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}

/* Inputs & Buttons */
.input-group {
  margin-bottom: 1.5rem;
}

input[type="text"] {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 9999px;
  /* Pill shape */
  border: 2px solid #E2E8F0;
  /* Slate 200 */
  background: #F8FAFC;
  /* Slate 50 */
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
  text-align: center;
}

input[type="text"]:focus {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

a,
.text-link {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px dashed var(--text-secondary);
  transition: all 0.2s;
}

a:hover,
.text-link:hover {
  color: var(--primary);
  border-color: var(--primary);
}


::placeholder {
  color: #94A3B8;
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 9999px;
  /* Pill shape */
  background: var(--text-primary);
  /* Dark button for contrast on white card */
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-primary:hover {
  background: #0f172a;
  /* Darker Slate */
}

/* Setup for different pages */
.page {
  display: none;
  width: 100%;
  /* animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1); */
}

.page.active {
  display: flex !important;
  flex-direction: column;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Livescore Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.livescore-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.livescore-table th {
  text-align: left;
  padding: 1rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 2px solid #F1F5F9;
}

.livescore-table td {
  padding: 1rem;
  background: transparent;
  color: var(--text-primary);
  border-bottom: 1px solid #F1F5F9;
  font-weight: 500;
}

.livescore-table tr:last-child td {
  border-bottom: none;
}

/* Rank Colors */
.rank-1 {
  color: #fbbf24;
  font-weight: 800;
}

.rank-2 {
  color: #94a3b8;
  font-weight: 800;
}

.rank-3 {
  color: #b45309;
  font-weight: 800;
}

/* Custom Overrides for JS injected elements */
/* Button in choices container */
#choices-container button {
  background: var(--bg-gradient) !important;
  /* Make option buttons colorful */
  color: white !important;
  /* border-radius: var(--radius-md) !important;
   */
  border-radius: 1.5rem;
  /* ≈ rounded-2xl */
  overflow: hidden;
  /* penting kalau ada child */
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s;
}

#choices-container button:active {
  transform: scale(0.95);
}

/* Text Colors */
#test-username-display {
  color: var(--text-secondary) !important;
}

#timer {
  color: var(--primary) !important;
}

#progress {
  color: var(--text-secondary) !important;
}

/* Scores */
#final-score {
  background: none !important;
  color: var(--primary);
  -webkit-text-fill-color: initial !important;
}

.btn-primary {
  background: #A687FF;
  box-shadow: 0 8px 20px rgba(166, 135, 255, 0.4);
  backdrop-filter: blur(6px);
}

.btn-primary:hover {
  background-color: #8f6cff;
  /* versi lebih gelap saat hover */
}


.btn-confirm {
  background-color: #A687FF;
  box-shadow: 0 10px 25px rgba(166, 135, 255, 0.4);
  /* background-color: #F28C38; */
  /* sesuaikan dengan tema (orange di contoh) */
  color: #fff;
  border: none;
  padding: 0.9rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 999px;
  /* pill / super rounded */
  cursor: pointer;
  transition: all 0.2s ease;
  /* box-shadow: 0 10px 25px rgba(242, 140, 56, 0.4); */
}

.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(242, 140, 56, 0.55);
}

.btn-confirm:active {
  transform: scale(0.97);
}


.qa-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
}

.question-text {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 2rem;
  color: #1f2937;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.choice-btn {
  width: 100%;
  padding: 1.15rem;
  border-radius: 999px;
  border: none;
  border-radius: 999px;
  /* kunci utama */

  background: #A9C07A;
  color: #ffffff;

  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;

  box-shadow: 0 12px 28px rgba(169, 192, 122, .35);
  transition: all .15s ease;
}

.choice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(169, 192, 122, .45);
}

.choice-btn:active {
  transform: scale(.97);
}


#choices-container .choice-btn {
  background: #A9C07A !important;
  color: #ffffff !important;
  border-radius: 999px !important;

}

.username-pill {
  width: 100%;
  /* FULL WIDTH */
  display: block;
  /* display: inline-block; */
  margin: 0 auto 1.2rem auto;
  /* center + jarak bawah */
  padding: 0.6rem 1.6rem;

  background: #A687FF;
  /* hijau muda */
  color: #ffffff;

  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;

  border-radius: 999px;
  /* full rounded */
  box-shadow: 0 8px 20px rgba(169, 192, 122, .35);

  text-align: center;
  pointer-events: none;
  /* tidak bisa diklik */
  user-select: none;
  /* tidak bisa di-select */
}

.qa-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;

  font-weight: 600;
}

#timer {
  color: var(--accent);
}

#progress {
  color: var(--text-secondary);
}

#test-username-display {
  color: #ffffff !important;
}

/* card landing */
.landing-card {
  border-radius: 32px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
}


/* hero image */
.card-hero {
  width: 100%;
  height: 250px;
  /* atur tinggi hero */
  background: #f2f2f2;
}

.card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* biar kayak banner beneran */
  display: block;
}

/* isi card */
.card-body {
  padding: 2rem;
  text-align: center;
}