/* ============================================
   Thanksgiving theme — like Halloween, decorations live only
   in the chrome: top bar, wide-screen gutters (behind content),
   and a harvest scene above the footer. Never in the game area.
   ============================================ */

.tg-sprites { position: absolute; width: 0; height: 0; overflow: hidden; }

.holiday-thanksgiving .tg-dot,
.holiday-thanksgiving .tg-wordmark-hat,
.holiday-thanksgiving .tg-nav-sky,
.holiday-thanksgiving .tg-gutters,
.holiday-thanksgiving .tg-harvest { pointer-events: none; user-select: none; }

/* Leaf colors (the leaf symbols take their fill from the outer svg) */
.tg-c1 { fill: #dc2626; }
.tg-c2 { fill: #ea580c; }
.tg-c3 { fill: #eab308; }
.tg-c4 { fill: #a16207; }

/* ---------- Top bar: autumn dusk ---------- */
.holiday-thanksgiving .v3-nav {
  background: linear-gradient(120deg, #2d1066 0%, #5b1d3f 45%, #9a3412 80%, #b45309 100%);
}
.holiday-thanksgiving .v3-nav-inner { position: relative; z-index: 1; }

/* A maple leaf for the dot in LEX.GAMES */
.holiday-thanksgiving .v3-wordmark .mark { position: relative; }
.tg-dot {
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  margin: 0 2px;
  vertical-align: -0.04em;
  transform: rotate(-12deg);
  transition: transform var(--ease);
}
.tg-dot svg { width: 100%; height: 100%; display: block; overflow: visible; fill: #f97316; filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.5)); }
.holiday-thanksgiving .v3-wordmark:hover .tg-dot { transform: translateY(-3px) rotate(25deg) scale(1.15); }

/* Pilgrim hat perched on the L */
.tg-wordmark-hat {
  position: absolute;
  left: -7px;
  top: -16px;
  width: 22px;
  height: 20px;
  transform: rotate(-16deg);
  transform-origin: 50% 90%;
  filter: drop-shadow(0 0 2px rgba(253, 230, 138, 0.85)) drop-shadow(0 0 5px rgba(253, 230, 138, 0.45));
  transition: transform var(--ease);
}
.holiday-thanksgiving .v3-wordmark:hover .tg-wordmark-hat { transform: rotate(-28deg) translateY(-3px); }

/* Leaves drifting across the top bar, behind the links */
.tg-nav-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.tg-drift {
  position: absolute;
  display: block;
  width: 16px;
  height: 16px;
}
.tg-drift svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: tg-tumble 3.2s ease-in-out infinite alternate;
}
.tg-nav-sky .tg-drift { left: -30px; opacity: 0.85; animation: tg-blow 24s linear infinite; }
.tg-drift--1 { top: 5px;  animation-delay: -2s !important; }
.tg-drift--2 { top: 26px; width: 12px !important; height: 12px !important; animation-duration: 31s !important; animation-delay: -12s !important; }
.tg-drift--3 { top: 16px; width: 13px !important; height: 13px !important; animation-duration: 27s !important; animation-delay: -19s !important; }
.tg-drift--4 { top: 32px; width: 10px !important; height: 10px !important; animation-duration: 38s !important; animation-delay: -30s !important; }

@keyframes tg-tumble {
  from { transform: rotate(-35deg) scaleX(1); }
  to   { transform: rotate(40deg) scaleX(0.6); }
}
@keyframes tg-blow {
  0%   { left: -30px;             transform: translateY(-4px); }
  25%  {                          transform: translateY(5px); }
  50%  {                          transform: translateY(-3px); }
  75%  {                          transform: translateY(6px); }
  100% { left: calc(100% + 30px); transform: translateY(0); }
}

/* ---------- Gutters: only where there's empty space, and behind everything ---------- */
.tg-gutters { display: none; }
@media (min-width: 1360px) {
  .tg-gutters {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
  }
}
/* Leaves fall down the outer edges only, never across the middle */
.tg-fall {
  position: absolute;
  top: -40px;
  width: 26px;
  height: 26px;
  display: block;
  opacity: 0.8;
  animation: tg-fall 16s linear infinite;
}
.tg-fall svg { width: 100%; height: 100%; display: block; animation: tg-tumble 2.6s ease-in-out infinite alternate; }
.tg-fall--1 { left: 1.5vw; }
.tg-fall--2 { left: 4vw;   width: 20px; height: 20px; animation-duration: 21s; animation-delay: -9s; }
.tg-fall--3 { left: 2.5vw; width: 18px; height: 18px; animation-duration: 18s; animation-delay: -14s; }
.tg-fall--4 { right: 2vw;  animation-duration: 19s; animation-delay: -5s; }
.tg-fall--5 { right: 4.5vw; width: 20px; height: 20px; animation-duration: 23s; animation-delay: -16s; }
.tg-fall--6 { right: 1.5vw; width: 17px; height: 17px; animation-duration: 17s; animation-delay: -11s; }

@keyframes tg-fall {
  0%   { top: -40px;              translate: 0 0; }
  25%  {                          translate: 22px 0; }
  50%  {                          translate: -8px 0; }
  75%  {                          translate: 18px 0; }
  100% { top: calc(100% + 40px);  translate: 0 0; }
}

.tg-gutter { position: absolute; display: block; }
.tg-gutter--turkey     { left: 2vw;  bottom: 22px; width: 84px; height: 74px; animation: tg-waddle 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.tg-gutter--cornucopia { right: 2vw; bottom: 22px; width: 100px; height: 60px; }

/* ---------- Harvest scene above the footer ---------- */
.tg-harvest {
  position: relative;
  isolation: isolate;
  margin-top: 40px;
  height: 104px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 78%, #fdba74 0 20px, rgba(253, 186, 116, 0.25) 21px 34px, transparent 35px),
    linear-gradient(to bottom, transparent, rgba(234, 88, 12, 0.10));
}
/* field the scene stands on */
.tg-harvest::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -34px;
  height: 64px;
  z-index: 1;
  background: #7c4a1e;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: inset 0 4px 0 #a16207;
}
.tg-harvest + .v3-footer { margin-top: 0; border-top: 0; }

.tg-harvest-inner {
  position: relative;
  max-width: 760px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
}
.tg-g { display: block; flex-shrink: 0; position: relative; z-index: 2; margin-bottom: 22px; }
.tg-g-corn          { width: 18px; height: 36px; transform: rotate(-14deg); }
.tg-g-corn--2       { transform: rotate(12deg); }
.tg-g-pumpkin       { width: 36px; height: 36px; }
.tg-g-pumpkin--small{ width: 24px; height: 24px; }
.tg-g-cornucopia    { width: 84px; height: 50px; }
.tg-g-sign          { width: 70px; height: 50px; margin-bottom: 18px; z-index: 0; }
.tg-g-turkey        { width: 62px; height: 54px; margin-bottom: 25px; transform-origin: 50% 100%; animation: tg-waddle 2.4s ease-in-out infinite; }
.tg-g-pie           { width: 46px; height: 25px; }

/* a little pile of fallen leaves */
.tg-pile { position: relative; z-index: 2; width: 46px; height: 24px; margin-bottom: 18px; flex-shrink: 0; }
.tg-pile svg { position: absolute; width: 18px; height: 18px; }
.tg-pile svg:nth-child(1) { left: 0;    bottom: 0; transform: rotate(-40deg); }
.tg-pile svg:nth-child(2) { left: 12px; bottom: 4px; transform: rotate(20deg); }
.tg-pile svg:nth-child(3) { left: 22px; bottom: 0; transform: rotate(70deg); }
.tg-pile svg:nth-child(4) { left: 10px; bottom: -2px; transform: rotate(-100deg); }

/* leaves blowing through the scene */
.tg-harvest .tg-h-leaf { z-index: 3; width: 16px; height: 16px; left: -30px; animation: tg-blow 14s linear infinite; }
.tg-h-leaf--1 { top: 14px; }
.tg-h-leaf--2 { top: 34px; width: 13px !important; height: 13px !important; animation-duration: 19s !important; animation-delay: -8s !important; }

@keyframes tg-waddle {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  25%      { transform: rotate(0) translateY(-3px); }
  50%      { transform: rotate(4deg) translateY(0); }
  75%      { transform: rotate(0) translateY(-3px); }
}

@media (max-width: 640px) {
  .tg-harvest { height: 92px; margin-top: 28px; }
  .tg-harvest-inner { padding: 0 6px; }
  .tg-g-pumpkin--small, .tg-g-corn--2, .tg-pile { display: none; }
  .tg-g-sign { width: 58px; height: 42px; }
  .tg-g-cornucopia { width: 70px; height: 42px; }
  .tg-wordmark-hat { left: -5px; top: -13px; width: 18px; height: 16px; }
}
