:root {
  --bg-color: #020618;
  --card-bg: rgba(12, 24, 48, 0.9);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-radius: 18px;
  --text-main: #ffffff;
  --text-secondary: #cfd5ff;
  --accent: #ffc93a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  /* overlay gradient + image */
  background-image:
    linear-gradient(180deg, rgba(2, 6, 23, 0.62) 0%, rgba(2, 6, 23, 0.35) 40%, rgba(2, 6, 23, 0.62) 100%),
    url("../img/xmas-bg0.jpeg");
  background-size: cover, cover;
  background-position: center top, center top;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll, scroll;
    background-position: center top, center top;
  }
}

/* Smooth background animation */
 
/* Cinematic glow layers behind snow */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -25%;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.08) 0, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(148, 163, 255, 0.12) 0, transparent 65%);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: bgGlow 32s ease-in-out infinite alternate;
  z-index: -1; /* stay under snow canvas */
}

body::after {
  opacity: 0.4;
  animation-duration: 46s;
  animation-delay: 6s;
}

@keyframes bgGlow {
  0% {
    transform: translate3d(-20px, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(10px, -10px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(25px, 10px, 0) scale(1.08);
  }
}

/* Snow canvas sits above glow, but below the main page content */
.snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Ensure the main content stays above snow 111*/
.page {
  position: relative;
  z-index: 1;
}

@keyframes floatGlow {
  0% {
    transform: translate3d(-20px, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(20px, -10px, 0) scale(1.05);
  }
}

 

 

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body::before, body::after {
    animation: none !important;
  }
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  position: relative;
  z-index: 1;
}

.header {
  margin-bottom: 32px;
  text-align: center;
}

.header-title {
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.header-subtitle {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* Winners Button */
.header-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.btn-winners {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, 
    rgba(255, 201, 58, 0.95) 0%, 
    rgba(255, 170, 0, 0.9) 100%);
  color: #020618;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 
    0 4px 20px rgba(255, 201, 58, 0.4),
    0 8px 40px rgba(255, 201, 58, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-winners::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.3) 0%, 
    transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-winners:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 6px 30px rgba(255, 201, 58, 0.5),
    0 12px 50px rgba(255, 201, 58, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-winners:hover::before {
  opacity: 1;
}

.btn-winners:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-winners__icon {
  font-size: 1.3rem;
  line-height: 1;
  animation: trophyBounce 2s ease-in-out infinite;
}

.btn-winners__text {
  line-height: 1;
}

@keyframes trophyBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.1);
  }
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .btn-winners {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
  
  .btn-winners__icon {
    font-size: 1.2rem;
  }
}

/* Logo image styles */

.logo {
  position: fixed;
  right: 24px;
  top: 20px;
  z-index: 20;                  /* above snow and everything */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 12px;

  /* subtle frosted background */
  background: rgba(5, 10, 24, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition: opacity 0.25s ease, transform 0.25s ease;
}

.logo:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

.logo-img {
  height: 32px;                 /* adjusts automatically */
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}

@media (max-width: 640px) {
  .logo {
    right: 16px;
    top: 14px;
    padding: 4px 8px;
  }

  .logo-img {
    height: 26px;
  }
}


.layout {
  display: grid;
  grid-template-columns: 540px minmax(0, 1fr); 
  gap: 24px;
  align-items: flex-start;
}




/* Floating back button for mobile (scrolls to days-nav) */
.back-to-nav {
  display: none; /* hidden by default (desktop) */
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: radial-gradient(circle at 30% 0, #fde68a 0, #f97316 45%, #7c2d12 100%);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65);
  color: #0b1020;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 15;
  align-items: center;
  justify-content: center;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out,
    box-shadow 0.2s ease-out,
    transform 0.2s ease-out;
}

.back-to-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-nav:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

/* Lock icon for disabled day navigation buttons */
.days-nav__btn {
  position: relative;
}

.days-nav__btn::before {
  content: "🔒";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.days-nav__btn.is-disabled::before {
  opacity: 1;
}

.days-nav__btn {
  padding-left: 26px;
}

.days-nav__btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.6);
}

/* Show floating button only on mobile */
@media (max-width: 640px) {
  .back-to-nav {
    display: flex;
  }

  /* you already have responsive styles for 640px — just add here */
}


/* Left column (Gleam) */
.gleam-wrapper {
  background: rgba(5, 10, 24, 0.8);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  min-height: 520px;
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
}


.gleam-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  opacity: 0.7;
}

.gleam-frame {
  flex: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #050816;
  width: 100%;
}


.gleam-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 16px;
  text-align: center;
}

/* Right column (day cards) */
.days-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.days-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  opacity: 0.9;
}

.cards-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(320px, 360px));
  justify-content: flex-start;
}



/* Responsive */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .logo {
    position: static;
    text-align: right;
    margin-bottom: 8px;
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header {
    margin-top: 32px;
  }
}

/* Day card */
.day-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--card-border);
  overflow: hidden;
  cursor: default;
  max-width: 360px;
  height: 590px;       /* fixed card height */
  min-height: 590px;

  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(14px);
  animation: cardFadeIn 0.5s ease forwards;
}

@media (max-width: 640px) {
  .day-card {
    height: 420px;
    min-height: 420px;
  }
}


.day-card:nth-child(1) { animation-delay: 0.05s; }
.day-card:nth-child(2) { animation-delay: 0.1s; }
.day-card:nth-child(3) { animation-delay: 0.15s; }
.day-card:nth-child(4) { animation-delay: 0.2s; }
.day-card:nth-child(5) { animation-delay: 0.25s; }
.day-card:nth-child(6) { animation-delay: 0.3s; }
.day-card:nth-child(7) { animation-delay: 0.35s; }

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.day-card__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.day-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* === APPLE-STYLE PREVIEW BLUR BG === */

.day-card__preview {
  position: relative;
  flex: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #050816; /* base background under image */
}

/* Blurred background from the same image */
.day-card__preview::before {
  content: "";
  position: absolute;
  inset: -20px;
  background-image: var(--preview-bg-image);
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.7);
  transform: scale(1.05);
  z-index: 0;
}

/* Light darkening gradient on top */
.day-card__preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.08) 0, transparent 55%),
    linear-gradient(to bottom, rgba(5, 10, 24, 0.2), rgba(5, 10, 24, 0.9));
  z-index: 1;
}

/* Main image on top of blur */
.day-card__bg {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;      /* important: we don't crop anything */
  object-position: top center;
  pointer-events: none;
}


/* Overlay with text and lock — topmost layer */
.day-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(
    to bottom,
    rgba(6, 10, 24, 0.2),
    rgba(6, 10, 24, 0.9)
  );
  color: var(--text-secondary);
  text-align: center;
  padding: 12px;
}


.day-card__lock-icon {
  font-size: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0, transparent 70%);
  animation: lockPulse 2.4s ease-in-out infinite;
}

@keyframes lockPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.day-card__lock-text {
  font-size: 0.85rem;
  opacity: 0.9;
}

.day-card__status {
  margin-top: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0.9;
}

.day-card__status-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
}

/* State: unlocked */
.day-card.card--unlocked {
  cursor: pointer;
}

.day-card.card--unlocked .day-card__overlay {
  background: linear-gradient(to top, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.1));
  align-items: flex-start;
  justify-content: flex-end;
  padding: 14px;
}

.day-card.card--unlocked .day-card__lock-icon {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.3);
  animation: none;
}

.day-card.card--unlocked .day-card__lock-text::before {
  content: "Tap to open • ";
  font-weight: 500;
  color: var(--accent);
}

.day-card.card--unlocked:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
}

.day-card.card--unlocked:hover .day-card__preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0, rgba(255, 255, 255, 0.18), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.day-card.card--unlocked .day-card__status-badge {
  border-color: rgba(255, 201, 58, 0.6);
  background: rgba(255, 201, 58, 0.06);
  color: #ffe3a1;
}

/* Modal window for stories */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 16px;
}

.modal-backdrop.is-visible {
  display: flex;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal {
    width: 90vw;
    max-width: 1000px;       /* was 720px */
    max-height: 90vh;
    background: rgba(9, 9, 20, 0.96);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.modal-header {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  position: relative;
  flex: 1;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slide-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
}

.modal-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 8px;
}

.modal-nav-btn {
  pointer-events: auto;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.modal-footer {
  padding: 8px 16px 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

@media (max-width: 640px) {
    .modal {
        width: 95vw;
        max-width: none;
    }

    .slide-image {
        max-height: 60vh; /* so image doesn't overflow screen */
    }
}


.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  opacity: 0.5;
}

.dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}
/* Mobile navigation for days */
.days-nav {
  display: none;                 /* hidden by default (desktop) */
  margin: 16px auto 0;
  max-width: 520px;
  gap: 8px;
}

.days-nav__btn {
  flex: 1 1 calc(33.33% - 8px);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  white-space: nowrap;
}
.days-nav__btn {
  position: relative; /* needed for ::before */
  /* everything else — as you already have */
}

/* Base pseudo-element (hidden by default) */
.days-nav__btn::before {
  content: "🔒";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* On disabled buttons — show lock */
.days-nav__btn.is-disabled::before {
  opacity: 1;
}

/* So text doesn't overlap lock */
.days-nav__btn {
  padding-left: 26px; /* slightly more padding on left */
}

/* You already added this, but let it be complete */
.days-nav__btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.6);
}

.days-nav__btn.is-active {
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #0b1020;
  border-color: rgba(250, 204, 21, 0.9);
  font-weight: 600;
}

/* Show menu only on mobile */
@media (max-width: 640px) {
  .days-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* so scroll to card doesn't stick to the very top */
  .day-card {
    scroll-margin-top: 88px;
  }
}
