@import url("https://fonts.googleapis.com/css2?family=Creepster&display=swap");

/* Halloween téma – csak html[data-theme="halloween"] alatt aktív, a klasszikus téma a styles.css-ben marad */

.halloween-decor,
.halloween-only {
  display: none;
}

html[data-theme="halloween"] {
  color-scheme: dark;
  --bg: #120b1f;
  --bg-alt: #2a1245;
  --ink: #f3e9d2;
  --accent: #ff7a18;
  --accent-dark: #ff9d4d;
  --accent-mint: #8aff3d;
  --accent-sand: #3a1d5c;
  --muted: #b9a8d6;
  --card: #1d1230;
  --shadow: rgba(0, 0, 0, 0.5);
  --outline: rgba(255, 122, 24, 0.4);
  --ink-strong: #fff3d6;
  --surface-warm: rgba(29, 18, 48, 0.92);
  --pill-warm: #3a1d5c;
  --pill-ink: #ffc48a;
  --card-warm: #251640;
  --hw-glow: 0 0 18px rgba(255, 122, 24, 0.45);
  --hw-slime: #8aff3d;
}

/* ---------- Alap ---------- */
html[data-theme="halloween"] body {
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 122, 24, 0.22), transparent 38%),
    radial-gradient(circle at 15% 90%, rgba(138, 255, 61, 0.08), transparent 40%),
    linear-gradient(160deg, #0d0716 0%, #1b0e30 45%, #2a1245 100%);
  background-color: var(--bg);
  background-attachment: fixed;
}

html[data-theme="halloween"] body::before {
  background: radial-gradient(circle, rgba(255, 122, 24, 0.28), transparent 70%);
}

html[data-theme="halloween"] body::after {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 70%);
}

html[data-theme="halloween"] h1,
html[data-theme="halloween"] h3.week-title,
html[data-theme="halloween"] .week-title {
  font-family: "Creepster", "Space Grotesk", sans-serif;
  font-weight: 400;
  letter-spacing: 0.06em;
}

html[data-theme="halloween"] ::selection {
  background: var(--accent);
  color: #120b1f;
}

/* ---------- Fejléc ---------- */
html[data-theme="halloween"] .site-header {
  background: linear-gradient(120deg, rgba(13, 7, 22, 0.94), rgba(42, 18, 69, 0.9));
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 6px 28px rgba(255, 122, 24, 0.25);
}

html[data-theme="halloween"] .brand h1 {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(255, 122, 24, 0.7), 2px 2px 0 #3a0f66;
}

html[data-theme="halloween"] .brand h1::before {
  content: "🎃 ";
}

html[data-theme="halloween"] .brand-kicker {
  color: var(--hw-slime);
  text-shadow: 0 0 8px rgba(138, 255, 61, 0.5);
}

html[data-theme="halloween"] .user-pill.is-logged-in {
  background: rgba(255, 122, 24, 0.18);
  color: var(--accent-dark);
  border-color: rgba(255, 122, 24, 0.5);
}

html[data-theme="halloween"] .admin-pill {
  background: rgba(138, 255, 61, 0.12);
  color: var(--hw-slime);
  border-color: rgba(138, 255, 61, 0.4);
}

/* ---------- Gombok ---------- */
html[data-theme="halloween"] .primary {
  background: linear-gradient(135deg, #ff7a18, #ff4d00);
  color: #1a0b2e;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(255, 94, 0, 0.35), var(--hw-glow);
}

html[data-theme="halloween"] .primary:hover {
  background: linear-gradient(135deg, #ffa24d, #ff7a18);
  box-shadow: 0 12px 26px rgba(255, 94, 0, 0.5), 0 0 24px rgba(255, 122, 24, 0.65);
}

html[data-theme="halloween"] .signup-button {
  background: linear-gradient(135deg, #ff7a18, #ff4d00);
  box-shadow: 0 8px 20px rgba(255, 94, 0, 0.35);
}

html[data-theme="halloween"] .signup-button:hover {
  background: linear-gradient(135deg, #ffa24d, #ff7a18);
}

html[data-theme="halloween"] .ghost {
  border-color: rgba(255, 122, 24, 0.7);
  color: var(--accent-dark);
  background: rgba(255, 122, 24, 0.06);
}

html[data-theme="halloween"] .ghost:hover {
  border-color: var(--hw-slime);
  color: var(--hw-slime);
  box-shadow: 0 0 14px rgba(138, 255, 61, 0.3);
}

html[data-theme="halloween"] .auth-toggle .ghost.is-active,
html[data-theme="halloween"] .theme-switch .ghost.is-active {
  background: rgba(255, 122, 24, 0.22);
  border-color: var(--accent);
  color: var(--ink-strong);
}

html[data-theme="halloween"] .icon-button {
  background: rgba(255, 122, 24, 0.2);
  color: var(--ink);
}

html[data-theme="halloween"] .scroll-top {
  background: linear-gradient(135deg, #ff7a18, #ff4d00);
  color: #1a0b2e;
  box-shadow: var(--hw-glow);
}

/* ---------- Naptár ---------- */
html[data-theme="halloween"] .calendar-header {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 122, 24, 0.5);
}

html[data-theme="halloween"] .calendar-time {
  background: rgba(37, 22, 64, 0.85);
  border-color: rgba(255, 122, 24, 0.3);
  color: var(--accent-dark);
}

html[data-theme="halloween"] .calendar-slot {
  background: linear-gradient(160deg, rgba(42, 24, 72, 0.95), rgba(25, 14, 44, 0.95));
  border: 1px solid rgba(255, 122, 24, 0.28);
  color: var(--ink);
}

html[data-theme="halloween"] .calendar-slot.active {
  border-color: rgba(255, 122, 24, 0.75);
  box-shadow: 0 10px 28px rgba(255, 122, 24, 0.22), inset 0 0 22px rgba(255, 122, 24, 0.08);
}

html[data-theme="halloween"] .calendar-slot.active:hover {
  box-shadow: 0 14px 34px rgba(255, 122, 24, 0.4), inset 0 0 26px rgba(255, 122, 24, 0.12);
}

html[data-theme="halloween"] .calendar-slot.active::after {
  content: "🕸️";
  position: absolute;
  top: 2px;
  right: 6px;
  font-size: 0.9rem;
  opacity: 0.35;
  pointer-events: none;
}

html[data-theme="halloween"] .slot-closed {
  background: rgba(24, 14, 40, 0.75);
  border-color: rgba(185, 168, 214, 0.28);
  border-style: dashed;
  color: var(--muted);
}

html[data-theme="halloween"] .slot-time {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255, 122, 24, 0.55);
}

html[data-theme="halloween"] .slot-title {
  color: var(--ink-strong);
}

html[data-theme="halloween"] .badge,
html[data-theme="halloween"] .badge--soon {
  background: rgba(138, 255, 61, 0.15);
  color: var(--hw-slime);
  border: 1px solid rgba(138, 255, 61, 0.35);
}

/* ---------- Kártyák, modalok, admin ---------- */
html[data-theme="halloween"] .card {
  background: var(--card-warm);
  border: 1px solid rgba(255, 122, 24, 0.25);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

html[data-theme="halloween"] .card::before {
  background: linear-gradient(140deg, rgba(255, 122, 24, 0.14), transparent 55%);
}

html[data-theme="halloween"] .modal {
  background: rgba(8, 4, 16, 0.82);
}

html[data-theme="halloween"] .modal-content {
  background: linear-gradient(170deg, #25163f, #170d2a);
  border: 1px solid rgba(255, 122, 24, 0.45);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6), 0 0 28px rgba(255, 122, 24, 0.18);
}

html[data-theme="halloween"] .modal-content h3 {
  color: var(--accent);
}

html[data-theme="halloween"] .admin-page {
  background: transparent;
}

html[data-theme="halloween"] .admin-page .admin-shell {
  background: rgba(29, 18, 48, 0.94);
  border: 1px solid rgba(255, 122, 24, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

html[data-theme="halloween"] .panel-header,
html[data-theme="halloween"] .my-signups {
  border-color: rgba(255, 122, 24, 0.25);
}

html[data-theme="halloween"] .notice {
  background: rgba(255, 122, 24, 0.09);
  border-color: rgba(255, 122, 24, 0.3);
  color: var(--ink);
}

html[data-theme="halloween"] .consent-box {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.4);
}

html[data-theme="halloween"] .pass-buy-section {
  background: rgba(255, 122, 24, 0.07);
  border-color: rgba(255, 122, 24, 0.3);
}

html[data-theme="halloween"] .pass-table {
  background: rgba(37, 22, 64, 0.75);
  border-color: rgba(255, 122, 24, 0.28);
  color: var(--ink);
}

html[data-theme="halloween"] .pass-table th {
  background: rgba(255, 122, 24, 0.16);
  color: var(--accent-dark);
}

html[data-theme="halloween"] .pass-table th,
html[data-theme="halloween"] .pass-table td {
  border-bottom-color: rgba(255, 122, 24, 0.15);
}

html[data-theme="halloween"] .pass-debt {
  color: #ff6b6b;
}

html[data-theme="halloween"] .quick-menu {
  background: rgba(24, 14, 40, 0.92);
  border-color: rgba(255, 122, 24, 0.3);
}

html[data-theme="halloween"] .quick-buttons button {
  background: rgba(37, 22, 64, 0.9);
  color: var(--ink);
  border-color: rgba(255, 122, 24, 0.4);
}

html[data-theme="halloween"] .quick-buttons button.is-active {
  background: rgba(255, 122, 24, 0.25);
  border-color: var(--accent);
}

html[data-theme="halloween"] .quick-buttons button.is-past {
  color: rgba(243, 233, 210, 0.5);
  border-color: rgba(243, 233, 210, 0.2);
}

/* ---------- Űrlapok ---------- */
html[data-theme="halloween"] input,
html[data-theme="halloween"] textarea,
html[data-theme="halloween"] select {
  background: #140a24;
  color: var(--ink);
  border: 1px solid rgba(255, 122, 24, 0.4);
}

html[data-theme="halloween"] input::placeholder,
html[data-theme="halloween"] textarea::placeholder {
  color: rgba(185, 168, 214, 0.65);
}

html[data-theme="halloween"] input:focus,
html[data-theme="halloween"] textarea:focus,
html[data-theme="halloween"] select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: 0 0 14px rgba(255, 122, 24, 0.35);
}

html[data-theme="halloween"] input:disabled {
  opacity: 0.6;
}

/* ---------- Toast ---------- */
html[data-theme="halloween"] .toast {
  background: rgba(26, 11, 46, 0.96);
  border: 1px solid rgba(255, 122, 24, 0.5);
}

html[data-theme="halloween"] .toast.success {
  background: rgba(30, 80, 20, 0.95);
  border-color: rgba(138, 255, 61, 0.6);
}

/* ---------- Dekoráció ---------- */
html[data-theme="halloween"] .halloween-decor {
  display: block;
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 11;
}

html[data-theme="halloween"] .hw-moon {
  display: block;
  position: fixed;
  top: 110px;
  right: 6vw;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #ffd77a 60%, #e8a93c 100%);
  box-shadow: 0 0 60px 20px rgba(255, 215, 122, 0.25);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

html[data-theme="halloween"] .hw-bat,
html[data-theme="halloween"] .hw-ghost {
  position: absolute;
  left: -60px;
  line-height: 1;
  user-select: none;
}

html[data-theme="halloween"] .hw-bat {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.6));
  animation: hwBatFly 18s linear infinite;
}

html[data-theme="halloween"] .hw-bat--1 { top: 18%; animation-duration: 16s; }
html[data-theme="halloween"] .hw-bat--2 { top: 42%; font-size: 1.3rem; animation-duration: 22s; animation-delay: -8s; }
html[data-theme="halloween"] .hw-bat--3 { top: 68%; font-size: 1.5rem; animation-duration: 26s; animation-delay: -15s; }

html[data-theme="halloween"] .hw-ghost {
  font-size: 2.2rem;
  opacity: 0.55;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
  animation: hwGhostFloat 9s ease-in-out infinite;
}

html[data-theme="halloween"] .hw-ghost--1 { left: auto; right: 3vw; bottom: 22%; }
html[data-theme="halloween"] .hw-ghost--2 { left: 2vw; bottom: 10%; font-size: 1.6rem; animation-delay: -4s; opacity: 0.4; }

html[data-theme="halloween"] .hw-spider {
  position: absolute;
  top: 0;
  left: 58%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  animation: hwSpiderSwing 4s ease-in-out infinite;
}

html[data-theme="halloween"] .hw-spider-thread {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.6));
}

html[data-theme="halloween"] .hw-spider-body {
  font-size: 1.5rem;
  margin-top: -4px;
}

html[data-theme="halloween"] .hw-fog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(to top, rgba(124, 58, 237, 0.22), transparent);
  animation: hwFog 8s ease-in-out infinite alternate;
}

@keyframes hwBatFly {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(30vw, -40px) scale(1.1); }
  50%  { transform: translate(60vw, 30px) scale(0.95); }
  75%  { transform: translate(90vw, -30px) scale(1.1); }
  100% { transform: translate(120vw, 10px) scale(1); }
}

@keyframes hwGhostFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-22px) rotate(4deg); }
}

@keyframes hwSpiderSwing {
  0%, 100% { transform: rotate(-5deg); }
  50%      { transform: rotate(5deg); }
}

@keyframes hwFog {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

@media (max-width: 720px) {
  html[data-theme="halloween"] .hw-moon { top: 20px; width: 70px; height: 70px; }
  html[data-theme="halloween"] .hw-spider { display: none; }
  html[data-theme="halloween"] .hw-ghost--1 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="halloween"] .hw-bat,
  html[data-theme="halloween"] .hw-ghost,
  html[data-theme="halloween"] .hw-spider,
  html[data-theme="halloween"] .hw-fog {
    animation: none;
  }
  html[data-theme="halloween"] .hw-bat { display: none; }
}
