/*
 * Advent of Security Code Review 2025
 * Dark Mode + Christmas Theme + PentesterLab Branding
 */

/* ===== VARIABLES & BASE ===== */
:root {
  /* PentesterLab brand (navy + sky), aligned to pentesterlab-redesign.html */
  --ptlab-blue: #5fb9e9;
  --ptlab-dark-bg: #0a1622;
  --ptlab-text: #e7eff6;

  /* Sky accent + card surfaces */
  --accent: #5fb9e9;
  --accent-deep: #8ad0f7;
  --card-top: #152a3d;
  --card-bottom: #0f2130;
  --card-line: #213b53;
  --hairline: rgba(151, 200, 231, 0.13);

  /* Festive accents, used sparingly on the brand base */
  --christmas-red: #ff7a59;
  --christmas-green: #3ecf8e;
  --christmas-gold: #ffcf6b;
  --christmas-silver: #C0C0C0;

  /* Semantic Colors */
  --bg-primary: #0a1622;
  --bg-secondary: #112131;
  --bg-tertiary: #152a3d;
  --text-primary: #e7eff6;
  --text-secondary: #a7b8c6;
  --text-muted: #8197a9;

  /* Accent Colors */
  --accent-success: #3ecf8e;
  --accent-warning: #ffcf6b;
  --accent-danger: #ff7a59;
  --accent-info: var(--ptlab-blue);

  /* Spacing */
  --container-max-width: 1400px;
  --grid-gap: 20px;
}

/* ===== GLOBAL STYLES ===== */
/* Dark base on the page itself: the wrapper gradient used
   background-attachment: fixed, which leaves the page white below the first
   viewport on some browsers (and in full-page captures). A solid dark html/body
   guarantees the background is never white behind or below the calendar. */
html,
body {
  margin: 0;
  padding: 0;
  background: #0a1622;
}

.advent-body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1100px 560px at 50% -8%, rgba(95, 185, 233, 0.10), transparent 62%),
    linear-gradient(180deg, #0c1c2b 0%, #0a1622 55%);
  color: var(--text-primary);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
}

.advent-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== NAVIGATION ===== */
.advent-nav {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.advent-nav .advent-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.advent-logo img {
  height: 40px;
  transition: transform 0.3s ease;
}

.advent-logo:hover img {
  transform: scale(1.05);
}

.advent-nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

.advent-nav .nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
}

.advent-nav .nav-link:hover {
  color: var(--christmas-gold);
}

.advent-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--christmas-gold);
  transition: width 0.3s ease;
}

.advent-nav .nav-link:hover::after {
  width: 100%;
}

.advent-nav .nav-link-cta {
  background: linear-gradient(135deg, var(--christmas-red), #a01729);
  color: white !important;
  padding: 8px 20px;
  border-radius: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advent-nav .nav-link-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(196, 30, 58, 0.4);
}

.advent-nav .nav-link-cta::after {
  display: none;
}

.advent-nav .nav-user {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== FLASH MESSAGES ===== */
.advent-flash {
  padding: 15px;
  margin: 20px auto;
  max-width: var(--container-max-width);
  border-radius: 8px;
  font-weight: 600;
}

.advent-flash-notice {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid var(--accent-success);
  color: var(--accent-success);
}

.advent-flash-alert {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
}

/* ===== HERO SECTION ===== */
.advent-hero {
  padding: 90px 0 64px;
  background: radial-gradient(ellipse at top, rgba(95, 185, 233, 0.12), transparent 60%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.advent-hero-content {
  position: relative;
  z-index: 2;
}

.advent-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(95, 185, 233, 0.12);
  border: 1px solid rgba(95, 185, 233, 0.4);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 26px;
}

.advent-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.advent-hero-title {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  line-height: 1.05;
}

.advent-christmas-text {
  color: var(--christmas-red);
  text-shadow: 0 0 20px rgba(196, 30, 58, 0.5);
}

.advent-gradient-text {
  background: linear-gradient(135deg, var(--ptlab-blue), var(--christmas-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.advent-year {
  display: block;
  color: var(--christmas-gold);
  font-size: 40px;
  margin-top: 10px;
}

.advent-hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

.advent-hero-stats {
  display: inline-flex;
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

.advent-hero-stats {
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  border: 1px solid var(--card-line);
}

.advent-stat {
  text-align: center;
  padding: 22px 52px;
}

.advent-stat + .advent-stat {
  border-left: 1px solid var(--card-line);
}

.advent-stat-number {
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.advent-stat-value {
  font-size: 52px;
  color: var(--christmas-gold);
}

.advent-stat-of {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 4px;
}

.advent-stat-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
  margin-top: 12px;
}

/* The draw/reveal buttons reuse the v2-btn classes, which are only loaded on the
   logged-in admin layout, not on the advent pages. Style them here so they match
   the calendar instead of falling back to a bare browser button. */
.advent-body .v2-btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 10px;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.advent-body .v2-btn:hover {
  transform: translateY(-1px);
}

.advent-body .v2-btn-accent {
  background: linear-gradient(135deg, var(--christmas-red), var(--christmas-gold));
  color: #fff;
}

.advent-body .v2-btn-accent:hover {
  box-shadow: 0 8px 20px rgba(196, 30, 58, 0.35);
}

.advent-body .v2-btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

.advent-body .v2-btn-outline:hover {
  border-color: var(--christmas-gold);
  color: var(--christmas-gold);
}

/* ===== PRIZES / INCENTIVES ===== */
.advent-prizes {
  padding: 10px 0 30px;
}

.advent-prizes-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  border: 1px solid var(--card-line);
  border-radius: 22px;
  padding: 40px 48px;
}

.advent-prizes-art {
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.advent-prizes-eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-deep);
  margin-bottom: 10px;
}

.advent-prizes-copy h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 10px;
  color: var(--text-primary);
}

.advent-prizes-lead {
  color: var(--text-secondary);
  font-size: 17px;
  margin: 0 0 22px;
}

.advent-prize-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.advent-prize-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(95, 185, 233, 0.05);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 18px 20px;
}

.advent-prize-icon {
  font-size: 26px;
  line-height: 1;
}

.advent-prize-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.advent-prize-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.advent-link {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.advent-prizes-note {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

@media (max-width: 760px) {
  .advent-prizes-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
    padding: 32px 24px;
  }
  .advent-prize-cards {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

/* ===== PROMOTIONAL BANNER ===== */
.advent-promo {
  padding: 60px 0;
  background: radial-gradient(ellipse at top, rgba(0, 153, 254, 0.05), rgba(26, 26, 26, 0.95)),
              radial-gradient(ellipse at bottom, rgba(196, 30, 58, 0.05), rgba(26, 26, 26, 0.95));
  border-top: 1px solid rgba(0, 153, 254, 0.2);
  border-bottom: 1px solid rgba(196, 30, 58, 0.2);
}

.advent-promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

.advent-promo-card {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(42, 42, 42, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.advent-promo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--christmas-red), var(--christmas-green), var(--christmas-gold));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.advent-promo-card:hover::before {
  opacity: 1;
}

.advent-promo-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.advent-promo-card-featured {
  border: 2px solid var(--ptlab-blue);
  background: linear-gradient(135deg, rgba(0, 153, 254, 0.1), rgba(26, 26, 26, 0.8));
}

.advent-promo-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--ptlab-blue);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.advent-promo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--christmas-red), var(--christmas-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  margin-bottom: 20px;
}

.advent-promo-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.advent-promo-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.advent-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.advent-promo-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--christmas-gold);
  transform: translateX(5px);
}

.advent-promo-btn-featured {
  background: var(--ptlab-blue);
  border-color: var(--ptlab-blue);
}

.advent-promo-btn-featured:hover {
  background: #007acc;
  transform: translateX(5px);
}

/* ===== CALENDAR GRID ===== */
.advent-calendar-section {
  padding: 60px 0 80px;
}

.advent-calendar-header {
  text-align: center;
  margin-bottom: 50px;
}

.advent-calendar-header h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.advent-calendar-header p {
  font-size: 16px;
  color: var(--text-secondary);
}

.advent-calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--grid-gap);
  margin-bottom: 40px;
}

/* ===== DAY CARDS ===== */
.advent-day-card {
  aspect-ratio: 1;
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.advent-day-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(95, 185, 233, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.advent-day-card:hover::before {
  opacity: 1;
}

.advent-day-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(95, 185, 233, 0.35);
}

/* Solved State */
.advent-day-solved {
  border-color: rgba(62, 207, 142, 0.6);
  background: linear-gradient(180deg, rgba(62, 207, 142, 0.14), var(--card-bottom));
}

.advent-day-solved:hover {
  border-color: var(--accent-success);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(62, 207, 142, 0.4);
}

/* Reviewed state: answer read but not solved. Purple, to set it apart from the
   green of a correct solve while still marking the day as done. */
.advent-day-reviewed {
  border-color: rgba(167, 139, 250, 0.4);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.1), var(--card-bottom));
}

.advent-day-reviewed:hover {
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(167, 139, 250, 0.35);
}

.advent-day-reviewed .advent-day-state {
  color: #c4b5fd;
  opacity: 0.95;
}

/* Locked State */
.advent-day-locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.advent-day-locked:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

/* Internal-team preview: a not-yet-open day the team can still open. Clickable,
   marked with a dashed sky border so it is clearly a preview, not live. */
.advent-day-preview {
  border-style: dashed;
  border-color: rgba(95, 185, 233, 0.45);
}

.advent-day-state-preview {
  color: var(--accent-deep);
  opacity: 1;
}

.advent-day-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.advent-day-number {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--christmas-gold), var(--christmas-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 10px;
}

.advent-day-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.advent-day-status-locked {
  background: rgba(102, 102, 102, 0.2);
  color: var(--text-muted);
  border: 1px solid rgba(102, 102, 102, 0.3);
}

.advent-day-status-available {
  background: rgba(0, 153, 254, 0.2);
  color: var(--ptlab-blue);
  border: 1px solid var(--ptlab-blue);
}

.advent-day-status-solved {
  background: rgba(40, 167, 69, 0.2);
  color: var(--accent-success);
  border: 1px solid var(--accent-success);
}

.advent-day-info {
  margin-top: 10px;
  text-align: center;
}

.advent-difficulty-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.advent-difficulty-easy {
  background: rgba(40, 167, 69, 0.2);
  color: var(--accent-success);
  border: 1px solid var(--accent-success);
}

.advent-difficulty-medium {
  background: rgba(255, 193, 7, 0.2);
  color: var(--accent-warning);
  border: 1px solid var(--accent-warning);
}

.advent-difficulty-hard {
  background: rgba(220, 53, 69, 0.2);
  color: var(--accent-danger);
  border: 1px solid var(--accent-danger);
}

/* Locked Day Content */
.advent-day-locked-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.advent-locked-message {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.advent-locked-message p {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
}

.advent-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* ===== LEGEND ===== */
.advent-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
  padding: 20px;
  background: rgba(26, 26, 26, 0.5);
  border-radius: 12px;
}

.advent-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.advent-legend-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.advent-legend-locked {
  background: rgba(102, 102, 102, 0.2);
  color: var(--text-muted);
  border: 1px solid rgba(102, 102, 102, 0.3);
}

.advent-legend-available {
  background: rgba(0, 153, 254, 0.2);
  color: var(--ptlab-blue);
  border: 1px solid var(--ptlab-blue);
}

.advent-legend-solved {
  background: rgba(40, 167, 69, 0.2);
  color: var(--accent-success);
  border: 1px solid var(--accent-success);
}

/* ===== HOW IT WORKS ===== */
.advent-how-it-works {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.advent-how-it-works h2 {
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 60px;
  color: var(--text-primary);
}

.advent-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.advent-step {
  text-align: center;
}

.advent-step-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--christmas-red), var(--christmas-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin: 0 auto 20px;
}

.advent-step h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.advent-step p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.advent-complete-cta {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.1), rgba(255, 215, 0, 0.1));
  border: 2px solid var(--christmas-gold);
  border-radius: 16px;
}

.advent-complete-icon {
  font-size: 60px;
  margin-bottom: 20px;
}

.advent-complete-cta h3 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--christmas-gold);
}

.advent-complete-cta p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ===== DAY PAGE ===== */
.advent-breadcrumb {
  padding: 20px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.advent-breadcrumb .advent-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.advent-back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.advent-back-link:hover {
  color: var(--christmas-gold);
}

.advent-day-header {
  padding: 60px 0;
  background: radial-gradient(ellipse at top, rgba(196, 30, 58, 0.1), transparent);
}

.advent-day-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.advent-day-badge {
  background: var(--bg-tertiary);
  color: var(--christmas-gold);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.advent-solved-badge {
  background: rgba(40, 167, 69, 0.2);
  color: var(--accent-success);
  border: 1px solid var(--accent-success);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.advent-day-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.advent-day-description {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 30px;
}

.advent-day-actions {
  display: flex;
  gap: 15px;
}

.advent-review-reveal-form {
  margin-left: auto;
}

/* ===== DAY CONTENT ===== */
.advent-day-content {
  padding: 40px 0 80px;
}

.advent-day-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 30px;
}

/* ===== PANELS ===== */
.advent-panel {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.advent-panel-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
}

.advent-panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.advent-file-info {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.advent-file-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 4px;
}

.advent-attempt-counter {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.advent-panel-body {
  padding: 0;
}

.advent-panel-sticky {
  position: sticky;
  top: 90px;
}

/* ===== CODE DISPLAY ===== */
.advent-code-container {
  background: #0d1117;
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
}

.advent-code {
  margin: 0;
  padding: 20px;
  font-family: 'Courier New', Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #c9d1d9;
  background: #0d1117;
}

.advent-code code {
  background: transparent;
}

.line-number {
  display: inline-block;
  width: 40px;
  color: #6e7681;
  text-align: right;
  margin-right: 20px;
  user-select: none;
  border-right: 1px solid #30363d;
  padding-right: 10px;
}

/* Syntax Highlighting */
.language-ruby .token.keyword {
  color: #ff7b72;
}

.language-ruby .token.string {
  color: #a5d6ff;
}

.language-ruby .token.comment {
  color: #8b949e;
}

.language-ruby .token.class-name {
  color: #ffa657;
}

.language-ruby .token.function {
  color: #d2a8ff;
}

/* Hint Panel */
.advent-hint-panel {
  border: 2px solid var(--accent-warning);
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), var(--bg-secondary));
}

.advent-hint-panel .advent-panel-header {
  background: rgba(255, 193, 7, 0.1);
}

.advent-hint-content {
  padding: 20px;
}

.advent-hint-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.advent-hint-content code {
  background: rgba(255, 193, 7, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: var(--accent-warning);
}

/* Solution Panel */
.advent-solution-panel {
  border: 2px solid var(--accent-success);
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.05), var(--bg-secondary));
}

.advent-solution-panel .advent-panel-header {
  background: rgba(40, 167, 69, 0.1);
}

.advent-solution-content {
  padding: 20px;
}

.advent-solution-content h4 {
  font-size: 20px;
  margin: 20px 0 12px;
  color: var(--text-primary);
}

.advent-solution-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.advent-solution-content ul {
  padding-left: 20px;
  color: var(--text-secondary);
}

.advent-solution-content li {
  margin-bottom: 8px;
}

.advent-solution-content a {
  color: var(--ptlab-blue);
  text-decoration: none;
}

.advent-solution-content a:hover {
  text-decoration: underline;
}

/* ===== FORMS ===== */
.advent-form {
  padding: 20px;
}

.advent-form-group {
  margin-bottom: 20px;
}

.advent-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.advent-required {
  color: var(--christmas-red);
}

.advent-form-control {
  width: 100%;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.advent-form-control:focus {
  outline: none;
  border-color: var(--ptlab-blue);
  box-shadow: 0 0 0 3px rgba(0, 153, 254, 0.1);
}

.advent-form-control::placeholder {
  color: var(--text-muted);
}

.advent-form-help {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== BUTTONS ===== */
.advent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.advent-btn-primary {
  background: linear-gradient(135deg, var(--ptlab-blue), #007acc);
  color: white;
}

.advent-btn-primary:hover {
  background: linear-gradient(135deg, #007acc, #005fa3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 153, 254, 0.3);
}

.advent-btn-secondary {
  background: linear-gradient(135deg, var(--christmas-red), #a01729);
  color: white;
}

.advent-btn-secondary:hover {
  background: linear-gradient(135deg, #a01729, #7a1220);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(196, 30, 58, 0.3);
}

.advent-btn-outline {
  background: transparent;
  border: 2px solid var(--christmas-gold);
  color: var(--christmas-gold);
}

.advent-btn-outline:hover {
  background: var(--christmas-gold);
  color: #0a0a0a;
}

.advent-btn-disabled {
  background: rgba(102, 102, 102, 0.2);
  color: var(--text-muted);
  cursor: not-allowed;
  border: 1px solid rgba(102, 102, 102, 0.3);
}

.advent-btn-disabled:hover {
  transform: none;
  box-shadow: none;
}

.advent-btn-block {
  width: 100%;
}

/* ===== SUBMISSION RESULT ===== */
.advent-submission-result {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
}

.advent-submission-result.success {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid var(--accent-success);
  color: var(--accent-success);
}

.advent-submission-result.error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
}

/* ===== PROGRESS INFO ===== */
.advent-progress-info {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.advent-progress-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.advent-progress-stat i {
  color: var(--christmas-gold);
  font-size: 18px;
}

/* ===== SHARE BUTTONS ===== */
.advent-share-buttons {
  display: flex;
  gap: 10px;
}

.advent-share-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.advent-share-twitter {
  background: #1DA1F2;
  color: white;
}

.advent-share-twitter:hover {
  background: #1a91da;
  transform: translateY(-2px);
}

.advent-share-linkedin {
  background: #0077B5;
  color: white;
}

.advent-share-linkedin:hover {
  background: #006399;
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.advent-footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 60px 0 30px;
  margin-top: 0;
}

.advent-footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.advent-footer-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.advent-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.advent-footer-links li {
  margin-bottom: 10px;
}

.advent-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.advent-footer-links a:hover {
  color: var(--christmas-gold);
}

.advent-footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.advent-footer-bottom p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* ===== SNOWFLAKES ANIMATION ===== */
#advent-calendar-wrapper .snowflakes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

#advent-calendar-wrapper {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

#advent-calendar-wrapper .snowflake {
  position: absolute;
  top: -5vh;
  color: rgba(197, 224, 245, 0.35);
  animation: fall linear infinite;
  will-change: transform;
}

#advent-calendar-wrapper .snowflake:nth-child(1)  { left: 6%;  font-size: 12px; opacity: 0.6; animation-duration: 17s; animation-delay: 0s; }
#advent-calendar-wrapper .snowflake:nth-child(2)  { left: 14%; font-size: 18px; opacity: 0.8; animation-duration: 22s; animation-delay: 3s; }
#advent-calendar-wrapper .snowflake:nth-child(3)  { left: 23%; font-size: 10px; opacity: 0.5; animation-duration: 14s; animation-delay: 6s; }
#advent-calendar-wrapper .snowflake:nth-child(4)  { left: 32%; font-size: 15px; opacity: 0.7; animation-duration: 25s; animation-delay: 1s; }
#advent-calendar-wrapper .snowflake:nth-child(5)  { left: 41%; font-size: 11px; opacity: 0.55; animation-duration: 19s; animation-delay: 8s; }
#advent-calendar-wrapper .snowflake:nth-child(6)  { left: 50%; font-size: 20px; opacity: 0.85; animation-duration: 28s; animation-delay: 4s; }
#advent-calendar-wrapper .snowflake:nth-child(7)  { left: 59%; font-size: 13px; opacity: 0.6; animation-duration: 16s; animation-delay: 10s; }
#advent-calendar-wrapper .snowflake:nth-child(8)  { left: 68%; font-size: 10px; opacity: 0.5; animation-duration: 21s; animation-delay: 2s; }
#advent-calendar-wrapper .snowflake:nth-child(9)  { left: 77%; font-size: 17px; opacity: 0.75; animation-duration: 24s; animation-delay: 7s; }
#advent-calendar-wrapper .snowflake:nth-child(10) { left: 85%; font-size: 12px; opacity: 0.6; animation-duration: 18s; animation-delay: 5s; }
#advent-calendar-wrapper .snowflake:nth-child(11) { left: 92%; font-size: 14px; opacity: 0.65; animation-duration: 26s; animation-delay: 11s; }
#advent-calendar-wrapper .snowflake:nth-child(12) { left: 98%; font-size: 10px; opacity: 0.5; animation-duration: 15s; animation-delay: 9s; }

@keyframes fall {
  to {
    transform: translateY(108vh) rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #advent-calendar-wrapper .snowflakes { display: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .advent-calendar-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .advent-day-grid {
    grid-template-columns: 1fr;
  }

  .advent-panel-sticky {
    position: static;
  }
}

@media (max-width: 768px) {
  .advent-hero-title {
    font-size: 36px;
  }

  .advent-year {
    font-size: 28px;
  }

  .advent-hero-stats {
    flex-direction: column;
    gap: 25px;
  }

  .advent-calendar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .advent-day-number {
    font-size: 32px;
  }

  .advent-promo-grid {
    grid-template-columns: 1fr;
  }

  .advent-steps {
    grid-template-columns: 1fr;
  }

  .advent-nav-links {
    gap: 15px;
    font-size: 13px;
  }

  .advent-day-title {
    font-size: 32px;
  }

  .advent-legend {
    flex-direction: column;
    gap: 15px;
  }

  .advent-share-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .advent-calendar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .advent-day-card {
    padding: 15px;
  }

  .advent-day-number {
    font-size: 24px;
  }

  .advent-day-status {
    font-size: 10px;
    padding: 6px 8px;
  }

  .advent-hero-title {
    font-size: 28px;
  }

  .advent-container {
    padding: 0 15px;
  }
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* ---------------------------------------------------------------------------
   Line picker. The radio holds the selection and these rules reveal the submit
   button on the chosen row, so picking a line, changing your mind and
   submitting all work without JavaScript.
   --------------------------------------------------------------------------- */
.advent-lines { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.advent-line { margin: 0; }
.advent-line-label {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.15rem 0.75rem; cursor: pointer; position: relative;
  border-left: 3px solid transparent; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem; line-height: 1.7;
}
.advent-line-label:hover { background: rgba(117, 86, 249, 0.08); }
.advent-line-radio { position: absolute; opacity: 0; pointer-events: none; }
.advent-line-number {
  min-width: 2.2rem; text-align: right; opacity: 0.45; user-select: none; flex-shrink: 0;
}
.advent-line-code { white-space: pre; overflow-x: auto; flex: 1; }
.advent-line-flag {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  opacity: 0.6; flex-shrink: 0;
}
.advent-line-tried .advent-line-label { background: rgba(239, 68, 68, 0.07); }

.advent-line-submit { display: none; flex-shrink: 0; }
.advent-line-radio:checked ~ .advent-line-submit { display: inline-block; }
.advent-line-radio:checked ~ .advent-line-number { opacity: 1; font-weight: 700; }
.advent-line-radio:focus-visible ~ .advent-line-code { outline: 2px solid #7556F9; }
.advent-line-label:has(.advent-line-radio:checked) {
  background: rgba(117, 86, 249, 0.16); border-left-color: #7556F9;
}

@media (max-width: 640px) {
  .advent-line-label { flex-wrap: wrap; }
  .advent-line-submit { margin-left: auto; }
}

.advent-next-primary {
  border: 1px solid rgba(117, 86, 249, 0.35); background: rgba(117, 86, 249, 0.07);
  border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1rem;
}
.advent-next-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.advent-next-note { font-size: 0.85rem; opacity: 0.75; }
.advent-lab-tag { font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 4px; margin-left: 0.4rem; }
.advent-tag-free { background: #10b981; color: #fff; }
.advent-tag-pro { background: #7556F9; color: #fff; }
.advent-share-input { width: 100%; font-family: ui-monospace, monospace; font-size: 0.8rem; padding: 0.5rem; }
.advent-day-state { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }
.advent-wrong-note { color: #ef4444; font-size: 0.9rem; }

.advent-share-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.4rem; }
.advent-share-row .advent-share-input { flex: 1 1 16rem; min-width: 0; }
.advent-share-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
  padding: 0.5rem 0.85rem; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  text-decoration: none; color: #fff;
}
/* ===== DAY PAGE POLISH (2026 brand) ===== */
/* Bigger, readable code; per-line highlight.js keeps real token colours. */
.advent-line-label {
  font-size: 0.95rem;
  line-height: 1.3;
  padding-top: 0;
  padding-bottom: 0;
}
.advent-line-code,
.advent-line-code.hljs {
  color: #c9d1d9;
  background: transparent;
  padding: 0;
}
.advent-line-label:hover { background: rgba(95, 185, 233, 0.08); }
.advent-line-label:has(.advent-line-radio:checked) {
  background: rgba(95, 185, 233, 0.16);
  border-left-color: var(--accent);
}
.advent-line-accepted .advent-line-label,
.advent-line-accepted .advent-line-label:hover {
  background: rgba(62, 207, 142, 0.13);
  border-left-color: var(--accent-success);
}
.advent-line-accepted .advent-line-number {
  color: var(--accent-success);
  font-weight: 700;
  opacity: 1;
}
.advent-line-accepted-flag {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(62, 207, 142, 0.16);
  color: var(--accent-success);
  font-weight: 800;
  opacity: 1;
}
.advent-line-radio:focus-visible ~ .advent-line-code { outline: 2px solid var(--accent); }

/* Submit button on the selected line: a small sky pill, not a native button. */
.advent-line-submit {
  margin-left: auto;
  flex-shrink: 0;
  padding: 0.28rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #072033;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(95, 185, 233, 0.3);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.advent-line-submit:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(95, 185, 233, 0.42);
}
.advent-line-submit:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(95, 185, 233, 0.3); }
.advent-line-submit:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

/* Code panel as a brand card, with room before the review. */
.advent-code-panel {
  border: 1px solid var(--card-line);
  border-radius: 14px;
  overflow: hidden;
}
.advent-code-container { background: #0d1420; }
.advent-review-panel {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--card-line);
}

/* Practise card + next-step blocks: brand sky, not purple. */
.advent-next-primary {
  border-color: rgba(95, 185, 233, 0.4);
  background: rgba(95, 185, 233, 0.08);
}
.advent-next-lab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: rgba(95, 185, 233, 0.06);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 1rem;
}
.advent-next-lab h3 { margin: 0 0 4px; font-size: 18px; color: var(--text-primary); }
.advent-next-lab p { margin: 0; font-size: 15px; color: var(--text-secondary); }
.advent-next-lab-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.advent-lab-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 9px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
}
.advent-tag-free { background: rgba(62, 207, 142, 0.18); color: #6fe3b0; }
.advent-tag-pro { background: rgba(255, 138, 76, 0.18); color: #ffb37a; }

/* Share: a quiet post-review action that does not compete with the lab CTA. */
.advent-next-share {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: rgba(95, 185, 233, 0.04);
}
.advent-share-intro { min-width: 0; }
.advent-share-label {
  display: block;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}
.advent-share-note {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 13px;
}
.advent-share-row { display: flex; flex: 0 0 auto; gap: 8px; align-items: center; margin: 0 0 0 auto; }
.advent-share-btn,
.advent-share-copy {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  justify-content: center;
  height: 42px; padding: 0 16px; border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.advent-next-share svg path { display: block; }
.advent-share-btn {
  border: 1px solid var(--card-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}
.advent-share-btn:hover {
  border-color: var(--accent);
  background: rgba(95, 185, 233, 0.1);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.advent-share-copy {
  min-width: 116px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #072033;
}
.advent-share-copy:hover { background: var(--accent-deep); transform: translateY(-1px); }
.advent-copied-icon { display: none; }
.advent-share-copy.copied .advent-copy-icon { display: none; }
.advent-share-copy.copied .advent-copied-icon { display: block; }
.advent-share-copy.copied {
  border-color: var(--accent-success);
  background: rgba(62, 207, 142, 0.14);
  color: var(--accent-success);
}

@media (max-width: 760px) {
  .advent-next-share { align-items: stretch; flex-direction: column; padding: 18px; }
  .advent-share-row { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-left: 0; }
  .advent-share-copy { grid-column: 1 / -1; }
  .advent-share-btn,
  .advent-share-copy { width: 100%; }
}

/* ===== SCALE + FIXES (read oversized at 100%; day tiles are links now) ===== */
.advent-day-card,
.advent-day-card:hover { text-decoration: none; color: inherit; }

.advent-hero { padding: 52px 0 40px; }
.advent-hero-badge { font-size: 12.5px; letter-spacing: 1.2px; padding: 8px 18px; margin-bottom: 20px; }
.advent-hero-title { font-size: clamp(2rem, 3.4vw, 2.85rem); margin-bottom: 14px; }
.advent-hero-subtitle { font-size: 16px; margin-bottom: 26px; }
.advent-hero-stats { margin-top: 26px; }
.advent-stat { padding: 15px 38px; }
.advent-stat-value { font-size: 38px; }
.advent-stat-of { font-size: 19px; }
.advent-stat-label { font-size: 13.5px; margin-top: 8px; }

.advent-calendar-section { padding: 40px 0 60px; }
.advent-calendar-header { margin-bottom: 32px; }
.advent-calendar-header h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.advent-calendar-grid { gap: 16px; }
.advent-day-card { padding: 16px; border-radius: 14px; }
.advent-day-number { font-size: 32px; }

.advent-prizes-inner { padding: 30px 36px; gap: 34px; grid-template-columns: 170px 1fr; }
.advent-prizes-art svg { width: 150px; height: auto; }
.advent-prizes-copy h2 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.advent-prizes-lead { font-size: 15.5px; margin-bottom: 18px; }
.advent-prize-card h3 { font-size: 15.5px; }

/* Day page: readable sizes + a cleaner review with calm inline code. */
.advent-day-title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.advent-review-title { font-size: clamp(1.3rem, 2vw, 1.55rem); }
.advent-review-body { width: 100%; font-size: 15.5px; line-height: 1.75; color: var(--text-secondary); }
.advent-review-body p { margin: 0 0 1rem; }
.advent-review-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  color: var(--accent-deep);
  background: rgba(95, 185, 233, 0.1);
  border: 1px solid rgba(95, 185, 233, 0.2);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ===== DAY TILE: LANGUAGE ICONS (fill the box, preview the stack) ===== */
.advent-day-top { text-align: left; line-height: 1; }
.advent-day-number { font-size: 22px; text-align: left; }

.advent-day-lang {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.advent-day-lang i { font-size: 56px; line-height: 1; }
.advent-day-lang .devicon-perl-plain.colored {
  color: #b7c4ff;
  filter: drop-shadow(0 2px 8px rgba(183, 196, 255, 0.3));
}
.advent-day-lang-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
}
.advent-day-info { text-align: center; }

/* ===== MORE: the training and PRO offer under an unsolved day =====
   The day page stopped at the code panel while the review was locked, which
   left the lower half of the screen empty. Quiet by default so it never
   competes with the puzzle; the sale variant is the only loud state. */
.advent-more {
  margin-top: 2.75rem;
  padding: 24px 26px 26px;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: rgba(95, 185, 233, 0.04);
}
.advent-more-sale {
  border-color: rgba(255, 138, 76, 0.45);
  background: rgba(255, 138, 76, 0.07);
}
.advent-more-head { margin-bottom: 20px; }
.advent-more-head h2 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--text-primary);
}
.advent-more-head p { margin: 0; font-size: 15px; color: var(--text-secondary); }
.advent-more-flag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 138, 76, 0.18);
  color: #ffb37a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.advent-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.advent-more-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: var(--bg-secondary);
}
.advent-more-card h3 { margin: 0; font-size: 17px; color: var(--text-primary); }
.advent-more-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-secondary); }
.advent-more-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: auto;
}
.advent-more-price { font-size: 19px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.advent-more-price s { margin-left: 7px; font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.advent-more-unit { margin-left: 2px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.advent-more-link { white-space: nowrap; }

@media (max-width: 720px) {
  .advent-more { padding: 20px; }
  .advent-more-grid { grid-template-columns: minmax(0, 1fr); }
}

/* The calendar's copy of the offer leads with its heading: it is the shop
   window, not a footnote under a puzzle. */
.advent-more-lead { margin-top: 3.5rem; padding: 32px 30px 30px; }
.advent-more-lead .advent-more-head { margin-bottom: 24px; }
.advent-more-lead .advent-more-head h2 { font-size: 30px; line-height: 1.2; }
.advent-more-lead .advent-more-head p { font-size: 16px; }
.advent-more-lead .advent-more-foot { justify-content: flex-start; }

@media (max-width: 720px) {
  .advent-more-lead { padding: 22px 20px; }
  .advent-more-lead .advent-more-head h2 { font-size: 24px; }
}

/* A locked day answers like a block page before it makes its offer. Styled as
   a warning strip, not a real error: nothing has gone wrong. */
.advent-locked-alert {
  display: inline-block;
  margin: 0 0 14px 10px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 122, 89, 0.45);
  border-radius: 999px;
  background: rgba(255, 122, 89, 0.12);
  color: #ff9d80;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .advent-locked-alert { margin-left: 0; }
}

/* ===== MOBILE FRIENDLY =====
   Small-screen fixes kept at the end of the file so they win over the earlier
   "scale" rules (which, among other things, forced a fixed two-column prize
   grid that squeezed the copy on phones). */
@media (max-width: 600px) {
  /* Nav: let the links flow under the logo and drop the long username, so
     nothing runs off the right edge. */
  .advent-nav { padding: 12px 0; }
  .advent-nav .advent-container { flex-wrap: wrap; gap: 10px 14px; }
  .advent-logo img { height: 32px; }
  .advent-nav-links { gap: 14px; row-gap: 8px; font-size: 13px; flex-wrap: wrap; }
  .advent-nav .nav-user { display: none; }
}

@media (max-width: 760px) {
  /* Prize panel: one column, art on top, full-width copy. */
  .advent-prizes-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 22px;
    padding: 28px 20px;
  }
  .advent-prizes-art svg { width: 120px; }
  .advent-prize-cards { grid-template-columns: 1fr; text-align: left; }
}

@media (max-width: 640px) {
  /* Day page: wrap long code lines so nothing is clipped off the right, and let
     the file-path header scroll inside its pill instead of widening the page. */
  .advent-day-content { padding: 28px 0 56px; }
  .advent-line-code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-x: visible;
    min-width: 0;
  }
  .advent-file-info { flex-wrap: wrap; gap: 8px; }
  .advent-file-name { max-width: 100%; overflow-x: auto; white-space: nowrap; }
}
