/*
================================================
|                                              |
|         QUIZ CLUB PAGE - REDESIGN V2         |
|      Theme: Digital Academia, Cool Tones     |
|                                              |
================================================
*/

/* 1. ROOT & THEME VARIABLES (Completely New Theme)
------------------------------------------------ */
:root {
  --club-bg: #0D1117; /* Deep, professional navy */
  --card-bg: rgba(22, 27, 34, 0.6); /* Semi-transparent card background */
  --text-primary: #e6edf3; /* Bright off-white for main text */
  --text-secondary: #8b949e; /* Muted grey for secondary text */
  --border-color: rgba(139, 148, 158, 0.3);
  --accent-blue: #3b82f6;
  --accent-cyan: #22d3ee;
  --accent-gradient: linear-gradient(60deg, var(--accent-blue), var(--accent-cyan));
  --font-primary: 'Lexend', sans-serif;
  --transition-speed: 0.4s ease;
}

/* 2. GENERAL PAGE SETUP (Layout Bug Fixed)
------------------------------------------------ */
body.quiz-theme {
  background-color: var(--club-bg);
  /* A more subtle grid pattern */
  background-image: linear-gradient(var(--border-color) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 40px 40px;
  font-family: var(--font-primary);
  color: var(--text-primary);
  line-height: 1.7;
  /* Removed max-width from body to fix navbar/footer */
  cursor: url('/cursors/quiz-club-default.png'), pointer;
}
a, button, [role="button"] {
  cursor: url('/cursors/quiz-club-hover.png'), pointer;
}

/* New container to correctly manage page width */
.club-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  padding-top: 80px;
  min-height: 100vh;
}

/* 3. HEADER SECTION (Refined Spacing & Effects)
------------------------------------------------ */
.club-header {
  text-align: center;
  padding: 4rem 0 5rem 0; /* Improved vertical spacing */
}

.club-logo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 2rem auto;
  display: block;
  border: 3px solid var(--border-color);
  padding: 6px;
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.2); /* Cyan glow */
  transition: var(--transition-speed);
}
.club-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.4);
}

.club-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.club-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
}

/* Refined Typewriter Effect */
.typewriter {
  font-weight: 600;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  border-right: 3px solid var(--accent-cyan);
  animation: typing 2s steps(12, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 12ch } /* Fixed width based on "Did you know?" */
}
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent-cyan); }
}


/* 4. CONTENT & QUESTION CARDS (New "Digital Academia" Design)
------------------------------------------------ */
.club-content {
  display: grid;
  gap: 3rem;
}

.question-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* For JS-powered gradient */
  background-image: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 130, 246, 0.1),
    transparent 40%
  );
  transition: background-image 0.5s ease-out;
}

.question-card:hover {
  transform: translateY(-10px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.card-header .feather {
  color: var(--accent-cyan);
  stroke-width: 2;
}

.points {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  background: var(--accent-gradient);
  color: var(--club-bg);
}

.card-content {
  padding: 2rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}
.card-content p:last-child {
  margin-bottom: 0;
}

/* 5. RESPONSIVE DESIGN
------------------------------------------------ */
@media (max-width: 768px) {
  .club-page { padding: 1rem; padding-top: 70px; }
  .club-header { padding: 2rem 0 3rem 0; }
  .card-header { padding: 1.25rem 1.5rem; }
  .card-content { padding: 1.5rem; }
  .question-card:hover { transform: translateY(-5px); }
}