/* season.css -- TEMA DE TEMPORADA (ver season.js). Se carga DESPUES de styles.css y redefine las mismas variables de color
   cuando <html> tiene data-season. Tiene la misma especificidad que los skins (:root[data-skin]) y va despues, asi que
   la temporada gana sobre el skin que la persona tenga elegido. Para quitar el tema: Configuracion -> Tema de temporada. */

/* ---------- Halloween (octubre): naranja calabaza, morado y verde baba ---------- */
:root[data-season="halloween"] {
  --bg: #0b0710;
  --bg-glow-1: rgba(255, 122, 26, 0.14);
  --bg-glow-2: rgba(155, 92, 255, 0.14);
  --panel: #171020;
  --panel-2: #0f0916;
  --accent: #ff7a1a;
  --accent-2: #a56bff;
  --accent-3: #9dff3d;
  --text: #f4eefc;
  --muted: #a39bb5;
  --border: #2d2040;
  --text-rgb: 244 238 252;
  --bg-rgb: 11 7 16;
  --panel-rgb: 23 16 32;
  --panel-2-rgb: 15 9 22;
  --accent-rgb: 255 122 26;
  --accent-2-rgb: 165 107 255;
  --accent-3-rgb: 157 255 61;
  --muted-rgb: 163 155 181;
  --border-rgb: 45 32 64;
}

/* ---------- Accion de Gracias (noviembre): calabaza, arandano y dorado de cosecha ---------- */
:root[data-season="thanksgiving"] {
  --bg: #100a06;
  --bg-glow-1: rgba(227, 113, 28, 0.15);
  --bg-glow-2: rgba(200, 69, 58, 0.12);
  --panel: #1d130b;
  --panel-2: #140d07;
  --accent: #e8771f;
  --accent-2: #d4503f;
  --accent-3: #f0bd4a;
  --text: #f8efe4;
  --muted: #b3a291;
  --border: #3a2a1b;
  --text-rgb: 248 239 228;
  --bg-rgb: 16 10 6;
  --panel-rgb: 29 19 11;
  --panel-2-rgb: 20 13 7;
  --accent-rgb: 232 119 31;
  --accent-2-rgb: 212 80 63;
  --accent-3-rgb: 240 189 74;
  --muted-rgb: 179 162 145;
  --border-rgb: 58 42 27;
}

/* ---------- Navidad (diciembre): rojo, verde pino y dorado ---------- */
:root[data-season="christmas"] {
  --bg: #07100b;
  --bg-glow-1: rgba(255, 77, 79, 0.13);
  --bg-glow-2: rgba(47, 191, 113, 0.13);
  --panel: #0e1c14;
  --panel-2: #09140e;
  --accent: #ff4d4f;
  --accent-2: #33c27a;
  --accent-3: #ffd166;
  --text: #f2f8f4;
  --muted: #94a89c;
  --border: #1f3629;
  --text-rgb: 242 248 244;
  --bg-rgb: 7 16 11;
  --panel-rgb: 14 28 20;
  --panel-2-rgb: 9 20 14;
  --accent-rgb: 255 77 79;
  --accent-2-rgb: 51 194 122;
  --accent-3-rgb: 255 209 102;
  --muted-rgb: 148 168 156;
  --border-rgb: 31 54 41;
}

/* ---------- Adornos ---------- */
.season-strip { position: relative; display: flex; align-items: center; justify-content: space-around; height: 24px; overflow: hidden; white-space: nowrap; font-size: 15px; line-height: 24px; background: linear-gradient(180deg, rgba(var(--accent-rgb) / .18), transparent); border-bottom: 1px solid rgba(var(--accent-rgb) / .25); user-select: none; }
.season-glyph { display: inline-block; flex: none; transform-origin: top center; animation: season-sway 4.5s ease-in-out infinite; }
.season-glyph:nth-child(odd) { animation-delay: -1.7s; animation-duration: 5.2s; }
.season-glyph:nth-child(3n) { animation-delay: -3.1s; }
/* luces de Navidad */
.season-strip-christmas { justify-content: space-around; }
.season-bulb { flex: none; width: 8px; height: 11px; border-radius: 50% 50% 55% 55%; background: #ff4d4f; box-shadow: 0 0 8px 1px currentColor; color: #ff4d4f; animation: season-twinkle 2.4s ease-in-out infinite; }
.season-bulb:nth-child(4n+2) { background: #ffd166; color: #ffd166; animation-delay: -.6s; }
.season-bulb:nth-child(4n+3) { background: #33c27a; color: #33c27a; animation-delay: -1.2s; }
.season-bulb:nth-child(4n) { background: #5ab0ff; color: #5ab0ff; animation-delay: -1.8s; }

.season-orn { margin-left: 6px; display: inline-block; filter: drop-shadow(0 0 6px rgba(var(--accent-rgb) / .6)); animation: season-bob 3.2s ease-in-out infinite; }
.season-chip { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; font-size: .68rem; font-weight: 600; letter-spacing: .02em; vertical-align: middle; color: var(--accent-3); border: 1px solid rgba(var(--accent-3-rgb) / .5); background: rgba(var(--accent-rgb) / .12); }
.season-ribbon { display: inline-block; margin: 0 0 14px; padding: 7px 14px; border-radius: 12px; font-size: .88rem; line-height: 1.4; color: var(--text); background: linear-gradient(90deg, rgba(var(--accent-rgb) / .22), rgba(var(--accent-2-rgb) / .18)); border: 1px solid rgba(var(--accent-rgb) / .45); box-shadow: 0 0 18px rgba(var(--accent-rgb) / .18); max-width: 100%; }
.season-ribbon-name { color: var(--accent-3); }

/* particulas de fondo: no reciben clics y son suaves para no estorbar la lectura */
.season-layer, #authGate > .season-layer, #appRoot > .season-layer { position: fixed; inset: 0; z-index: 0; width: auto; height: auto; overflow: hidden; pointer-events: none; }
.season-bit { position: absolute; left: var(--x); top: -8vh; font-style: normal; font-size: var(--s); opacity: .42; will-change: transform; filter: drop-shadow(0 0 4px rgba(var(--accent-rgb) / .35)); animation: season-fall var(--d) linear var(--delay) infinite; }
.season-bit[data-kind="rise"] { top: auto; bottom: -8vh; animation-name: season-rise; }
.season-bit[data-kind="fly"] { left: -8vw; top: var(--y); animation-name: season-fly; animation-duration: calc(var(--d) * .8); }

@keyframes season-fall { 0% { transform: translate3d(0, -8vh, 0) rotate(0deg); } 50% { transform: translate3d(var(--sway), 55vh, 0) rotate(180deg); } 100% { transform: translate3d(calc(var(--sway) * -1), 112vh, 0) rotate(360deg); } }
@keyframes season-rise { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 15% { opacity: .5; } 50% { transform: translate3d(var(--sway), -55vh, 0); } 100% { transform: translate3d(calc(var(--sway) * -1), -112vh, 0); opacity: 0; } }
@keyframes season-fly { 0% { transform: translate3d(0, 0, 0); } 25% { transform: translate3d(28vw, -26px, 0); } 50% { transform: translate3d(58vw, 18px, 0); } 75% { transform: translate3d(86vw, -20px, 0); } 100% { transform: translate3d(116vw, 10px, 0); } }
@keyframes season-sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes season-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-2px) rotate(4deg); } }
@keyframes season-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (max-width: 640px) {
  .season-strip { height: 20px; line-height: 20px; font-size: 13px; }
  .season-glyph:nth-child(n+11) { display: none; }
  .season-bulb:nth-child(n+15) { display: none; }
  .season-chip { margin-left: 6px; font-size: .62rem; padding: 1px 8px; }
  .season-ribbon { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .season-glyph, .season-bulb, .season-orn { animation: none; }
  .season-layer { display: none; }
}

/* pantalla principal del skin Video (#svHome): capa fija con fondo propio, lleva sus propios adornos.
   Las hojas van DETRAS del contenido (z-index -1 dentro de su propio contexto) y la tira queda pegada arriba. */
#svHome > .season-layer { z-index: -1; }
#svHome > .season-strip { margin: -18px -16px 12px; }
