:root {
  --quiz-bg: #0b1220;
  --quiz-card: #111a2e;
  --quiz-border: #2b3d60;
  --quiz-accent: #67e8f9;
  --quiz-text: #e2e8f0;
  --quiz-sub: #94a3b8;
}

body.quiz-page {
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.16), transparent 46%),
    radial-gradient(circle at 80% 15%, rgba(6, 182, 212, 0.12), transparent 42%),
    #0b0f14;
}

.quiz-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.96), rgba(12, 20, 35, 0.92));
  border: 1px solid var(--quiz-border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.quiz-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(103, 232, 249, 0.07), transparent 45%);
  pointer-events: none;
}

.quiz-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quiz-hero-logo { width: 58px; height: 58px; border-radius: 12px; border: 1px solid rgba(148, 163, 184, 0.45); padding: 6px; background: rgba(15, 23, 42, 0.7); }
.quiz-badge { font-size: 0.74rem; letter-spacing: .14em; color: #67e8f9; font-weight: 700; }
.quiz-title { font-size: 1.8rem; line-height: 1.2; margin-top: 2px; font-weight: 800; }
.quiz-sub { color: var(--quiz-sub); margin-top: 6px; }

.mode-buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.quiz-main-hero{
  border-color: rgba(103, 232, 249, 0.45);
  box-shadow: 0 16px 38px rgba(2, 132, 199, 0.18);
}
.quiz-intro-grid{
  display:grid;
  gap:10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.quiz-intro-card{
  border:1px solid rgba(103, 232, 249, 0.25);
  border-radius:12px;
  background: linear-gradient(150deg, rgba(8, 145, 178, 0.16), rgba(37, 99, 235, 0.1));
  padding:12px;
}
.quiz-intro-card .label{font-size:.75rem;color:#7dd3fc;letter-spacing:.07em;text-transform:uppercase;}
.quiz-intro-card .value{font-size:1.18rem;font-weight:800;margin-top:3px;}
.quiz-intro-card small{color:#cbd5e1;display:block;margin-top:4px;}
.quiz-main-actions{gap:12px;}
.quiz-main-actions .main-cta{
  flex:1 1 230px;
  min-height:72px;
  font-size:1.28rem;
  border-radius:14px;
  box-shadow: 0 10px 24px rgba(8, 47, 73, 0.35);
}
.quiz-main-actions .main-cta.ghost{
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(125, 211, 252, 0.55);
}

button,
.rank-link {
  border: 1px solid var(--quiz-border);
  border-radius: 10px;
  background: #172742;
  color: var(--quiz-text);
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: .2s ease;
}
button:hover,
.rank-link:hover { border-color: var(--quiz-accent); transform: translateY(-1px); }
button.primary { background: linear-gradient(90deg, #0891b2, #2563eb); border-color: #22d3ee; }

.quiz-top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.progress-pill {
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  font-size: .82rem;
  padding: .3rem .7rem;
}
.timer-big {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1;
  font-weight: 900;
  color: #67e8f9;
  text-shadow: 0 0 20px rgba(103, 232, 249, .3);
}

.question-text h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.5; }
#questionImage {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: none;
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

#choices { display: grid; gap: 8px; margin-top: 12px; }
.choice-btn { text-align: left; }

#answerForm,
.ranking-form { display: grid; gap: 10px; }

#answerInput,
#discordIdInput {
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  padding: 12px;
}

.feedback-box {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 10px;
  background: rgba(15, 23, 42, .6);
  padding: 12px;
}
#feedback { margin: 0; font-weight: 700; color: #e2e8f0; }

#resultBox { display: none; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { border-bottom: 1px solid #24324f; padding: 10px 8px; text-align: left; }
.table th { color: #a5b4fc; }

.start-btn{font-size:1.22rem;font-weight:800;padding:18px 24px;min-width:190px;justify-content:center;display:inline-flex;align-items:center;}
.big-submit{font-size:1.1rem;font-weight:800;padding:14px 20px;}
.answer-guide{font-size:.84rem;color:#93c5fd;margin-top:-2px;}

.ranking-page-shell { position: relative; }
.ranking-page-shell::after{
  content:"";
  position:absolute;
  inset:20px -10px auto;
  height:240px;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.12), transparent 65%);
  pointer-events:none;
}
.ranking-hero { backdrop-filter: blur(4px); }
.ranking-highlight-grid{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.ranking-highlight-card{
  border:1px solid rgba(103, 232, 249, 0.28);
  border-radius:12px;
  background: linear-gradient(140deg, rgba(8, 145, 178, 0.12), rgba(37, 99, 235, 0.08));
  padding:12px 14px;
}
.ranking-highlight-card .label{font-size:.78rem;color:#7dd3fc;letter-spacing:.08em;text-transform:uppercase;}
.ranking-highlight-card .value{font-size:1.1rem;font-weight:800;margin-top:3px;}
.ranking-highlight-card small{color:#94a3b8;display:block;margin-top:3px;}
.ranking-table-card{
  border-color: rgba(103, 232, 249, 0.35);
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.14);
}
.ranking-table thead th{
  background: rgba(14, 116, 144, 0.16);
  position: sticky;
  top: 0;
}

.ranking-start-buttons .start-btn {
  min-width: 170px;
}

.ranking-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #7dd3fc;
}
