/* Holiday countdown pages — shared structure, then Christmas, then New Year */

body > .fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.site-main { position: relative; z-index: 1; }

.holiday-hero { text-align: center; padding: 40px 0 8px; position: relative; }
.holiday-hero .eyebrow { color: var(--hot); }
.holiday-hero h1 em { color: var(--accent); }
.holiday-hero .lead { margin-inline: auto; }
.holiday-hero .lead strong { color: var(--accent); font-weight: 500; }

.countdown { margin-top: 28px; text-align: center; overflow: visible; }
.countdown::before { background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--accent-dim) 0%, transparent 70%); border-radius: inherit; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--hot); margin-bottom: 22px; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.cd-row { display: flex; justify-content: center; align-items: flex-end; gap: 6px; flex-wrap: wrap; }
.cd-block { display: flex; flex-direction: column; align-items: center; min-width: 86px; }
.cd-val { font-family: var(--serif); font-size: clamp(44px, 9vw, 84px); line-height: 1; color: var(--accent); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cd-lab { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); margin-top: 10px; }
.cd-sep { font-family: var(--serif); font-size: clamp(32px, 6vw, 60px); color: var(--border-strong); line-height: 1; padding-bottom: 34px; }
.cd-celebrate { font-family: var(--serif); font-size: clamp(36px, 8vw, 64px); color: var(--accent); line-height: 1.1; padding: 12px 0; }

.cd-where { margin: 26px auto 0; max-width: 360px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.cd-where label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.cd-date { margin-top: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.cd-local { margin-top: 6px; font-size: 14px; color: var(--text); }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.fact-num { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.fact p { font-size: 13.5px !important; margin-top: 6px; }

.cta-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* Last minute: the numbers breathe */
.countdown.final .cd-val { animation: beat 1s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ═══════════════════════ CHRISTMAS ═══════════════════════ */
.theme-christmas {
  --bg: #0b1d12; --surface: #12261a; --surface2: #1a3223; --border: #24432f; --border-strong: #335b40;
  --accent: #f5c842; --accent-ink: #0b1d12; --accent-dim: rgba(245,200,66,0.10); --accent-glow: rgba(245,200,66,0.3);
  --hot: #ff5a5a; --berry: #c8202f; --text-dim: #a9c2ae; --text-muted: #7c9a83;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(200,32,47,0.20), transparent 70%),
    var(--bg);
}
.theme-christmas .site-header { background: rgba(11,29,18,0.8); }
.theme-christmas h1, .theme-christmas .content h2 { font-family: 'DM Serif Display', Georgia, serif; }

/* String of lights hung across the top of the page */
.lights {
  position: relative; height: 54px; margin: 0 -20px; overflow: hidden;
  display: flex; justify-content: space-around; align-items: flex-start; padding: 0 8px;
}
.lights::before {
  content: ''; position: absolute; left: -5%; right: -5%; top: -22px; height: 44px;
  border-bottom: 2px solid #26422f; border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.lights i {
  position: relative; width: 11px; height: 18px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  margin-top: 16px; background: var(--c); box-shadow: 0 0 10px 2px var(--c);
  animation: twinkle 2.6s ease-in-out infinite; animation-delay: var(--d);
}
.lights i::before { content: ''; position: absolute; top: -5px; left: 2px; width: 7px; height: 6px; border-radius: 2px; background: #3b5a44; }
.lights i:nth-child(odd) { margin-top: 22px; }
.lights i:nth-child(4n+1) { --c: #ff4d4d; }
.lights i:nth-child(4n+2) { --c: #ffd24a; }
.lights i:nth-child(4n+3) { --c: #4de08a; }
.lights i:nth-child(4n)   { --c: #5fb4ff; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 45% { opacity: .35; box-shadow: 0 0 2px 0 var(--c); } }

.xmas-tree { width: 120px; height: 150px; margin: 6px auto 10px; display: block; overflow: visible; }
.xmas-tree .star { transform-origin: 60px 16px; animation: starglow 3s ease-in-out infinite; }
.xmas-tree .bauble { animation: twinkle 3s ease-in-out infinite; }
.xmas-tree .bauble:nth-of-type(2n) { animation-delay: -1s; }
.xmas-tree .bauble:nth-of-type(3n) { animation-delay: -2s; }
@keyframes starglow { 0%, 100% { filter: drop-shadow(0 0 4px #ffd24a); transform: scale(1); } 50% { filter: drop-shadow(0 0 14px #ffd24a); transform: scale(1.12); } }

/* Each number is a wrapped present */
.theme-christmas .countdown { border-color: #2c5236; background: linear-gradient(180deg, #15301f, #10241a); }
.theme-christmas .cd-block { position: relative; min-width: 92px; }
.theme-christmas .cd-val {
  position: relative; color: #fff7e2; background: linear-gradient(160deg, #d42a39, #9e1624);
  border-radius: 12px; padding: 18px 14px 14px; min-width: 92px; text-align: center;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.18), 0 10px 24px rgba(0,0,0,0.35);
  text-shadow: 0 2px 0 rgba(0,0,0,0.25);
}
.theme-christmas .cd-val::before {   /* ribbon */
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 10px; transform: translateX(-50%);
  background: linear-gradient(90deg, #e9b632, #ffe08a, #e9b632); opacity: .55; z-index: -1;
}
.theme-christmas .cd-val { isolation: isolate; }
.theme-christmas .cd-val::after {    /* bow */
  content: ''; position: absolute; top: -9px; left: 50%; width: 30px; height: 14px; transform: translateX(-50%);
  background:
    radial-gradient(ellipse 8px 7px at 8px 7px, #ffd24a 98%, transparent) ,
    radial-gradient(ellipse 8px 7px at 22px 7px, #ffd24a 98%, transparent),
    radial-gradient(circle 3.5px at 15px 8px, #e9a520 98%, transparent);
}
.theme-christmas .cd-block:nth-of-type(4n+3) .cd-val { background: linear-gradient(160deg, #1f8a4c, #13633a); }
.theme-christmas .cd-block:nth-of-type(4n+5) .cd-val { background: linear-gradient(160deg, #2a5fae, #1b427f); }
.theme-christmas .cd-sep { color: #5d8a69; padding-bottom: 40px; }
.theme-christmas .cd-celebrate { color: #fff3c4; text-shadow: 0 0 24px rgba(255,210,74,0.6); }

.fx-toggle[aria-pressed="false"] { opacity: .75; }

/* ═══════════════════════ NEW YEAR ═══════════════════════ */
.theme-newyear {
  --bg: #07061a; --surface: rgba(20,18,52,0.72); --surface2: #1b1946; --border: #2b2768; --border-strong: #3e3a8a;
  --accent: #ffd56b; --accent-ink: #07061a; --accent-dim: rgba(255,213,107,0.12); --accent-glow: rgba(255,213,107,0.35);
  --hot: #ff4fd8; --neon2: #3ee6ff; --text-dim: #b0b3e0; --text-muted: #8085bd;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(255,79,216,0.18), transparent 70%),
    radial-gradient(900px 500px at 90% 0%, rgba(62,230,255,0.14), transparent 70%),
    var(--bg);
}
.theme-newyear .site-header { background: rgba(7,6,26,0.75); }

.party-year {
  font-family: var(--serif); font-size: clamp(88px, 22vw, 210px); line-height: .9; letter-spacing: -.03em;
  margin: 4px 0 6px; user-select: none;
  background: linear-gradient(100deg, #b8862b 0%, #ffe9a8 22%, #ffd56b 38%, #fff6d8 50%, #e2a93b 64%, #ffe39a 80%, #b8862b 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
  filter: drop-shadow(0 6px 30px rgba(255,213,107,0.25));
}
@keyframes shimmer { to { background-position: -250% 0; } }

.theme-newyear .countdown {
  background: linear-gradient(180deg, rgba(27,25,70,0.85), rgba(14,12,40,0.85));
  border: 1px solid transparent; backdrop-filter: blur(6px);
  background-clip: padding-box;
  box-shadow: 0 0 0 1px rgba(255,79,216,0.35), 0 0 40px rgba(255,79,216,0.15), 0 0 80px rgba(62,230,255,0.08);
}
.theme-newyear .cd-val {
  background: linear-gradient(180deg, #fff6d8, #ffd56b 55%, #d99a2b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255,213,107,0.35));
}
.theme-newyear .cd-block {
  padding: 16px 10px 12px; border-radius: 14px; min-width: 96px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
}
.theme-newyear .cd-sep { color: var(--hot); opacity: .6; padding-bottom: 46px; }
.theme-newyear .live-badge { color: var(--neon2); }
.theme-newyear .cd-celebrate {
  background: linear-gradient(100deg, #ff4fd8, #ffd56b, #3ee6ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.theme-newyear .btn.party { border-color: rgba(255,79,216,0.6); color: #ffc1f1; }
.theme-newyear .btn.party:hover { background: rgba(255,79,216,0.12); color: #fff; border-color: var(--hot); }

/* Midnight around the world */
.world td.when { white-space: nowrap; }
.world tr.done td { color: var(--text-muted); }
.world tr.done td.status { color: var(--accent); }
.world tr.next td { background: rgba(255,79,216,0.08); color: var(--text); }
.world tr.next td.status { color: var(--hot); font-weight: 500; }
.world td.status { font-family: var(--mono); font-size: 13px; white-space: nowrap; }

@media (max-width: 560px) {
  .cd-block { min-width: 64px; }
  .theme-christmas .cd-block, .theme-christmas .cd-val { min-width: 66px; }
  .theme-christmas .cd-val { padding: 14px 8px 10px; }
  .theme-newyear .cd-block { min-width: 68px; padding: 12px 4px 10px; }
  .cd-sep { display: none; }
  .cd-row { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .party-year { animation: none; }
}

/* ═══════════════════ SIMPLER HOLIDAY PAGES ═══════════════════
   Valentine's, Easter, July 4th, Halloween, Thanksgiving share one layout
   (app/holiday-page.php); each theme only sets colors and the hero icon. */
.theme-holiday h1, .theme-holiday .content h2 { font-family: 'DM Serif Display', Georgia, serif; }
.theme-holiday .site-header { background: color-mix(in srgb, var(--bg) 82%, transparent); }
.hol-icon { display: flex; justify-content: center; margin: 4px auto 12px; }
.hol-icon svg { overflow: visible; filter: drop-shadow(0 8px 24px var(--accent-glow)); }
.theme-holiday .countdown { background: linear-gradient(180deg, var(--surface2), var(--surface)); border-color: var(--border-strong); }
.theme-holiday .cd-block {
  padding: 16px 10px 12px; border-radius: 14px; min-width: 96px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
}
.theme-holiday .cd-sep { padding-bottom: 46px; }
.theme-holiday .cd-celebrate { text-shadow: 0 0 24px var(--accent-glow); }

.theme-valentine {
  --bg: #1e0b14; --surface: #2a111d; --surface2: #361626; --border: #4a1f34; --border-strong: #6a2c4a;
  --accent: #ff6b93; --accent-ink: #1e0b14; --accent-dim: rgba(255,107,147,0.12); --accent-glow: rgba(255,107,147,0.35);
  --hot: #ffb3c8; --text-dim: #d9a5b6; --text-muted: #a77c8b;
  background: radial-gradient(1000px 480px at 50% -10%, rgba(255,77,122,0.22), transparent 70%), var(--bg);
}
.theme-valentine .hol-icon .beat { transform-origin: 60px 55px; animation: heartbeat 1.6s ease-in-out infinite; }
@keyframes heartbeat { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.1); } 28% { transform: scale(1.04); } }

.theme-easter {
  --bg: #141a2a; --surface: #1b2236; --surface2: #222b44; --border: #2f3a5a; --border-strong: #42507a;
  --accent: #c9b8ff; --accent-ink: #141a2a; --accent-dim: rgba(201,184,255,0.12); --accent-glow: rgba(201,184,255,0.3);
  --hot: #8fe3c6; --text-dim: #aab6d3; --text-muted: #7e8aa8;
  background:
    radial-gradient(800px 420px at 20% -10%, rgba(143,227,198,0.14), transparent 70%),
    radial-gradient(800px 420px at 85% 0%, rgba(255,224,138,0.12), transparent 70%), var(--bg);
}
.theme-easter .hol-icon svg { animation: wobble 4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 46% { transform: rotate(0); } 50% { transform: rotate(-6deg); } 54% { transform: rotate(5deg); } 58% { transform: rotate(0); } }

.theme-july4 {
  --bg: #0a1430; --surface: #101c40; --surface2: #15234f; --border: #22346b; --border-strong: #31488f;
  --accent: #ff4d5e; --accent-ink: #fff; --accent-dim: rgba(255,77,94,0.12); --accent-glow: rgba(255,77,94,0.3);
  --hot: #8fb0ff; --text-dim: #a9b8e0; --text-muted: #7b8bb8;
  background:
    radial-gradient(900px 460px at 15% -10%, rgba(255,77,94,0.16), transparent 70%),
    radial-gradient(900px 460px at 90% 0%, rgba(91,140,255,0.18), transparent 70%), var(--bg);
}
.theme-july4 .cd-val { color: #f4f6ff; }
.theme-july4 .cd-block:nth-of-type(4n+1) .cd-val { color: var(--accent); }
.theme-july4 .hol-icon .burst { transform-origin: 60px 60px; animation: burst 2.8s ease-out infinite; }
@keyframes burst { 0% { transform: scale(.4); opacity: 0; } 25% { opacity: 1; } 70% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }

.theme-halloween {
  --bg: #120c08; --surface: #1c140e; --surface2: #261b12; --border: #3a2817; --border-strong: #5a3b1d;
  --accent: #ff7f24; --accent-ink: #120c08; --accent-dim: rgba(255,127,36,0.12); --accent-glow: rgba(255,127,36,0.35);
  --hot: #b78cff; --text-dim: #c2a58a; --text-muted: #8e7660;
  background: radial-gradient(1000px 480px at 50% -10%, rgba(183,140,255,0.14), transparent 70%), var(--bg);
}
.theme-halloween .hol-icon .glow { animation: flicker 3s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 42% { opacity: .75; } 46% { opacity: 1; } 70% { opacity: .85; } }

.theme-thanksgiving {
  --bg: #1a0f08; --surface: #24160c; --surface2: #2e1c10; --border: #452a16; --border-strong: #66401f;
  --accent: #f0913a; --accent-ink: #1a0f08; --accent-dim: rgba(240,145,58,0.12); --accent-glow: rgba(240,145,58,0.3);
  --hot: #e8c25a; --text-dim: #c9a888; --text-muted: #957a62;
  background: radial-gradient(1000px 480px at 50% -10%, rgba(217,102,31,0.2), transparent 70%), var(--bg);
}
.theme-thanksgiving .hol-icon svg { animation: sway 5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* Christmas countdown calendar (Dec 1–25) */
.content .advent, .advent { display: grid; padding-left: 0 !important; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 14px; list-style: none; padding: 0; }
.advent li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 8px 9px; text-align: center;
  margin: 0 !important;
}
.advent .adv-date { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.advent .adv-left { font-family: var(--serif); font-size: 22px; line-height: 1.15; color: var(--text); margin-top: 3px; }
.advent .adv-lab { font-size: 11.5px; color: var(--text-dim); }
.advent li.past { opacity: .45; }
.advent li.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--accent-glow); }
.advent li.today .adv-left { color: var(--accent); }
.advent li.big { background: linear-gradient(160deg, #d42a39, #9e1624); border-color: #d42a39; }
.advent li.big .adv-date, .advent li.big .adv-lab { color: #ffe3c4; }
.advent li.big .adv-left { color: #fff7e2; }

@media (max-width: 560px) {
  .theme-holiday .cd-block { min-width: 68px; padding: 12px 4px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hol-icon svg, .hol-icon .beat, .hol-icon .burst, .hol-icon .glow { animation: none !important; }
}
