/* Bilardo Water - Quizzes & Trivia Styles (Single Page Scroll Layout) */

.quizzes-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.quizzes-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.quizzes-header__title {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
}

.quizzes-header__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted, #94a3b8);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Tabs */
.quizzes-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.quiz-tab-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--color-border, #1e293b);
  background: rgba(15, 23, 42, 0.6);
  color: var(--color-text, #f8fafc);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.quiz-tab-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.quiz-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

/* Grid Layout */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.quiz-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.quiz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.quiz-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.15);
}

.quiz-card:hover::before {
  opacity: 1;
}

.quiz-card__badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  margin-bottom: 1rem;
}

.quiz-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.quiz-card__description {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.quiz-card__btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-card__btn:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* Single Page Scrolling Active Game View */
.quiz-active-view {
  max-width: 800px;
  margin: 0 auto;
}

.quiz-active-header {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 18px;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.quiz-active-header__title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.quiz-active-header__subtitle {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.quiz-back-link {
  display: inline-block;
  color: #38bdf8;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.quiz-back-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Stacked Question Card (Single Page Scroll) */
.quiz-question-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 2rem;
  margin-bottom: 1.75rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.quiz-question-card.missing-answer {
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4) !important;
}

.quiz-question-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.quiz-option-item {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 41, 59, 0.5);
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quiz-option-item * {
  pointer-events: none;
}

.quiz-option-item:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  transform: translateX(4px);
}

.quiz-option-item.selected {
  background: rgba(14, 165, 233, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.quiz-option-item.correct {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: #22c55e !important;
  color: #4ade80 !important;
  font-weight: 700;
}

.quiz-option-item.wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

.quiz-option-bullet {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.quiz-option-item.selected .quiz-option-bullet {
  border-color: #38bdf8;
  background: #38bdf8;
}

.quiz-option-bullet::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.quiz-option-item.selected .quiz-option-bullet::after {
  opacity: 1;
}

/* Calculate Button at End of Scroll */
.quiz-calculate-container {
  text-align: center;
  margin: 2.5rem 0 3.5rem;
}

.quiz-calculate-btn {
  padding: 1.1rem 3rem;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.quiz-calculate-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, #38bdf8 0%, #4f46e5 100%);
}

.quiz-missing-alert {
  color: #f87171;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 0.75rem;
  display: none;
}

/* Detailed Result Card */
.quiz-result-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-result-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.quiz-result-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
}

.quiz-result-desc {
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.quiz-breakdown-box {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 14px;
  padding: 1.5rem;
  max-width: 550px;
  margin: 0 auto 2rem;
  text-align: left;
}

.quiz-breakdown-item {
  margin-bottom: 0.85rem;
}

.quiz-breakdown-item:last-child {
  margin-bottom: 0;
}

.quiz-breakdown-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.35rem;
}

.quiz-breakdown-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.quiz-breakdown-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 4px;
}

.quiz-result-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
