/* ==========================================================================
   DRAKESCRAFT SEASONAL THEMES ENGINE
   Temas estacionales activos:
   - Estándar (Todo el año: Temporada 2 Cyberpunk + End Infection)
   - Cumpleaños del Fundador & Evento Comunitario (1 al 29 de Noviembre)
   - Navidad & Solsticio Hiemal (1 al 31 de Diciembre · Corona de Bóreas)
   ========================================================================== */

/* ── TEMA CUMPLEAÑOS DEL FUNDADOR (1–29 Noviembre · 3 Fases) ───── */
body.theme-birthday {
  --bday-gold: #fbbf24;
  --bday-amber: #f59e0b;
  --bday-violet: #c084fc;
}

/* Fase 2 (22-28 Nov) y Fase 3 (29 Nov): sube la intensidad cromática */
body.theme-birthday.bday-phase-2,
body.theme-birthday.bday-phase-3 {
  --page-accent: #fbbf24;
  --page-accent-soft: rgba(251, 191, 36, 0.22);
  --page-glow: rgba(251, 191, 36, 0.34);
  background-image:
    radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 82% 58%, rgba(192, 132, 252, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 50% 88%, rgba(244, 114, 182, 0.09) 0%, transparent 40%);
}

body.theme-birthday.bday-phase-3::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(90deg, #fbbf24, #c084fc, #f472b6, #38bdf8, #fbbf24);
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.55);
  animation: dk-bday-shimmer 6s linear infinite;
}

@keyframes dk-bday-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── Cinta de cuenta atrás en el encabezado (1–29 Nov) ── */
.bday-ribbon {
  position: relative;
  z-index: 50;
  background: linear-gradient(90deg, rgba(16, 10, 28, 0.96), rgba(28, 17, 42, 0.96));
  border-bottom: 1px solid rgba(251, 191, 36, 0.28);
  padding: 7px 0;
  font-size: 0.82rem;
  color: #f3e8ff;
}

.bday-ribbon--phase-2 {
  background: linear-gradient(90deg, rgba(36, 20, 12, 0.96), rgba(38, 16, 48, 0.96), rgba(36, 20, 12, 0.96));
  border-bottom: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.14);
}

.bday-ribbon--phase-3 {
  background: linear-gradient(90deg, rgba(58, 28, 10, 0.98), rgba(52, 18, 66, 0.98), rgba(58, 28, 10, 0.98));
  border-bottom: 2px solid #fbbf24;
  box-shadow: 0 4px 26px rgba(251, 191, 36, 0.26);
  padding: 9px 0;
}

.bday-ribbon__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bday-ribbon__main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bday-ribbon__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.48);
  color: #fde68a;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bday-ribbon__text {
  color: #f8fafc;
  line-height: 1.4;
}

.bday-ribbon__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bday-ribbon__link {
  color: #fbbf24;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
}

.bday-ribbon__link:hover {
  color: #fef08a;
  text-decoration: underline;
}

.bday-ribbon__close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
}

.bday-ribbon__close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ── Controles flotantes del modo cumpleaños ── */
#drakes-birthday-widget {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, monospace);
}

.bday-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 12, 34, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 999px;
  padding: 7px 13px;
  color: #fef3c7;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bday-ctrl-btn:hover {
  border-color: #fde047;
  background: rgba(34, 20, 56, 0.96);
}

.bday-ctrl-btn[aria-pressed="true"] {
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.26);
}

@media (max-width: 760px) {
  #drakes-birthday-widget {
    bottom: 12px;
    right: 12px;
    left: auto;
    gap: 4px;
    transform: scale(.9);
    transform-origin: bottom right;
  }
  .bday-ctrl-btn {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}

/* ── Sección del Evento Comunitario de Cumpleaños (Inicio ES/EN) ── */
.bday-event-section {
  padding: 72px 0;
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(192, 132, 252, 0.09) 0%, transparent 55%);
  border-top: 1px solid rgba(251, 191, 36, 0.18);
  border-bottom: 1px solid rgba(192, 132, 252, 0.18);
}

.bday-event-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.bday-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.bday-event-quote {
  max-width: 540px;
  margin: 0;
  padding: 14px 18px;
  border-left: 3px solid #fbbf24;
  background: rgba(15, 10, 28, 0.72);
  border-radius: 0 12px 12px 0;
  color: #e2e8f0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.bday-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.bday-event-card {
  background: rgba(14, 10, 26, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bday-event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.55);
}

.bday-event-card__tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #fbbf24;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bday-event-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
}

.bday-event-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.55;
}

.bday-event-card code {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-size: 0.78rem;
}

.bday-event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(18, 12, 32, 0.78);
  border: 1px solid rgba(192, 132, 252, 0.25);
  font-size: 0.86rem;
  color: #e2e8f0;
}

.bday-event-footer__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── TEMA NAVIDAD & SOLSTICIO HIEMAL (1–31 Diciembre) ──────────── */
body.theme-christmas {
  --page-accent: #38bdf8;
  --page-accent-soft: rgba(56, 189, 248, 0.22);
  --page-glow: rgba(56, 189, 248, 0.35);
  --cyan: #38bdf8;
  --emerald: #34d399;
  --store-accent-cyan: #38bdf8;
  --store-accent-gold: #fef08a;
  --store-accent-purple: #818cf8;
  --store-card-border: rgba(56, 189, 248, 0.28);
  --store-card-hover: rgba(56, 189, 248, 0.6);
  background-color: #040814 !important;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(56, 189, 248, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(52, 211, 153, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 85%, rgba(129, 140, 248, 0.10) 0%, transparent 40%) !important;
}

body.theme-christmas .seasonal-banner {
  background: linear-gradient(135deg, rgba(8, 25, 45, 0.95), rgba(10, 38, 30, 0.95));
  border: 2px solid #38bdf8;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.28);
}

body.theme-christmas .seasonal-banner__btn {
  background: linear-gradient(135deg, #0284c7, #0f766e);
  color: #fff !important;
  border: 1px solid #7dd3fc;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.4);
}

body.theme-christmas.home-page,
body.theme-christmas .home-page {
  --home-bg: #040814 !important;
  --home-gold: #38bdf8 !important;
  --home-cream: #f0f9ff !important;
}

body.theme-christmas .title-glow {
  color: #38bdf8 !important;
  text-shadow: 0 0 30px rgba(56, 189, 248, 0.7) !important;
}

body.theme-christmas .home-cta-store {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35) 0%, rgba(52, 211, 153, 0.3) 50%, rgba(8, 25, 45, 0.95) 100%) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.35) !important;
}

/* ── Guirnalda sutil superior en Navidad ── */
body.theme-christmas::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  pointer-events: none;
  z-index: 4;
  background:
    radial-gradient(circle 3.5px at 12px 4px, #ff4d5a 0 70%, transparent 72%) 0 0 / 56px 8px repeat-x,
    radial-gradient(circle 3.5px at 40px 4px, #5bd6ff 0 70%, transparent 72%) 0 0 / 56px 8px repeat-x,
    radial-gradient(circle 3.5px at 26px 4px, #ffd75e 0 70%, transparent 72%) 0 0 / 56px 8px repeat-x;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
  animation: dk-lights 2.8s steps(2, jump-none) infinite;
}

@keyframes dk-lights {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ── ESTRUCTURA UNIVERSAL DEL BANNER ESTACIONAL ────────────────── */
.seasonal-banner {
  border-radius: 14px;
  padding: 22px 28px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.seasonal-banner::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.seasonal-banner__content {
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 1;
}

.seasonal-banner__icon {
  font-size: 2.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seasonal-banner__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.seasonal-banner__badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.seasonal-banner__title {
  margin: 0;
  font-size: 1.45rem;
  color: #fff;
  font-family: var(--font-heading), sans-serif;
  letter-spacing: -0.01em;
}

.seasonal-banner__desc {
  margin: 4px 0 0;
  color: #d0c0d8;
  font-size: 0.92rem;
  max-width: 650px;
  line-height: 1.5;
}

.seasonal-banner__btn {
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1;
}

.seasonal-banner__btn:hover {
  transform: translateY(-2px);
}

.seasonal-theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.seasonal-theme-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  body.theme-christmas::before,
  body.theme-birthday.bday-phase-3::before { animation: none !important; }
  #drakes-christmas-canvas,
  #drakes-birthday-canvas { display: none !important; }
  .bday-event-card { transition: none !important; }
}
