/* TradeRealm 3.6.1 — Halloween / Night Realm · Immersive Pass
   Seasonal visual layer only. The theme engine, page structure and data stay untouched. */

body[data-theme="halloween"]{
  --theme-primary:#ff8a1f;
  --theme-secondary:#9c5cff;
  --theme-accent:#ff4f9a;
  --theme-warm:#ffd15a;
  --theme-bg:#050209;
  --theme-bg-2:#120619;
  --theme-panel:#180c20;
  --theme-panel-2:#0b0711;
  --theme-border:rgba(255,137,32,.30);
  --theme-glow:rgba(255,112,24,.18);
  --theme-nav-glow:rgba(160,79,255,.26);
  --theme-bg-glow-1:rgba(255,104,18,.19);
  --theme-bg-glow-2:rgba(129,45,222,.25);
  --theme-card-glow:rgba(255,126,25,.11);
  --theme-title-glow:rgba(255,117,26,.22);
  --theme-header-1:#16081d;
  --theme-header-2:#06030a;
  --theme-strip-1:#17091f;
  --theme-strip-2:#09040d;
  --particle-color:#ff9a39;
  scrollbar-color:#7f43c5 #07040b;
  background:
    radial-gradient(circle at 84% 8%,rgba(255,189,89,.12) 0 5.2rem,transparent 5.35rem),
    radial-gradient(circle at 87% 11%,rgba(123,48,181,.22),transparent 22rem),
    radial-gradient(circle at 12% 5%,rgba(255,92,12,.14),transparent 28rem),
    radial-gradient(circle at 50% 52%,rgba(70,22,88,.13),transparent 45rem),
    linear-gradient(180deg,#050208 0%,#0b0310 42%,#110619 72%,#050208 100%) fixed!important;
}

body[data-theme="halloween"]::before,
body[data-theme="halloween"]::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
}
body[data-theme="halloween"]::before{
  z-index:0;
  opacity:.34;
  background:
    radial-gradient(ellipse at 20% 15%,rgba(255,110,23,.12),transparent 23%),
    radial-gradient(ellipse at 76% 38%,rgba(134,58,227,.13),transparent 26%),
    linear-gradient(180deg,transparent 0 44%,rgba(17,5,23,.25) 60%,rgba(4,2,7,.82) 100%);
}
body[data-theme="halloween"]::after{
  z-index:1;
  box-shadow:inset 0 0 180px 30px rgba(0,0,0,.56);
  background:linear-gradient(180deg,rgba(0,0,0,.08),transparent 22%,transparent 72%,rgba(0,0,0,.24));
}

body[data-theme="halloween"] ::selection{background:#ff7b22;color:#12050a}

/* Ambient blobs become smoky orange / violet. */
body[data-theme="halloween"] .ambient{opacity:.30!important;filter:blur(105px) saturate(1.25)!important}
body[data-theme="halloween"] .ambient-one{background:#8b2bd8!important}
body[data-theme="halloween"] .ambient-two{background:#ff6c16!important}

/* Header / navigation */
body[data-theme="halloween"] .topbar{
  background:linear-gradient(180deg,rgba(20,7,27,.97),rgba(7,3,11,.96))!important;
  border-bottom:1px solid rgba(255,123,24,.30)!important;
  box-shadow:0 14px 40px rgba(0,0,0,.34),0 0 44px rgba(140,52,222,.16)!important;
}
body[data-theme="halloween"] .topbar::after{
  content:"";
  position:absolute;
  right:0;
  top:0;
  width:124px;
  height:78px;
  opacity:.22;
  pointer-events:none;
  background:
    repeating-radial-gradient(circle at 100% 0,transparent 0 12px,rgba(244,226,255,.25) 13px 14px),
    repeating-conic-gradient(from 180deg at 100% 0,rgba(244,226,255,.28) 0 1deg,transparent 1deg 18deg);
  mask-image:linear-gradient(225deg,#000 0 58%,transparent 86%);
}
body[data-theme="halloween"] .brand img{
  filter:drop-shadow(0 0 9px rgba(255,130,27,.34)) drop-shadow(0 0 18px rgba(151,72,235,.20))!important;
}
body[data-theme="halloween"] .desktop-nav a:hover,
body[data-theme="halloween"] .desktop-nav a.active{
  color:#fff4df!important;
  background:linear-gradient(180deg,rgba(255,126,24,.10),rgba(142,64,220,.08))!important;
  box-shadow:inset 0 0 0 1px rgba(255,137,32,.10),0 0 18px rgba(255,107,18,.08);
}
body[data-theme="halloween"] .topbar :is(.icon-btn,.profile-pill,.tr3-header-action,.account-status-icon){
  background:rgba(14,7,20,.76)!important;
  border-color:rgba(255,130,28,.17)!important;
}
body[data-theme="halloween"] .game-strip{
  background:linear-gradient(180deg,rgba(21,8,29,.96),rgba(7,3,11,.94))!important;
  border-top-color:rgba(150,70,225,.21)!important;
  border-bottom-color:rgba(255,126,25,.30)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.18),0 1px 0 rgba(255,126,25,.06)!important;
}
body[data-theme="halloween"] .game-badge{
  color:#ffd2a7!important;
  background:rgba(255,123,24,.08)!important;
  border:1px solid rgba(255,139,43,.16);
}
body[data-theme="halloween"] .game-badge::after{
  content:"HALLOWEEN";
  margin-left:8px;
  padding:3px 7px;
  border-radius:999px;
  color:#16080d;
  background:linear-gradient(135deg,#ffc451,#ff7620);
  font-size:8px;
  font-weight:1000;
  letter-spacing:.08em;
  box-shadow:0 0 14px rgba(255,111,24,.24);
}
body[data-theme="halloween"] .game-dot{
  background:#ff8727!important;
  box-shadow:0 0 12px rgba(255,112,22,.9)!important;
}
body[data-theme="halloween"] .mobile-strip-nav a.active{
  background:linear-gradient(180deg,rgba(255,122,23,.13),rgba(126,55,206,.04))!important;
  border-color:rgba(255,128,28,.28)!important;
}
body[data-theme="halloween"] .mobile-strip-nav a.active em{color:#ffb05e!important}

/* Global surface language */
body[data-theme="halloween"] :is(.panel,.auth-card,.profile-panel-v171,.profile-card-v171,.tr3-home-card){
  background:
    radial-gradient(circle at 92% 8%,rgba(136,52,211,.13),transparent 31%),
    radial-gradient(circle at 12% 108%,rgba(255,110,22,.08),transparent 32%),
    linear-gradient(150deg,rgba(27,13,35,.94),rgba(9,5,14,.96))!important;
  border-color:rgba(255,126,27,.20)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.24),0 0 26px rgba(126,52,205,.06)!important;
}
body[data-theme="halloween"] :is(.page-hero,.tr2-page-hero,.tr23-pets-hero,.tr23-pet-detail-hero,.calculator-hero){
  position:relative;
  overflow:hidden;
  border-color:rgba(255,132,32,.27)!important;
  background:
    radial-gradient(circle at 86% 16%,rgba(147,63,226,.23),transparent 31%),
    radial-gradient(circle at 10% 105%,rgba(255,111,22,.15),transparent 34%),
    linear-gradient(140deg,rgba(29,12,39,.97),rgba(8,5,14,.98))!important;
}
body[data-theme="halloween"] :is(.page-hero,.tr2-page-hero,.tr23-pets-hero,.tr23-pet-detail-hero,.calculator-hero)::after{
  content:"";
  position:absolute;
  inset:auto -8% -52% 38%;
  height:82%;
  background:radial-gradient(ellipse,rgba(255,112,23,.10),transparent 68%);
  pointer-events:none;
}
body[data-theme="halloween"] :is(.eyebrow,.tr2-kicker,.tr23-kicker,.tr3-eyebrow){color:#ffad57!important}
body[data-theme="halloween"] .gradient-text{
  background:linear-gradient(90deg,#ffb14f 0%,#ff6b8f 45%,#a971ff 78%,#ff8a21 100%)!important;
  -webkit-background-clip:text!important;
  background-clip:text!important;
  color:transparent!important;
}
body[data-theme="halloween"] :is(.section-head>a,.card-link,.tr23-back){color:#ffb76d!important}
body[data-theme="halloween"] :is(input,select,textarea,.filter-search,.hero-search){
  background:rgba(8,4,13,.82)!important;
  border-color:rgba(255,128,28,.21)!important;
}
body[data-theme="halloween"] :is(input,select,textarea):focus{
  outline:none!important;
  border-color:rgba(255,142,45,.56)!important;
  box-shadow:0 0 0 3px rgba(255,119,23,.08),0 0 18px rgba(130,56,211,.10)!important;
}
body[data-theme="halloween"] :is(.btn.primary,button.primary,.tr3111-create-account){
  color:#17070d!important;
  background:linear-gradient(135deg,#ffbf4f,#ff7a1f 48%,#b557dc 100%)!important;
  border-color:rgba(255,176,74,.55)!important;
  box-shadow:0 10px 26px rgba(255,101,19,.19),0 0 24px rgba(143,55,226,.10)!important;
}
body[data-theme="halloween"] :is(.btn.ghost,.mini-btn,.filter-chip){
  background:rgba(19,8,26,.78)!important;
  border-color:rgba(255,126,25,.18)!important;
}
body[data-theme="halloween"] :is(.btn.ghost,.mini-btn,.filter-chip):hover{
  border-color:rgba(255,145,51,.44)!important;
  background:rgba(36,13,43,.88)!important;
}
body[data-theme="halloween"] .tag{
  color:#ffd0a0!important;
  background:rgba(255,126,25,.10)!important;
  border-color:rgba(255,126,25,.20)!important;
}

/* Home: the event banner is the seasonal focal point. */
body[data-theme="halloween"][data-page="home"] .tr323-event-banner{
  border-color:rgba(255,125,25,.40)!important;
  box-shadow:0 18px 45px rgba(0,0,0,.32),0 0 34px rgba(255,110,20,.10),0 0 58px rgba(126,50,207,.10)!important;
  background:linear-gradient(135deg,rgba(34,13,42,.97),rgba(9,5,15,.98))!important;
}
body[data-theme="halloween"][data-page="home"] .tr323-event-banner::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 93% 14%,rgba(255,192,85,.18) 0 32px,transparent 34px),
    radial-gradient(ellipse at 18% 110%,rgba(255,106,17,.19),transparent 34%),
    linear-gradient(110deg,rgba(127,48,205,.10),transparent 42%);
  z-index:1;
}
body[data-theme="halloween"][data-page="home"] .tr323-event-bg img{
  filter:saturate(1.24) contrast(1.12) brightness(.54) hue-rotate(-4deg)!important;
}
body[data-theme="halloween"][data-page="home"] .tr323-event-glow{
  background:radial-gradient(circle at 30% 50%,rgba(255,113,20,.22),transparent 42%),radial-gradient(circle at 78% 45%,rgba(135,55,218,.23),transparent 42%)!important;
}
body[data-theme="halloween"][data-page="home"] .tr323-event-title{
  color:#fff5e9!important;
  text-shadow:0 0 22px rgba(255,115,23,.25),0 3px 18px rgba(0,0,0,.48)!important;
}
body[data-theme="halloween"][data-page="home"] .tr323-event-kicker{color:#ffad5b!important}
body[data-theme="halloween"][data-page="home"] .tr323-event-art-shell{
  border-color:rgba(255,150,58,.52)!important;
  box-shadow:0 0 0 1px rgba(161,77,232,.22),0 16px 34px rgba(0,0,0,.40),0 0 26px rgba(255,111,19,.14)!important;
}
body[data-theme="halloween"][data-page="home"] .tr323-countdown-box{
  background:linear-gradient(180deg,rgba(35,15,43,.93),rgba(10,5,15,.95))!important;
  border-color:rgba(255,137,35,.31)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.04),0 0 18px rgba(124,52,205,.08)!important;
}
body[data-theme="halloween"][data-page="home"] .tr323-countdown-box strong{color:#ffbc67!important;text-shadow:0 0 14px rgba(255,122,24,.28)}
body[data-theme="halloween"][data-page="home"] .tr323-countdown-box span{color:#bf9cc9!important}

/* Home hero */
body[data-theme="halloween"][data-page="home"] .hero-home-v115{
  border-color:rgba(255,128,27,.32)!important;
  box-shadow:0 20px 50px rgba(0,0,0,.30),0 0 42px rgba(110,41,183,.10)!important;
  background:linear-gradient(145deg,rgba(24,10,31,.88),rgba(6,3,10,.93))!important;
}
body[data-theme="halloween"][data-page="home"] .hero-home-v115:before{
  background:
    linear-gradient(90deg,rgba(7,3,11,.96) 0%,rgba(11,4,16,.84) 40%,rgba(15,5,21,.42) 72%,rgba(6,3,10,.66) 100%),
    radial-gradient(circle at 82% 22%,rgba(255,122,25,.14),transparent 24%),
    radial-gradient(circle at 72% 72%,rgba(125,50,204,.22),transparent 36%)!important;
}
body[data-theme="halloween"][data-page="home"] .hero-home-backdrop{
  opacity:.48!important;
  filter:saturate(1.22) contrast(1.08) brightness(.70) hue-rotate(-5deg)!important;
}
body[data-theme="halloween"][data-page="home"] .hero-home-v115::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:37%;
  z-index:2;
  pointer-events:none;
  background:linear-gradient(180deg,transparent,rgba(11,4,15,.74)),radial-gradient(ellipse at 50% 100%,rgba(255,124,25,.10),transparent 58%);
}
body[data-theme="halloween"][data-page="home"] .hero-search{
  border-color:rgba(255,139,39,.29)!important;
  background:rgba(7,4,12,.80)!important;
  box-shadow:0 14px 36px rgba(0,0,0,.30),0 0 20px rgba(136,55,217,.08)!important;
}
body[data-theme="halloween"][data-page="home"] .hero-kpi-v115{
  border-color:rgba(255,126,25,.20)!important;
  background:linear-gradient(145deg,rgba(31,13,39,.80),rgba(8,5,13,.72))!important;
  box-shadow:0 17px 42px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.03)!important;
}
body[data-theme="halloween"][data-page="home"] .hero-kpi-v115:before{
  background:linear-gradient(100deg,rgba(8,3,12,.94),rgba(14,5,20,.67) 58%,rgba(255,115,22,.05))!important;
}
body[data-theme="halloween"][data-page="home"] .hero-kpi-v115 span{color:#c6a9c9!important}

/* Trending, live trades, smart match and news */
body[data-theme="halloween"][data-page="home"] .pet-card,
body[data-theme="halloween"] .tr2-trade-card,
body[data-theme="halloween"][data-page="home"] .home-live-card-v150,
body[data-theme="halloween"] .blog-card,
body[data-theme="halloween"] .tr2-blog-card,
body[data-theme="halloween"] .tr2-blog-feature-card{
  border-color:rgba(255,128,27,.19)!important;
  background:
    radial-gradient(circle at 90% 8%,rgba(133,55,210,.10),transparent 32%),
    linear-gradient(150deg,rgba(26,12,34,.86),rgba(8,5,13,.92))!important;
  box-shadow:0 13px 30px rgba(0,0,0,.20)!important;
}
body[data-theme="halloween"][data-page="home"] .pet-card:hover,
body[data-theme="halloween"] .tr2-trade-card:hover,
body[data-theme="halloween"] .blog-card:hover{
  border-color:rgba(255,142,43,.43)!important;
  box-shadow:0 16px 34px rgba(0,0,0,.28),0 0 22px rgba(255,112,20,.08)!important;
}
body[data-theme="halloween"][data-page="home"] .pet-card:after{background:#b75cff!important;opacity:.12!important}
body[data-theme="halloween"][data-page="home"] .pet-stats div,
body[data-theme="halloween"][data-page="home"] .home-live-pets-v150>span{
  background:rgba(5,3,9,.45)!important;
  border-color:rgba(255,126,25,.13)!important;
}
body[data-theme="halloween"][data-page="home"] .match-card{
  border-color:rgba(255,129,28,.29)!important;
  background:
    radial-gradient(circle at 90% 10%,rgba(255,114,22,.15),transparent 28%),
    radial-gradient(circle at 15% 100%,rgba(126,51,204,.20),transparent 38%),
    linear-gradient(145deg,rgba(28,12,35,.96),rgba(8,5,13,.97))!important;
}
body[data-theme="halloween"][data-page="home"] .match-card:after{background:#ff781d!important;opacity:.14!important}
body[data-theme="halloween"][data-page="home"] .match-score{
  background:rgba(255,127,25,.10)!important;
  border-color:rgba(255,137,37,.22)!important;
}
body[data-theme="halloween"][data-page="home"] .match-score strong{color:#ffb45f!important}
body[data-theme="halloween"][data-page="home"] .swap-icon,
body[data-theme="halloween"][data-page="home"] .home-live-arrow-v150{color:#ff9a40!important}
body[data-theme="halloween"] .blog-art,
body[data-theme="halloween"] .blog-square-v115{
  background:radial-gradient(circle at 34% 24%,rgba(255,117,23,.24),transparent 42%),linear-gradient(145deg,#24102e,#0a0610)!important;
}

/* Values, Calculator, Trades, Pulse, Blog */
body[data-theme="halloween"] :is(.toolbar,.tr2-filterbar,.tr23-pets-toolbar,.values-basis-bar,.calc-value-control,.calculator-footer-controls){
  border-color:rgba(255,128,27,.18)!important;
  background:rgba(12,6,18,.82)!important;
}
body[data-theme="halloween"] :is(.value-table-wrap,.tr2-value-table-wrap,.modal-card,.calc-picker-modal,.catalog-picker-layout,.variant-selected-card,.trade-balance-dashboard,.adopt-side){
  border-color:rgba(255,128,27,.19)!important;
  background:linear-gradient(150deg,rgba(25,11,33,.94),rgba(8,5,13,.96))!important;
}
body[data-theme="halloween"] .value-table tbody tr:hover{background:rgba(255,125,25,.045)!important}
body[data-theme="halloween"] :is(.filter-chip.active,.calc-value-toggle button.active,.values-page-toggle button.active,.variant-toggle.active){
  color:#1a080e!important;
  border-color:rgba(255,170,68,.52)!important;
  background:linear-gradient(135deg,#ffb348,#ff7620)!important;
}
body[data-theme="halloween"] :is(.tr2-pulse-kpis article,.tr2-hot-card,.tr2-signal-panel,.tr2-rank-panel,.tr2-pulse-leader){
  border-color:rgba(255,128,27,.18)!important;
  background:linear-gradient(145deg,rgba(27,12,35,.92),rgba(8,5,13,.94))!important;
}

/* Pets / collection: retain rarity artwork, only Halloween-frame the surrounding surfaces. */
body[data-theme="halloween"] .tr23-pets-toolbar,
body[data-theme="halloween"] .tr23-community-panel,
body[data-theme="halloween"] .tr23-info-panel,
body[data-theme="halloween"] .tr23-variants{
  box-shadow:0 14px 34px rgba(0,0,0,.22),0 0 18px rgba(126,51,205,.06)!important;
}
body[data-theme="halloween"] .tr23-pet-detail-art{
  border-color:rgba(255,132,31,.19)!important;
  background:radial-gradient(circle at 50% 38%,rgba(143,63,220,.26),rgba(20,8,27,.40))!important;
}
body[data-theme="halloween"] .tr23-pet-card:hover,
body[data-theme="halloween"] .tr232-pet-collection-card:hover{
  box-shadow:0 18px 38px rgba(0,0,0,.30),0 0 20px rgba(255,117,22,.09)!important;
}

/* Profile / account */
body[data-theme="halloween"] :is(.profile-hero-v171,.profile-section-v171,.profile-info-card-v171,.profile-listing-card-v171,.profile-support-v150){
  border-color:rgba(255,128,27,.18)!important;
}
body[data-theme="halloween"] .profile-avatar-shell-v171{
  box-shadow:0 0 0 2px rgba(255,133,29,.28),0 0 26px rgba(137,57,215,.15)!important;
}
body[data-theme="halloween"] :is(.auth-card,.tr3111-register-card,.tr319-roblox-login,.tr320-local-login){
  border-color:rgba(255,128,27,.24)!important;
  box-shadow:0 22px 50px rgba(0,0,0,.30),0 0 34px rgba(130,53,211,.08)!important;
}
body[data-theme="halloween"] .tr319-roblox-cta{
  border-color:rgba(255,135,33,.23)!important;
  background:linear-gradient(145deg,rgba(31,13,39,.93),rgba(9,5,14,.96))!important;
}

/* Footer */
body[data-theme="halloween"] .footer{
  border-top-color:rgba(255,127,25,.24)!important;
  background:linear-gradient(180deg,rgba(7,3,10,.12),rgba(5,2,8,.96))!important;
  box-shadow:0 -20px 50px rgba(0,0,0,.16)!important;
}
body[data-theme="halloween"] .footer-logo{filter:drop-shadow(0 0 10px rgba(255,124,25,.26))!important}
body[data-theme="halloween"] .footer-links a:hover{color:#ffad58!important}

/* Halloween scene injected by theme-effects.js */
.tr-halloween-scene{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  overflow:hidden;
}
.tr-halloween-moon{
  position:absolute;
  width:138px;
  height:138px;
  right:5.5vw;
  top:112px;
  border-radius:50%;
  opacity:.34;
  background:
    radial-gradient(circle at 35% 32%,rgba(90,60,64,.16) 0 7%,transparent 8%),
    radial-gradient(circle at 62% 55%,rgba(90,60,64,.13) 0 10%,transparent 11%),
    radial-gradient(circle at 48% 72%,rgba(90,60,64,.11) 0 6%,transparent 7%),
    radial-gradient(circle at 38% 38%,#ffe6a4,#ffbe5c 58%,#f8952f 100%);
  box-shadow:0 0 35px rgba(255,184,79,.19),0 0 90px rgba(154,70,224,.12);
  animation:trHalloweenMoonPulse 8s ease-in-out infinite;
}
.tr-halloween-fog{
  position:absolute;
  left:-18vw;
  width:136vw;
  height:28vh;
  border-radius:50%;
  filter:blur(24px);
  opacity:.14;
  background:radial-gradient(ellipse at center,rgba(161,90,202,.45),rgba(73,25,91,.18) 42%,transparent 72%);
  animation:trHalloweenFog 24s ease-in-out infinite alternate;
}
.tr-halloween-fog.fog-a{bottom:8vh}
.tr-halloween-fog.fog-b{bottom:37vh;opacity:.08;animation-duration:31s;animation-direction:alternate-reverse}
.tr-halloween-bat{
  position:absolute;
  left:-8vw;
  top:var(--y);
  width:var(--bat-size);
  height:calc(var(--bat-size) * .48);
  color:#1b0b22;
  background:currentColor;
  opacity:var(--bat-opacity);
  clip-path:polygon(0 58%,12% 22%,29% 43%,40% 18%,50% 50%,60% 18%,71% 43%,88% 22%,100% 58%,82% 52%,69% 86%,50% 60%,31% 86%,18% 52%);
  filter:drop-shadow(0 0 5px rgba(160,73,220,.18));
  animation:trHalloweenBatFly var(--bat-duration) linear var(--bat-delay) infinite;
}
body[data-theme="halloween"] .tr-theme-particle{
  width:var(--size);
  height:var(--size);
  border-radius:50%;
  font-size:0!important;
  background:radial-gradient(circle,#ffd070 0 18%,#ff8626 30%,rgba(255,103,17,.25) 58%,transparent 70%);
  box-shadow:0 0 8px rgba(255,112,24,.36);
}

@keyframes trHalloweenMoonPulse{50%{opacity:.42;transform:scale(1.025)}}
@keyframes trHalloweenFog{0%{transform:translate3d(-3vw,0,0) scaleX(.96)}100%{transform:translate3d(5vw,-1.5vh,0) scaleX(1.05)}}
@keyframes trHalloweenBatFly{
  0%{transform:translate3d(-10vw,0,0) scale(var(--bat-scale)) rotate(-3deg)}
  25%{transform:translate3d(26vw,-2.5vh,0) scale(var(--bat-scale)) rotate(4deg)}
  52%{transform:translate3d(58vw,2vh,0) scale(var(--bat-scale)) rotate(-2deg)}
  100%{transform:translate3d(118vw,-1vh,0) scale(var(--bat-scale)) rotate(3deg)}
}

/* Mobile: full Halloween identity without heavy decoration. */
@media(max-width:760px){
  body[data-theme="halloween"]{
    background:
      radial-gradient(circle at 90% 7%,rgba(255,190,82,.10) 0 3rem,transparent 3.15rem),
      radial-gradient(circle at 13% 4%,rgba(255,98,14,.12),transparent 19rem),
      radial-gradient(circle at 82% 30%,rgba(129,45,222,.17),transparent 24rem),
      linear-gradient(180deg,#050208,#0d0412 52%,#050208) fixed!important;
  }
  body[data-theme="halloween"] .topbar::after{width:82px;height:58px;opacity:.16}
  body[data-theme="halloween"] .game-badge::after{font-size:7px;padding:2px 5px;margin-left:5px}
  .tr-halloween-moon{width:78px;height:78px;right:3vw;top:108px;opacity:.24}
  .tr-halloween-fog{height:20vh;opacity:.08}
  body[data-theme="halloween"][data-page="home"] .tr323-event-banner::before{background:radial-gradient(circle at 92% 12%,rgba(255,190,83,.12) 0 20px,transparent 22px),linear-gradient(110deg,rgba(127,48,205,.08),transparent 48%)}
  body[data-theme="halloween"] .page-shell{position:relative;z-index:2}
}

@media(prefers-reduced-motion:reduce){
  .tr-halloween-scene{display:none!important}
  body[data-theme="halloween"] *{scroll-behavior:auto!important}
}

/* ========================================================================== 
   TradeRealm 3.6.1 — Halloween Immersive Pass
   A stronger seasonal identity layered on top of 3.6.0 without changing layout.
   ========================================================================== */
body[data-theme="halloween"]{
  --theme-ghost:#79efb0;
  --theme-pumpkin:#ff7a18;
  --theme-pumpkin-soft:#ffb14e;
  --theme-witch:#9e59f2;
  --theme-bloodmoon:#ff5a38;
  background:
    radial-gradient(circle at 84% 7%,rgba(255,215,126,.16) 0 4.8rem,rgba(255,162,55,.08) 4.95rem,transparent 5.2rem),
    radial-gradient(circle at 84% 7%,rgba(161,77,232,.15),transparent 20rem),
    radial-gradient(ellipse at 11% 7%,rgba(255,95,10,.17),transparent 26rem),
    radial-gradient(ellipse at 78% 42%,rgba(96,33,155,.16),transparent 33rem),
    radial-gradient(circle at 20% 36%,rgba(121,239,176,.035),transparent 18rem),
    linear-gradient(180deg,#030106 0%,#09020d 33%,#120518 70%,#050208 100%) fixed!important;
}

/* A faint star/ember field gives the page depth even when animation is subtle. */
body[data-theme="halloween"] .page-shell::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.32;
  background-image:
    radial-gradient(circle at 8% 14%,rgba(255,173,81,.55) 0 1px,transparent 1.4px),
    radial-gradient(circle at 18% 31%,rgba(169,102,244,.45) 0 1px,transparent 1.5px),
    radial-gradient(circle at 29% 8%,rgba(255,129,32,.44) 0 1px,transparent 1.4px),
    radial-gradient(circle at 43% 19%,rgba(255,221,154,.30) 0 1px,transparent 1.5px),
    radial-gradient(circle at 61% 12%,rgba(137,239,188,.28) 0 1px,transparent 1.5px),
    radial-gradient(circle at 72% 27%,rgba(168,92,245,.38) 0 1px,transparent 1.5px),
    radial-gradient(circle at 92% 21%,rgba(255,140,40,.46) 0 1px,transparent 1.5px);
  background-size:320px 260px,410px 330px,370px 310px,460px 350px,520px 390px,390px 300px,450px 340px;
}

/* Header now feels like the entrance to an event instead of a recolored navbar. */
body[data-theme="halloween"] .topbar{
  border-bottom:1px solid rgba(255,124,23,.48)!important;
  box-shadow:
    0 16px 42px rgba(0,0,0,.48),
    0 1px 0 rgba(255,185,93,.08),
    0 0 55px rgba(123,46,201,.18)!important;
}
body[data-theme="halloween"] .topbar::before{
  content:"";
  position:absolute;
  left:0;right:0;bottom:-1px;height:1px;
  pointer-events:none;
  background:linear-gradient(90deg,transparent 0%,#ff781b 14%,#c85bff 47%,#79efb0 64%,#ff7a18 86%,transparent 100%);
  opacity:.52;
  filter:drop-shadow(0 0 6px rgba(255,122,24,.45));
}
body[data-theme="halloween"] .brand{
  position:relative;
}
body[data-theme="halloween"] .brand::after{
  content:"";
  position:absolute;
  left:8%;right:8%;bottom:-7px;height:8px;
  border-radius:50%;
  background:radial-gradient(ellipse,rgba(255,119,20,.22),transparent 67%);
  filter:blur(4px);
  pointer-events:none;
}
body[data-theme="halloween"] .desktop-nav a,
body[data-theme="halloween"] .mobile-strip-nav a{
  transition:color .2s ease,border-color .2s ease,box-shadow .2s ease,background .2s ease,transform .2s ease!important;
}
body[data-theme="halloween"] .desktop-nav a:hover{
  transform:translateY(-1px);
  text-shadow:0 0 12px rgba(255,161,70,.28);
}
body[data-theme="halloween"] .desktop-nav a.active{
  box-shadow:inset 0 -2px 0 rgba(255,126,24,.62),0 0 20px rgba(150,63,229,.10)!important;
}

/* Global headings get a warm/spectral accent, while keeping typography intact. */
body[data-theme="halloween"] :is(.section-head h2,.section-head h3,.page-hero h1,.tr2-page-hero h1,.tr23-pets-hero h1,.tr23-pet-detail-hero h1,.calculator-hero h1){
  text-shadow:0 2px 18px rgba(0,0,0,.30),0 0 20px rgba(149,63,226,.08);
}
body[data-theme="halloween"] .section-head{
  position:relative;
}
body[data-theme="halloween"] .section-head::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-7px;
  width:58px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,#ff7a18,#a95ef3 68%,transparent);
  box-shadow:0 0 12px rgba(255,122,24,.22);
  opacity:.72;
}

/* Panels get a tiny haunted edge and inset warmth. */
body[data-theme="halloween"] :is(.panel,.tr3-home-card,.match-card,.tr2-trade-card,.blog-card,.tr2-blog-card,.profile-panel-v171,.profile-card-v171){
  position:relative;
  box-shadow:
    0 16px 38px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,205,132,.025),
    inset 0 0 28px rgba(105,37,160,.035),
    0 0 26px rgba(255,117,19,.035)!important;
}
body[data-theme="halloween"] :is(.panel,.tr3-home-card,.match-card,.tr2-trade-card,.blog-card,.tr2-blog-card):hover{
  box-shadow:
    0 18px 42px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,205,132,.04),
    0 0 26px rgba(255,116,20,.08),
    0 0 42px rgba(131,48,205,.05)!important;
}

/* Homepage event/countdown: this is the visual anchor of the Halloween mode. */
body[data-theme="halloween"][data-page="home"] .tr323-event-banner{
  isolation:isolate;
  border:1px solid rgba(255,140,39,.55)!important;
  background:
    radial-gradient(circle at 89% 15%,rgba(255,194,90,.14),transparent 18%),
    radial-gradient(circle at 20% 115%,rgba(255,98,14,.18),transparent 38%),
    radial-gradient(circle at 72% 55%,rgba(136,54,218,.17),transparent 44%),
    linear-gradient(135deg,rgba(37,13,45,.985),rgba(7,3,12,.99))!important;
  box-shadow:
    0 24px 60px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(173,79,237,.10),
    0 0 36px rgba(255,111,18,.12),
    0 0 80px rgba(123,45,204,.08)!important;
}
body[data-theme="halloween"][data-page="home"] .tr323-event-banner::after{
  content:"";
  position:absolute;
  inset:7px;
  z-index:1;
  pointer-events:none;
  border-radius:inherit;
  border:1px solid rgba(255,220,162,.045);
  background:
    linear-gradient(135deg,rgba(255,139,41,.08),transparent 14% 86%,rgba(139,63,225,.08)),
    repeating-linear-gradient(115deg,transparent 0 28px,rgba(255,255,255,.008) 29px 30px);
  mix-blend-mode:screen;
}
body[data-theme="halloween"][data-page="home"] .tr323-event-title{
  letter-spacing:-.02em;
  text-shadow:
    0 3px 20px rgba(0,0,0,.55),
    0 0 16px rgba(255,123,25,.20),
    0 0 32px rgba(154,69,234,.10)!important;
}
body[data-theme="halloween"][data-page="home"] .tr323-event-kicker{
  letter-spacing:.12em!important;
  text-shadow:0 0 14px rgba(255,127,29,.28);
}
body[data-theme="halloween"][data-page="home"] .tr323-countdown-box{
  position:relative;
  overflow:hidden;
}
body[data-theme="halloween"][data-page="home"] .tr323-countdown-box::before{
  content:"";
  position:absolute;
  left:10%;right:10%;top:0;height:1px;
  background:linear-gradient(90deg,transparent,#ff9d3d,#a963ef,transparent);
  opacity:.55;
}
body[data-theme="halloween"][data-page="home"] .tr323-countdown-box strong{
  font-variant-numeric:tabular-nums;
}

/* Main home hero gets a haunted atmosphere, but content and pet art remain untouched. */
body[data-theme="halloween"][data-page="home"] .hero-home-v115{
  isolation:isolate;
  border-color:rgba(255,129,29,.43)!important;
  box-shadow:
    0 24px 64px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(148,63,226,.08),
    0 0 42px rgba(255,111,17,.08)!important;
}
body[data-theme="halloween"][data-page="home"] .hero-home-v115:before{
  background:
    linear-gradient(90deg,rgba(5,2,9,.98) 0%,rgba(10,3,14,.90) 34%,rgba(16,5,23,.54) 67%,rgba(5,2,9,.75) 100%),
    radial-gradient(circle at 81% 19%,rgba(255,177,74,.15),transparent 21%),
    radial-gradient(circle at 71% 73%,rgba(136,54,218,.26),transparent 37%),
    radial-gradient(circle at 56% 53%,rgba(117,239,176,.045),transparent 22%)!important;
}
body[data-theme="halloween"][data-page="home"] .hero-title-v115,
body[data-theme="halloween"][data-page="home"] .hero-copy-v115 h1{
  text-shadow:0 3px 24px rgba(0,0,0,.50),0 0 22px rgba(156,77,232,.12);
}
body[data-theme="halloween"][data-page="home"] .hero-search:focus-within{
  border-color:rgba(255,151,57,.55)!important;
  box-shadow:0 14px 36px rgba(0,0,0,.34),0 0 0 3px rgba(255,119,22,.07),0 0 28px rgba(142,58,220,.12)!important;
}

/* Homepage cards: orange fire edge + violet haunted depth. */
body[data-theme="halloween"][data-page="home"] :is(.pet-card,.home-live-card-v150,.match-card){
  overflow:hidden;
}
body[data-theme="halloween"][data-page="home"] :is(.pet-card,.home-live-card-v150,.match-card)::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:
    linear-gradient(115deg,rgba(255,126,25,.055),transparent 24% 76%,rgba(153,70,232,.07)),
    radial-gradient(circle at 92% 6%,rgba(121,239,176,.04),transparent 24%);
  opacity:.9;
}
body[data-theme="halloween"][data-page="home"] .pet-card:hover{
  transform:translateY(-3px);
}
body[data-theme="halloween"][data-page="home"] .pet-card:hover img{
  filter:drop-shadow(0 8px 12px rgba(0,0,0,.30)) drop-shadow(0 0 10px rgba(153,72,226,.10));
}

/* Halloween-styled status / accent chips. */
body[data-theme="halloween"] :is(.badge,.status-pill,.tr2-badge,.tr23-badge){
  border-color:rgba(255,131,30,.18)!important;
}
body[data-theme="halloween"] :is(.badge,.status-pill,.tr2-badge,.tr23-badge):where(.active,.success,.positive){
  color:#b8ffd6!important;
  border-color:rgba(121,239,176,.22)!important;
  background:rgba(121,239,176,.07)!important;
}

/* Footer ends the page with a haunted horizon rather than a plain dark block. */
body[data-theme="halloween"] .footer{
  position:relative;
  overflow:hidden;
  padding-top:max(28px,1.5rem);
}
body[data-theme="halloween"] .footer::before{
  content:"";
  position:absolute;
  pointer-events:none;
  left:0;right:0;top:0;height:26px;
  opacity:.38;
  background:
    linear-gradient(135deg,transparent 0 43%,rgba(255,123,23,.24) 44% 46%,transparent 47%) 0 0/42px 24px repeat-x,
    linear-gradient(45deg,transparent 0 46%,rgba(145,63,224,.17) 47% 49%,transparent 50%) 18px 3px/58px 25px repeat-x;
  mask-image:linear-gradient(180deg,#000,transparent 90%);
}
body[data-theme="halloween"] .footer::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;height:45%;
  pointer-events:none;
  background:radial-gradient(ellipse at 72% 100%,rgba(142,58,217,.08),transparent 42%),radial-gradient(ellipse at 18% 100%,rgba(255,109,18,.07),transparent 38%);
}
body[data-theme="halloween"] .footer>*{position:relative;z-index:1}

/* Extra scene pieces injected by theme-effects.js */
.tr-halloween-web{
  position:absolute;
  top:70px;
  width:170px;
  height:170px;
  opacity:.085;
  filter:drop-shadow(0 0 9px rgba(178,112,228,.12));
  background:
    repeating-radial-gradient(circle at 0 0,transparent 0 18px,rgba(232,213,244,.55) 19px 20px,transparent 21px 36px),
    repeating-conic-gradient(from 0deg at 0 0,rgba(232,213,244,.54) 0 1deg,transparent 1deg 20deg);
  mask-image:radial-gradient(circle at 0 0,#000 0 66%,transparent 69%);
}
.tr-halloween-web.web-left{left:0;transform:rotate(0deg)}
.tr-halloween-web.web-right{right:0;transform:scaleX(-1)}
.tr-halloween-wisp{
  position:absolute;
  width:150px;
  height:54px;
  border-radius:50%;
  opacity:var(--wisp-opacity,.08);
  filter:blur(16px);
  background:radial-gradient(ellipse at center,rgba(127,255,187,.42),rgba(155,77,233,.20) 38%,transparent 70%);
  animation:trHalloweenWisp var(--wisp-duration,19s) ease-in-out var(--wisp-delay,0s) infinite alternate;
}
.tr-halloween-wisp.wisp-1{left:8vw;top:30vh}
.tr-halloween-wisp.wisp-2{right:13vw;top:53vh;transform:scale(.72)}
.tr-halloween-wisp.wisp-3{left:43vw;bottom:10vh;transform:scale(.86)}
.tr-halloween-horizon{
  position:absolute;
  left:0;right:0;bottom:-1px;
  height:84px;
  opacity:.09;
  background:
    linear-gradient(165deg,transparent 0 58%,#13071a 59% 100%),
    linear-gradient(195deg,transparent 0 61%,#0b0610 62% 100%);
  clip-path:polygon(0 72%,5% 66%,9% 73%,14% 54%,18% 73%,25% 68%,31% 76%,38% 57%,43% 75%,49% 69%,57% 76%,64% 60%,70% 75%,77% 68%,83% 77%,89% 55%,94% 74%,100% 68%,100% 100%,0 100%);
}

@keyframes trHalloweenWisp{
  0%{translate:-12px 7px;opacity:calc(var(--wisp-opacity,.08) * .65)}
  50%{translate:16px -4px;opacity:var(--wisp-opacity,.08)}
  100%{translate:34px 10px;opacity:calc(var(--wisp-opacity,.08) * .72)}
}

/* Mobile stays immersive, but decoration is intentionally lighter. */
@media(max-width:760px){
  body[data-theme="halloween"] .page-shell::before{opacity:.20;background-size:260px 220px,330px 280px,310px 270px,380px 300px,430px 340px,330px 260px,390px 300px}
  body[data-theme="halloween"] .section-head::after{width:42px;bottom:-5px}
  body[data-theme="halloween"] .topbar::before{opacity:.40}
  .tr-halloween-web{width:105px;height:105px;top:72px;opacity:.05}
  .tr-halloween-wisp{width:105px;height:40px;filter:blur(13px);opacity:.045!important}
  .tr-halloween-horizon{height:52px;opacity:.065}
  body[data-theme="halloween"][data-page="home"] .tr323-event-banner{box-shadow:0 18px 44px rgba(0,0,0,.38),0 0 26px rgba(255,111,18,.08)!important}
  body[data-theme="halloween"][data-page="home"] .pet-card:hover{transform:none}
}

@media(prefers-reduced-motion:reduce){
  .tr-halloween-wisp,.tr-halloween-bat,.tr-halloween-fog,.tr-halloween-moon{animation:none!important}
}
