/* ============================================================
   HALLOWEEN — decorazioni e ritocchi del tema di stagione
   Caricato da resources/views/partials/season-head.blade.php solo quando
   App\Services\SeasonService dice che e' Halloween (1/10 - 2/11).
   I colori del tema arrivano gia' viola/zucca da halloween-iw2.css (generato):
   qui c'e' solo cio' che il generatore non puo' fare (sfondi, decorazioni,
   componenti con colori scritti nel markup).
   Tavolozza: viola #b14aff, viola notte #1d0d27, zucca #ff7a1a, lime #9dff4f.
   ============================================================ */

:root {
  --hw-purple: #b14aff;
  --hw-purple-soft: #ce8fff;
  --hw-night: #12071b;
  --hw-night-2: #1d0d27;
  --hw-pumpkin: #ff7a1a;
  --hw-pumpkin-soft: #ffa552;
  --hw-slime: #9dff4f;
  --hw-line: rgba(177, 74, 255, 0.35);
}

/* le variabili del layout (app.blade.php) che colorano bordi e titoli "oro" */
body.season-halloween {
  --gold-primary: #f59342;
  --gold-light: #ffb36b;
  --amber-500: #ff7a1a;
  --amber-600: #e8620c;
  --amber-700: #8b2fc9;
  --amber-800: #5a1a85;
  --amber-900: #3b0f5c;
  --copper-border: #744b8b;
  --dark-bg: #12071b;
}

/* ---------- sfondo: cielo notturno viola ---------- */
body.season-halloween.theme-iw2,
body.season-halloween.theme-iw2-shop {
  background-color: var(--hw-night) !important;
}
body.season-halloween.theme-iw2::before {
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(177, 74, 255, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 45% 30% at 12% 100%, rgba(255, 122, 26, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 45% 30% at 88% 100%, rgba(157, 255, 79, 0.05) 0%, transparent 70%) !important;
}

/* ---------- decorazioni fisse ---------- */
.hw-deco { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.hw-deco-front { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.hw-web {
  position: absolute; top: 0; width: 190px; height: 190px;
  filter: drop-shadow(0 0 1.5px rgba(206, 143, 255, 0.45));
  opacity: 0.7;
}
.hw-web-l { left: 0; }
.hw-web-r { right: 0; transform: scaleX(-1); }
.hw-spider {
  position: absolute; top: 0; right: 150px; width: 30px;
  animation: hwSpider 9s ease-in-out infinite;
  transform-origin: top center;
}
.hw-spider .hw-thread { display: block; width: 1px; height: 150px; margin: 0 auto; background: linear-gradient(rgba(239, 227, 255, 0.05), rgba(239, 227, 255, 0.55)); }
.hw-spider svg { display: block; width: 30px; height: 30px; margin-top: -4px; color: #0b0410; filter: drop-shadow(0 0 3px rgba(206, 143, 255, 0.75)); }
@keyframes hwSpider {
  0%, 100% { transform: translateY(-60px) rotate(0deg); }
  45% { transform: translateY(26px) rotate(2deg); }
  55% { transform: translateY(22px) rotate(-2deg); }
}
/* cimitero in controluce in fondo alla finestra */
.hw-graveyard {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 150px;
  filter: drop-shadow(0 -6px 18px rgba(177, 74, 255, 0.18));
}

/* pipistrelli (creati da halloween.js) */
.hw-bat {
  position: fixed; top: 0; left: 0; width: 44px; height: 22px; z-index: 40; pointer-events: none;
  color: #07020b; filter: drop-shadow(0 0 3px rgba(177, 74, 255, 0.55));
  will-change: transform;
}
.hw-bat svg { width: 100%; height: 100%; display: block; animation: hwFlap 0.28s ease-in-out infinite alternate; transform-origin: center; }
@keyframes hwFlap { from { transform: scaleY(1); } to { transform: scaleY(0.45); } }

/* zucca che sbircia in basso (creata da halloween.js) */
.hw-pumpkin-corner {
  position: fixed; bottom: 4px; left: 12px; width: 72px; height: 66px; z-index: 40; pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(255, 122, 26, 0.55));
  animation: hwGlow 3.2s ease-in-out infinite;
}
.hw-pumpkin-corner svg { width: 100%; height: 100%; }
@keyframes hwGlow { 0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 122, 26, 0.45)); } 50% { filter: drop-shadow(0 0 26px rgba(255, 140, 40, 0.85)); } }

/* il contenuto della pagina sta sopra le decorazioni */
body.season-halloween main, body.season-halloween nav, body.season-halloween footer,
body.season-halloween .main-box { position: relative; z-index: 3; }

/* ---------- hero ---------- */
body.season-halloween .iw2-hero-eyebrow .hw-eyebrow-halloween {
  font-family: 'Creepster', 'Cinzel', serif; letter-spacing: 0.12em; color: var(--hw-pumpkin);
  text-shadow: 0 0 10px rgba(255, 122, 26, 0.6);
  font-size: 1.15em;
}
body.season-halloween .iw2-hero-logo .iw2-logo-aura {
  background: radial-gradient(ellipse at center, rgba(177, 74, 255, 0.45) 0%, rgba(255, 122, 26, 0.12) 45%, transparent 70%) !important;
}
body.season-halloween .iw2-hero { position: relative; }
/* la hero ha uno sfondo pieno che copriva la luna: cielo stellato con la luna dentro */
body.season-halloween .iw2-hero {
  background:
    radial-gradient(circle at calc(86% + 12px) calc(26% - 10px), rgba(170, 150, 135, 0.45) 0 6px, transparent 7px),
    radial-gradient(circle at calc(86% - 14px) calc(26% + 8px), rgba(170, 150, 135, 0.38) 0 9px, transparent 10px),
    radial-gradient(circle at calc(86% + 10px) calc(26% + 18px), rgba(170, 150, 135, 0.32) 0 5px, transparent 6px),
    radial-gradient(circle at 86% 26%, #f8f1df 0 38px, rgba(243, 234, 210, 0.9) 42px, rgba(255, 246, 220, 0.18) 58px, rgba(177, 74, 255, 0.10) 120px, transparent 190px),
    radial-gradient(1px 1px at 12% 22%, #fff 99%, transparent), radial-gradient(1px 1px at 24% 64%, #e9d8ff 99%, transparent),
    radial-gradient(1.5px 1.5px at 37% 14%, #fff 99%, transparent), radial-gradient(1px 1px at 63% 9%, #fff 99%, transparent),
    radial-gradient(1px 1px at 71% 58%, #e9d8ff 99%, transparent), radial-gradient(1.5px 1.5px at 93% 72%, #fff 99%, transparent),
    radial-gradient(1px 1px at 5% 80%, #fff 99%, transparent), radial-gradient(1px 1px at 52% 40%, #f1e6ff 99%, transparent),
    radial-gradient(ellipse 60% 90% at 50% -10%, rgba(177, 74, 255, 0.22), transparent 65%),
    linear-gradient(180deg, #160822 0%, #0d0414 100%) !important;
}
@media (max-width: 640px) {
  body.season-halloween .iw2-hero { background-position: 0 0 !important; }
}
body.season-halloween .iw2-hero::after { /* zucche ai lati del logo */
  content: ''; position: absolute; left: 50%; top: 150px; width: 640px; max-width: 92vw; height: 70px;
  transform: translateX(-50%); pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2092'%3E%3Cdefs%3E%3CradialGradient%20id='b'%20cx='.42'%20cy='.38'%20r='.7'%3E%3Cstop%20offset='0'%20stop-color='%23ffb04a'/%3E%3Cstop%20offset='.55'%20stop-color='%23ee6a10'/%3E%3Cstop%20offset='1'%20stop-color='%238f3505'/%3E%3C/radialGradient%3E%3CradialGradient%20id='f'%20cx='.5'%20cy='.45'%20r='.6'%3E%3Cstop%20offset='0'%20stop-color='%23fffbd0'/%3E%3Cstop%20offset='.45'%20stop-color='%23ffd23a'/%3E%3Cstop%20offset='1'%20stop-color='%23ff7a00'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath%20d='M48%2020C47%2012%2050%206%2057%203l2%204c-5%203-6%207-5%2013z'%20fill='%234d6b24'%20stroke='%232c3d13'%20stroke-width='1.2'/%3E%3Cpath%20d='M56%208c8-6%2018-3%2017%204-3-4-9-4-14-1'%20fill='none'%20stroke='%235f8a2c'%20stroke-width='2'%20stroke-linecap='round'/%3E%3Cg%20stroke='%237a2c04'%20stroke-width='1.3'%20fill='url%28%23b%29'%3E%3Cellipse%20cx='26'%20cy='56'%20rx='22'%20ry='31'/%3E%3Cellipse%20cx='74'%20cy='56'%20rx='22'%20ry='31'/%3E%3Cellipse%20cx='38'%20cy='55'%20rx='20'%20ry='33'/%3E%3Cellipse%20cx='62'%20cy='55'%20rx='20'%20ry='33'/%3E%3Cellipse%20cx='50'%20cy='54'%20rx='15'%20ry='34'/%3E%3C/g%3E%3Cg%20fill='url%28%23f%29'%3E%3Cpath%20d='M28%2044l12-6-2%2014z'/%3E%3Cpath%20d='M72%2044l-12-6%202%2014z'/%3E%3Cpath%20d='M46%2056l4-6%204%206z'/%3E%3Cpath%20d='M22%2062q28%2022%2056%200l-6%202-4%206-6-4-6%207-6-6-6%206-6-7-6%204-4-6z'/%3E%3C/g%3E%3C/svg%3E") left bottom / 66px 61px no-repeat,
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2092'%3E%3Cdefs%3E%3CradialGradient%20id='b'%20cx='.42'%20cy='.38'%20r='.7'%3E%3Cstop%20offset='0'%20stop-color='%23ffb04a'/%3E%3Cstop%20offset='.55'%20stop-color='%23ee6a10'/%3E%3Cstop%20offset='1'%20stop-color='%238f3505'/%3E%3C/radialGradient%3E%3CradialGradient%20id='f'%20cx='.5'%20cy='.45'%20r='.6'%3E%3Cstop%20offset='0'%20stop-color='%23fffbd0'/%3E%3Cstop%20offset='.45'%20stop-color='%23ffd23a'/%3E%3Cstop%20offset='1'%20stop-color='%23ff7a00'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath%20d='M48%2020C47%2012%2050%206%2057%203l2%204c-5%203-6%207-5%2013z'%20fill='%234d6b24'%20stroke='%232c3d13'%20stroke-width='1.2'/%3E%3Cpath%20d='M56%208c8-6%2018-3%2017%204-3-4-9-4-14-1'%20fill='none'%20stroke='%235f8a2c'%20stroke-width='2'%20stroke-linecap='round'/%3E%3Cg%20stroke='%237a2c04'%20stroke-width='1.3'%20fill='url%28%23b%29'%3E%3Cellipse%20cx='26'%20cy='56'%20rx='22'%20ry='31'/%3E%3Cellipse%20cx='74'%20cy='56'%20rx='22'%20ry='31'/%3E%3Cellipse%20cx='38'%20cy='55'%20rx='20'%20ry='33'/%3E%3Cellipse%20cx='62'%20cy='55'%20rx='20'%20ry='33'/%3E%3Cellipse%20cx='50'%20cy='54'%20rx='15'%20ry='34'/%3E%3C/g%3E%3Cg%20fill='url%28%23f%29'%3E%3Cpath%20d='M28%2044l12-6-2%2014z'/%3E%3Cpath%20d='M72%2044l-12-6%202%2014z'/%3E%3Cpath%20d='M46%2056l4-6%204%206z'/%3E%3Cpath%20d='M22%2062q28%2022%2056%200l-6%202-4%206-6-4-6%207-6-6-6%206-6-7-6%204-4-6z'/%3E%3C/g%3E%3C/svg%3E") right bottom / 52px 48px no-repeat;
  filter: drop-shadow(0 0 16px rgba(255, 150, 40, 0.65));
}
@media (max-width: 640px) { body.season-halloween .iw2-hero::after { top: 110px; height: 50px; background-size: 46px 42px, 37px 34px; } }

/* barra "server online" e countdown */
body.season-halloween .iw2-count-bar {
  border-color: rgba(255, 122, 26, 0.45) !important;
  background: linear-gradient(100deg, rgba(40, 12, 58, 0.92), rgba(18, 7, 27, 0.95)) !important;
  box-shadow: 0 0 26px rgba(177, 74, 255, 0.22), inset 0 0 0 1px rgba(255, 122, 26, 0.08) !important;
}

/* banner "Halloween su ImperiaWorld" (nova-launch-banner): colori scritti nel markup */
body.season-halloween a.hw-nova {
  background: linear-gradient(135deg, #1a0726 0%, #2b0d3d 50%, #1a0726 100%) !important;
  border-color: #ff7a1a !important;
  box-shadow: 0 0 32px rgba(177, 74, 255, 0.35), inset 0 0 0 1px rgba(255, 122, 26, 0.25) !important;
}
body.season-halloween a.hw-nova > .h-1 { background: linear-gradient(90deg, #5a1a85, #ff7a1a, #ffd27a, #ff7a1a, #5a1a85) !important; }
body.season-halloween a.hw-nova h3 {
  font-family: 'Creepster', 'Cinzel', serif !important; letter-spacing: 0.08em; font-weight: 400 !important;
  background: linear-gradient(180deg, #ffd27a 0%, #ff7a1a 55%, #b14aff 100%) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
}
body.season-halloween a.hw-nova p { color: #e3cff5 !important; }
body.season-halloween a.hw-nova .rounded-full.shrink-0,
body.season-halloween a.hw-nova .shrink-0.rounded-full {
  background: radial-gradient(circle at 30% 30%, #ffd27a 0%, #ff7a1a 45%, #5a1a85 100%) !important;
  border-color: #ffe2b8 !important;
  box-shadow: 0 0 28px rgba(255, 122, 26, 0.65), inset 0 2px 8px rgba(255, 255, 255, 0.25) !important;
}

/* ---------- titoli dei pannelli: un tocco di zucca ---------- */
body.season-halloween .panel h2 i,
body.season-halloween .ranking-panel h2 i { color: var(--hw-pumpkin) !important; }

/* ---------- pulsanti ---------- */
body.season-halloween .iw2-btn-primary {
  background: linear-gradient(180deg, #c45cff 0%, #8b2fc9 55%, #5a1a85 100%) !important;
  border-color: #e0b0ff !important;
  box-shadow: 0 0 22px rgba(177, 74, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}
body.season-halloween .iw2-btn-gold {
  border-color: rgba(255, 122, 26, 0.65) !important;
  color: #ffc58a !important;
}
body.season-halloween .iw2-btn-gold:hover {
  background: rgba(255, 122, 26, 0.12) !important;
  box-shadow: 0 0 20px rgba(255, 122, 26, 0.35) !important;
}

/* ---------- Battle Pass (battlepass-banner.blade.php): colori nel componente ---------- */
body.season-halloween .iw2-bp-card {
  border-color: #6d2aa0 !important;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(255, 122, 26, 0.10), transparent 60%),
    linear-gradient(135deg, #2b0d3d 0%, #1a0726 55%, #10041a 100%) !important;
  box-shadow: 0 0 34px rgba(177, 74, 255, 0.28) !important;
}
body.season-halloween .iw2-bp-topbar { background: linear-gradient(90deg, #5a1a85, #ff7a1a, #ffd27a, #ff7a1a, #5a1a85) !important; background-size: 200% 100% !important; }
body.season-halloween .iw2-bp-badge { border-color: rgba(255, 122, 26, 0.5) !important; background: rgba(255, 122, 26, 0.14) !important; color: #ffa552 !important; }
body.season-halloween .iw2-bp-title {
  background: linear-gradient(180deg, #ffd27a 0%, #ff7a1a 55%, #c45cff 100%) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
}
body.season-halloween .iw2-bp-tagline { color: #ffb36b !important; }
body.season-halloween .iw2-bp-sub,
body.season-halloween .iw2-bp-coins,
body.season-halloween .iw2-bp-foot { color: #b49acb !important; }
body.season-halloween .iw2-bp-foot i { color: var(--hw-pumpkin) !important; }
body.season-halloween .iw2-bp-tier {
  border-color: rgba(177, 74, 255, 0.45) !important;
  background: linear-gradient(135deg, rgba(43, 13, 61, 0.92) 0%, rgba(16, 4, 26, 0.92) 100%) !important;
}
body.season-halloween .iw2-bp-tier:hover { border-color: #ce8fff !important; box-shadow: 0 0 18px rgba(177, 74, 255, 0.35) !important; }
body.season-halloween .iw2-bp-tier-top { border-color: rgba(255, 122, 26, 0.75) !important; box-shadow: 0 0 20px rgba(255, 122, 26, 0.2) !important; }
body.season-halloween .iw2-bp-tier-top:hover { border-color: #ffa552 !important; box-shadow: 0 0 26px rgba(255, 122, 26, 0.4) !important; }
body.season-halloween .iw2-bp-flag { background: linear-gradient(135deg, #e8620c, #ffa552) !important; color: #1a0726 !important; }
body.season-halloween .iw2-bp-tier-head { border-bottom-color: rgba(177, 74, 255, 0.3) !important; }
body.season-halloween .iw2-bp-tier-name { color: #ffc58a !important; }
body.season-halloween .iw2-bp-tier-price { color: #e0b0ff !important; }
body.season-halloween .iw2-bp-tier-price-top { color: #ff9a3d !important; }
body.season-halloween .iw2-bp-list li { color: #d9c3ee !important; }
body.season-halloween .iw2-bp-list li::before { background: var(--hw-pumpkin) !important; }
body.season-halloween .iw2-bp-btn-ghost { border-color: #8b2fc9 !important; background: linear-gradient(135deg, #2b0d3d 0%, #1a0726 100%) !important; color: #ffc58a !important; }
body.season-halloween .iw2-bp-btn-gold {
  border-color: #ffa552 !important; color: #1a0726 !important;
  background: linear-gradient(135deg, #ffb36b 0%, #e8620c 100%) !important;
  box-shadow: 0 0 15px rgba(255, 122, 26, 0.45) !important;
}
body.season-halloween .iw2-bp-right { border-color: rgba(177, 74, 255, 0.55) !important; }

/* ---------- classifica (top10-rank.blade.php): podio ---------- */
body.season-halloween .podium-wrap {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 122, 26, 0.14) 0%, transparent 65%),
    linear-gradient(180deg, rgba(16, 4, 26, 0.98) 0%, rgba(30, 9, 44, 0.96) 100%) !important;
}

/* ---------- registrazione (registration.blade.php): riquadro dei contatti facoltativi ---------- */
body.season-halloween [style*="rgba(74,18,25,0.4)"] {
  background: linear-gradient(135deg, rgba(58, 16, 88, 0.55), rgba(255, 122, 26, 0.08)) !important;
  border-color: rgba(177, 74, 255, 0.45) !important;
}

/* ---------- negozio ---------- */
body.season-halloween.theme-iw2-shop .top-bar {
  background: linear-gradient(100deg, #1a0726 0%, #2b0d3d 55%, #1a0726 100%) !important;
  border-color: rgba(177, 74, 255, 0.35) !important;
}

/* ---------- /presentation ---------- */
body.season-halloween.season-presentation { background-color: var(--hw-night) !important; }
body.season-halloween.season-presentation .hw-deco { z-index: 0; }
/* il menu laterale della presentazione sta a destra: niente ragnatela e ragno sopra */
body.season-halloween.season-presentation .hw-web-r,
body.season-halloween.season-presentation .hw-spider { display: none; }

/* niente animazioni per chi le ha disattivate */
@media (prefers-reduced-motion: reduce) {
  .hw-spider, .hw-pumpkin-corner, .hw-bat svg { animation: none !important; }
  .hw-bat { display: none; }
}
/* su telefono decorazioni piu' leggere: niente luna e ragnatele piu' piccole */
@media (max-width: 640px) {
  .hw-web { width: 120px; height: 120px; }
  .hw-graveyard { height: 90px; }
  .hw-spider { right: 60px; }
  .hw-pumpkin-corner { display: none; }
  /* il badge sopra il logo va a capo male: le zucche e il banner dicono gia' Halloween */
  body.season-halloween .iw2-hero-eyebrow .hw-eyebrow-halloween { display: none; }
}
