:root {
  --kbv-brand-1: #0f4c81;
  --kbv-brand-2: #0e7490;
  --kbv-brand-3: #36a38e;
  --kbv-accent: #f2b84b;
  --kbv-accent-deep: #cc8d1e;
  --kbv-ink: #10263f;
  --kbv-muted: #5c6f84;
  --kbv-surface: rgba(255, 255, 255, 0.96);
  --kbv-surface-soft: rgba(243, 248, 255, 0.96);
  --kbv-line: rgba(15, 76, 129, 0.16);
  --kbv-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

body {
  background:
    radial-gradient(circle at top left, rgba(54, 163, 142, 0.12), transparent 22rem),
    radial-gradient(circle at right 18%, rgba(242, 184, 75, 0.14), transparent 18rem),
    linear-gradient(180deg, #eef5fb 0%, #e6eff9 48%, #f8fbff 100%);
  color: var(--kbv-ink);
}

.main-header {
  background:
    radial-gradient(circle at top left, rgba(242, 184, 75, 0.18), transparent 16rem),
    linear-gradient(135deg, rgba(8, 21, 37, 0.98), rgba(15, 76, 129, 0.96) 58%, rgba(14, 116, 144, 0.92));
  border-bottom: 1px solid rgba(242, 184, 75, 0.42);
  box-shadow: 0 14px 30px rgba(8, 21, 37, 0.22);
}

.logo {
  border-color: rgba(255, 255, 255, 0.9);
}

.main-header h1 {
  color: #f7fbff;
}

.main-nav ul {
  padding-left: 0;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff7de;
  transform: translateY(-1px);
}

.user-btn {
  background: linear-gradient(135deg, var(--kbv-brand-1), var(--kbv-brand-2));
  border: 1px solid rgba(242, 184, 75, 0.55);
  box-shadow: 0 10px 20px rgba(15, 76, 129, 0.18);
}

.user-btn:hover {
  background: linear-gradient(45deg, #2575fc, #6a11cb);
  color: #ffd700;
}

.user-dropdown,
.dropdown-menu {
  background: linear-gradient(180deg, #fff4ca, #f9df93);
  color: var(--kbv-ink);
}

.profile-pic {
  background: linear-gradient(135deg, var(--kbv-brand-1), var(--kbv-brand-2));
  box-shadow: 0 8px 16px rgba(15, 76, 129, 0.2);
}

.username {
  color: var(--kbv-brand-1);
}

.dropdown-item:hover {
  background-color: #068abe;
  color: #6a11cb !important;
}

.social-share-bar {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 76, 129, 0.1);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.container,
.quiz-container,
.result-container,
.result-main {
  width: min(100% - 2rem, 1080px);
}

.prize-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: start;
  justify-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.prize {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
}

.prize span,
.prize span font {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--kbv-brand-1) !important;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  text-shadow: none;
}

.prize img {
  display: block;
  width: 100%;
  max-width: 290px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.rules-section,
.quiz-setup,
.question-section,
.prize-ladder,
.summary-box,
.explanation-box,
.candidate-info,
.score-display,
.answer-review {
  background: var(--kbv-surface) !important;
  border: 1px solid var(--kbv-line) !important;
  border-left-width: 1px !important;
  border-radius: 24px !important;
  box-shadow: var(--kbv-shadow) !important;
}

.rules-section h2,
.summary-box h2,
.explanation-box h2,
.prize-ladder h3,
.question-header h2 {
  color: var(--kbv-brand-1) !important;
}

.rules-section {
  background-color: #fff !important;
  color: #222 !important;
  padding: 30px !important;
  border: none !important;
  border-left-width: 0 !important;
  border-radius: 12px !important;
  margin: 40px auto !important;
  box-shadow: 0 4px 6px rgb(194, 15, 15) !important;
  line-height: 1.6;
}

.rules-section h2 {
  color: #007bff !important;
  margin-bottom: 20px;
}

.rules-section ul {
  padding-left: 20px;
}

.rules-section ul li {
  margin-bottom: 15px;
}

.rules-section ul ul {
  margin-top: 10px;
  padding-left: 20px;
  list-style-type: circle;
}

.quiz-setup {
  background: var(--kbv-surface-soft) !important;
}

.candidate-form {
  background: linear-gradient(145deg, rgba(8, 21, 37, 0.98), rgba(15, 76, 129, 0.9));
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.18);
}

.candidate-form input,
.candidate-form select,
.quiz-setup select {
  border: 1px solid rgba(15, 76, 129, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

#startBtn:not(:disabled),
.actions button,
.action-buttons button,
.lock-btn,
.next-btn {
  background: linear-gradient(135deg, var(--kbv-brand-1), var(--kbv-brand-2));
  color: #fff;
}

#startBtn:disabled {
  background: #8d8b97;
  color: gold;
}

#startBtn:not(:disabled) {
  background: #ffcc00;
  color: #0011ff;
}

#startBtn:not(:disabled):hover {
  background: #e1bb00;
  color: #0011ff;
  filter: none;
}

.start-btn button {
  background: #28a745;
  color: #fff;
}

.start-btn button:hover {
  background: #218838;
  color: #fff;
  filter: none;
}

.quit-btn {
  background: linear-gradient(135deg, #a23d3d, #cf5454);
}

.lifeline-btn {
  background: linear-gradient(135deg, #fff5d6, #f7df9b);
  color: var(--kbv-ink);
  border: 1px solid rgba(204, 141, 30, 0.24);
}

.lifeline-btn:hover,
.lock-btn:hover,
.quit-btn:hover,
.next-btn:hover,
.action-buttons button:hover {
  background: #ffc107;
  color: #000;
  filter: none;
}

.actions button:hover {
  background: #6a0dad;
  color: #fff;
  filter: none;
}

.question-section,
.prize-ladder {
  color: var(--kbv-ink);
}

.candidate-info,
.question-text,
.chapter-name,
.prize-ladder li,
.summary-box p,
.explanation-box td,
.explanation-box th {
  color: var(--kbv-ink);
}

.chapter-name {
  color: var(--kbv-accent-deep);
}

.timer circle:first-child {
  stroke: rgba(15, 76, 129, 0.16);
}

.timer circle:last-child {
  stroke: var(--kbv-accent);
}

.option-btn {
  background: #eef5ff;
  color: var(--kbv-ink);
  border: 1px solid rgba(15, 76, 129, 0.12);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.option-btn:hover {
  background: #3b82f6;
  color: #000;
}

.option-btn.selected {
  background: linear-gradient(135deg, var(--kbv-brand-1), var(--kbv-brand-2));
  color: #fff;
  border-color: rgba(15, 76, 129, 0.3);
}

.prize-ladder li.active,
.prize-ladder li:hover {
  background: #ffc107;
  color: #000;
  font-weight: bold;
  border-radius: 7px;
}

.result-loader {
  background: rgba(8, 21, 37, 0.82);
}

.loader-ring {
  border-color: var(--kbv-accent);
  border-top-color: transparent;
}

.result-shell {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto 32px;
}

@media (max-width: 960px) {
  .quiz-container {
    flex-direction: column;
    gap: 18px;
    margin: 24px auto;
  }

  .prize-ladder {
    width: 100%;
  }

  .prize-ladder ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 176px;
  }

  .main-header {
    padding: 14px 12px;
  }

  .main-header h1 {
    font-size: 1.15rem;
    text-align: center;
  }

  .main-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
  }

  .main-nav li {
    margin: 0;
  }

  .main-nav a {
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
  }

  .social-share-bar {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    width: max-content;
    margin: 14px auto 0;
    border-radius: 999px;
    padding: 8px 12px;
  }

  .social-share-bar a img {
    width: 26px;
    height: 26px;
  }

  .container,
  .quiz-container,
  .result-container,
  .result-main,
  .result-shell {
    width: min(100% - 1.25rem, 100%);
  }

  .prize-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    border-radius: 0;
  }

  .prize {
    gap: 10px;
    padding: 0;
  }

  .prize span,
  .prize span font {
    min-width: 0;
    width: auto;
    min-height: 0;
    padding: 0;
    font-size: 15px;
  }

  .rules-section,
  .quiz-setup,
  .question-section,
  .prize-ladder,
  .summary-box,
  .explanation-box,
  .candidate-info,
  .score-display,
  .answer-review {
    border-radius: 18px !important;
  }

  .quiz-setup {
    width: min(100%, 680px);
    padding: 18px 14px;
  }

  .rules-section {
    width: auto;
    padding: 20px 18px;
    margin: 24px auto;
  }

  .options-container {
    grid-template-columns: 1fr;
  }

  .action-buttons,
  .lifelines,
  .actions {
    gap: 10px;
  }

  .action-buttons button,
  .lifelines button,
  .actions button,
  #startBtn,
  .start-btn button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  body {
    padding-top: 188px;
  }

  .logo {
    width: 54px;
    height: 54px;
  }

  .main-header h1 {
    font-size: 1rem;
  }

  .prize-grid {
    gap: 10px;
  }

  .prize img {
    border-radius: 14px;
  }

  .question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .question-text {
    font-size: 1.1rem;
  }

  .candidate-info {
    font-size: 0.95rem;
  }

  .prize-ladder ul {
    grid-template-columns: 1fr;
  }
}
