/* =========================================================
   fruit.css  –  Neon Vegas Fruit Machine
   BEM naming: block__element--modifier
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --fruit-bg:           #0a0a12;
  --fruit-machine-bg:   #12121e;
  --fruit-gold:         #ffd700;
  --fruit-gold-dark:    #b8860b;
  --fruit-neon-pink:    #ff2d78;
  --fruit-neon-cyan:    #00e5ff;
  --fruit-neon-green:   #39ff14;
  --fruit-reel-bg:      #1a1a2e;
  --fruit-reel-border:  #ffd700;
  --fruit-btn-bg:       #ff2d78;
  --fruit-btn-hover:    #ff5599;
  --fruit-text:         #ffffff;
  --fruit-shadow-gold:  0 0 18px #ffd700, 0 0 36px #b8860b;
  --fruit-shadow-pink:  0 0 16px #ff2d78, 0 0 32px #ff005588;
  --fruit-shadow-cyan:  0 0 16px #00e5ff, 0 0 32px #00e5ff88;
  --fruit-radius:       16px;
  /* Scales with viewport height (and width on narrow phones) — no scroll needed */
  --fruit-reel-size:    clamp(78px, min(14dvh, 21vw), 140px);
  /* Icon is 63 % of the cell — defined as its own token to avoid nested calc() */
  --fruit-icon-size:    clamp(49px, min(8.8dvh, 13.2vw), 88px);
  /* Coffee claim palette */
  --fruit-coffee:       #c07a20;
  --fruit-coffee-dark:  #7a4a0a;
  --fruit-claim-bg:     #ffffff;
}

/* ---------- Reset / Base ---------- */
.fruit-page {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;            /* no page-level scroll */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--fruit-bg);
  background-image:
    radial-gradient(ellipse at 20% 30%, #1a003388 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, #00003388 0%, transparent 55%);
  font-family: 'Segoe UI', 'Arial', sans-serif;
  margin: 0;
  padding: clamp(8px, 2dvh, 20px) clamp(10px, 2vw, 20px);
  box-sizing: border-box;
}

/* ---------- Machine Cabinet ---------- */
.fruit-machine {
  background: var(--fruit-machine-bg);
  border: 3px solid var(--fruit-gold);
  border-radius: 28px;
  box-shadow: var(--fruit-shadow-gold), inset 0 0 60px #00000099;
  padding: clamp(14px, 2.5dvh, 36px) clamp(18px, 3.5vw, 40px) clamp(12px, 2dvh, 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.8dvh, 24px);
  max-width: 520px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.fruit-machine::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--fruit-gold), var(--fruit-neon-pink), var(--fruit-gold), transparent);
  animation: fruit-scan 3s linear infinite;
}

/* ---------- Title ---------- */
.fruit-machine__title {
  font-size: clamp(1.1rem, 4vmin, 2rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fruit-gold);
  text-shadow: var(--fruit-shadow-gold);
  margin: 0;
  text-align: center;
}

.fruit-machine__title span {
  color: var(--fruit-neon-pink);
  text-shadow: var(--fruit-shadow-pink);
}

/* ---------- Reel Window ---------- */
.fruit-machine__window {
  border: 4px solid var(--fruit-gold);
  border-radius: var(--fruit-radius);
  box-shadow: var(--fruit-shadow-gold), inset 0 0 30px #00000088;
  background: #0d0d1a;
  padding: 12px;
  display: flex;
  gap: 12px;
  position: relative;
}

.fruit-machine__window::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: calc(var(--fruit-radius) - 2px);
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.2) 100%);
  pointer-events: none;
  z-index: 6;
}

/* ---------- Individual Reel ---------- */
.fruit-reel {
  width: var(--fruit-reel-size);
  height: calc(var(--fruit-reel-size) * 3);   /* 3-symbol tall window */
  background: var(--fruit-reel-bg);
  border: 2px solid #2a2a4a;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* Dim overlay on top row */
.fruit-reel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--fruit-reel-size);
  background: rgba(10, 10, 20, 0.55);
  pointer-events: none;
  z-index: 5;
  transition: background 0.3s ease;
}

/* Dim overlay on bottom row */
.fruit-reel::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: var(--fruit-reel-size);
  background: rgba(10, 10, 20, 0.55);
  pointer-events: none;
  z-index: 5;
  transition: background 0.3s ease;
}

/* Reduce dim on win */
.fruit-reel--win::before,
.fruit-reel--win::after {
  background: rgba(57, 255, 20, 0.08);
}

.fruit-reel__strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

.fruit-reel__symbol {
  width: var(--fruit-reel-size);
  height: var(--fruit-reel-size);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fruit-reel__symbol img {
  width: var(--fruit-icon-size);
  height: var(--fruit-icon-size);
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
  user-select: none;
  pointer-events: none;
  background: transparent;
}

/* Reel win highlight */
.fruit-reel--win {
  border-color: var(--fruit-neon-green);
  box-shadow: 0 0 18px var(--fruit-neon-green), inset 0 0 20px rgba(57,255,20,0.15);
  animation: fruit-reel-pulse 0.6s ease-in-out infinite alternate;
}

/* ---------- Payline ---------- */
/* top: 50% centres on middle row of the 3-row window */
.fruit-machine__payline {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 3px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent 0%, var(--fruit-neon-pink) 15%, var(--fruit-neon-pink) 85%, transparent 100%);
  box-shadow: var(--fruit-shadow-pink);
  opacity: 0.8;
  pointer-events: none;
  z-index: 10;
}

/* ---------- Score / Nudge shared slot ---------- */
/* Both scoreboard and nudge-row live here.
   CSS grid stacks them in the same cell so the height never changes. */
.fruit-machine__score-area {
  display: grid;
  width: 100%;
  place-items: center;
}
.fruit-machine__score-area > * {
  grid-area: 1 / 1;   /* both children overlap the same cell */
}

/* ---------- Score Panel ---------- */
.fruit-machine__scoreboard {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}

/* Fade scoreboard out while nudges are shown */
.fruit-machine__score-area:has(.fruit-machine__nudge-row--visible) .fruit-machine__scoreboard {
  opacity: 0;
  pointer-events: none;
}

.fruit-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.fruit-score__label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
  font-weight: 600;
}

.fruit-score__value {
  font-size: clamp(1.2rem, 3.5vmin, 2rem);
  font-weight: 900;
  color: var(--fruit-gold);
  text-shadow: var(--fruit-shadow-gold);
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  text-align: center;
  transition: transform 0.15s ease, color 0.15s ease;
}

.fruit-score__value--bump {
  transform: scale(1.4);
  color: var(--fruit-neon-green);
  text-shadow: 0 0 18px var(--fruit-neon-green);
}

/* Divider dot */
.fruit-machine__scoreboard-divider {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fruit-gold);
  box-shadow: var(--fruit-shadow-gold);
  opacity: 0.6;
}

/* ---------- Credit display ---------- */
.fruit-machine__credits {
  display: none;   /* removed — saves vertical space */
}

/* ---------- Spin Button ---------- */
.fruit-machine__btn {
  background: linear-gradient(145deg, var(--fruit-btn-bg), #c2185b);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: clamp(9px, 1.6dvh, 14px) clamp(32px, 6vw, 52px);
  font-size: clamp(0.9rem, 2.5vmin, 1.1rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--fruit-shadow-pink), 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  position: relative;
  overflow: hidden;
}

.fruit-machine__btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.4s ease;
}

.fruit-machine__btn:hover::before { left: 160%; }

.fruit-machine__btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 28px var(--fruit-neon-pink), 0 6px 24px rgba(0,0,0,0.5);
  background: linear-gradient(145deg, var(--fruit-btn-hover), #e91e63);
}

.fruit-machine__btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.fruit-machine__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Message Banner ---------- */
.fruit-machine__message {
  min-height: 0;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: transparent;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fruit-machine__message--visible {
  opacity: 1;
  transform: scale(1);
}

.fruit-machine__message--win {
  color: var(--fruit-neon-green);
  text-shadow: 0 0 20px var(--fruit-neon-green), 0 0 40px var(--fruit-neon-green);
  animation: fruit-message-bounce 0.5s ease infinite alternate;
}


/* ---------- Nudge Row ---------- */
/* Always in layout (display:flex) so the score-area height never changes.
   Hidden via visibility+opacity so pointer events are blocked when inactive. */
.fruit-machine__nudge-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  background: var(--fruit-machine-bg);  /* covers the score beneath */
}

.fruit-machine__nudge-row--visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.fruit-machine__nudge-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.fruit-machine__nudge-count {
  font-size: clamp(1.2rem, 3.5vmin, 2rem);
  font-weight: 900;
  color: var(--fruit-neon-cyan);
  text-shadow: var(--fruit-shadow-cyan);
  font-variant-numeric: tabular-nums;
  min-width: 1.5ch;
  text-align: center;
  transition: transform 0.15s ease;
}

.fruit-machine__nudge-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #888;
  font-weight: 600;
}

/* Three nudge groups aligned under the reels */
.fruit-machine__nudge-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* One nudge group (up + down) per reel */
.fruit-nudge {
  width: var(--fruit-reel-size);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.fruit-nudge__btn {
  background: linear-gradient(145deg, #006a80, #004455);
  color: var(--fruit-neon-cyan);
  border: 1px solid var(--fruit-neon-cyan);
  border-radius: 8px;
  width: clamp(40px, 7vw, 56px);
  height: clamp(24px, 3.5dvh, 32px);
  font-size: clamp(0.7rem, 2vmin, 0.85rem);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,229,255,0.4);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  line-height: 1;
}

.fruit-nudge__btn:hover {
  background: linear-gradient(145deg, #0099bb, #005f77);
  box-shadow: var(--fruit-shadow-cyan);
  transform: scale(1.1);
}

.fruit-nudge__btn:active {
  transform: scale(0.93);
}

/* ---------- Win Flash Overlay ---------- */
.fruit-machine__flash {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: var(--fruit-neon-green);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.fruit-machine__flash--active {
  animation: fruit-flash 0.8s ease-out forwards;
}

/* ---------- Coin Burst ---------- */
.fruit-coin {
  position: absolute;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 30;
  animation: fruit-coin-fly var(--fruit-coin-duration, 1s) ease-out forwards;
  top: 50%;
  left: 50%;
}

/* ---------- Animations ---------- */
@keyframes fruit-scan {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fruit-reel-pulse {
  from { box-shadow: 0 0 10px var(--fruit-neon-green), inset 0 0 10px rgba(57,255,20,0.1); }
  to   { box-shadow: 0 0 30px var(--fruit-neon-green), inset 0 0 30px rgba(57,255,20,0.25); }
}

@keyframes fruit-message-bounce {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

@keyframes fruit-flash {
  0%   { opacity: 0.35; }
  100% { opacity: 0; }
}

@keyframes fruit-coin-fly {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(
    calc(-50% + var(--fruit-coin-x, 0px)),
    calc(-50% + var(--fruit-coin-y, -120px))
  ) scale(0.3); opacity: 0; }
}


/* ---------- Responsive ---------- */
/* clamp() + dvh handles most cases; this catches very narrow phones */
@media (max-width: 380px) {
  .fruit-machine__window {
    padding: 8px;
    gap: 8px;
  }
  .fruit-machine__nudge-controls { gap: 8px; }
}


/* =========================================================
   Claim Free Coffee overlay
   Triggered when 3 coffee cups land on the payline.
   Sits outside <main> (fixed, full-viewport) so the
   machine's overflow:hidden does not clip it.
   ========================================================= */

/* ---------- Spin button — claim state modifier ---------- */
.fruit-machine__btn--claim {
  background: linear-gradient(145deg, var(--fruit-coffee), var(--fruit-coffee-dark));
  box-shadow: 0 0 18px var(--fruit-coffee), 0 0 36px #7a4a0a88, 0 4px 16px rgba(0,0,0,0.5);
  letter-spacing: 0.12em;
}
.fruit-machine__btn--claim:hover:not(:disabled) {
  background: linear-gradient(145deg, #d4901e, #9a5f10);
  box-shadow: 0 0 28px #d4901e, 0 6px 24px rgba(0,0,0,0.5);
  transform: translateY(-2px) scale(1.03);
}

/* ---------- Full-page white overlay ---------- */
.fruit-claim {
  position: fixed;
  inset: 0;
  background: var(--fruit-claim-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 100;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
}

.fruit-claim--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Panel + success shared layout ---------- */
.fruit-claim__panel,
.fruit-claim__success {
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}

.fruit-claim__venue {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fruit-coffee);
  margin: 0;
}

.fruit-claim__hero {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(192, 122, 32, 0.35));
}

.fruit-claim__heading {
  font-size: 1.6rem;
  font-weight: 900;
  color: #1a1a1a;
  margin: 0;
}

.fruit-claim__sub {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}

/* ---------- Form ---------- */
.fruit-claim__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.fruit-claim__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #333;
}

.fruit-claim__input {
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
  background: #fafafa;
  color: #1a1a1a;
}

.fruit-claim__input:focus {
  border-color: var(--fruit-coffee);
}

.fruit-claim__input--error {
  border-color: #e53935;
}

/* ---------- Checkboxes ---------- */
.fruit-claim__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.fruit-claim__check-input {
  margin-top: 3px;
  accent-color: var(--fruit-coffee);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.fruit-claim__check-label {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.4;
}

.fruit-claim__link {
  color: var(--fruit-coffee);
  text-decoration: underline;
}

/* ---------- Inline validation errors ---------- */
.fruit-claim__error {
  font-size: 0.8rem;
  color: #e53935;
  min-height: 1em;
  margin-top: -4px;
}

/* ---------- Submit button ---------- */
.fruit-claim__btn {
  background: linear-gradient(145deg, var(--fruit-coffee), var(--fruit-coffee-dark));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 4px 16px rgba(192, 122, 32, 0.4);
}

.fruit-claim__btn:hover {
  background: linear-gradient(145deg, #d4901e, #9a5f10);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(192, 122, 32, 0.5);
}

.fruit-claim__btn:active {
  transform: translateY(1px);
}

/* ---------- Success screen ---------- */
.fruit-claim__code {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--fruit-coffee);
  background: #fff8ee;
  border: 2px dashed var(--fruit-coffee);
  border-radius: 12px;
  padding: 16px 28px;
  font-family: 'Courier New', Courier, monospace;
  width: 100%;
  box-sizing: border-box;
}

.fruit-claim__copy-btn {
  background: none;
  border: 2px solid var(--fruit-coffee);
  color: var(--fruit-coffee);
  border-radius: 50px;
  padding: 9px 28px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  letter-spacing: 0.08em;
}

.fruit-claim__copy-btn:hover {
  background: var(--fruit-coffee);
  color: #fff;
}

.fruit-claim__copy-btn--copied {
  background: #39a853;
  border-color: #39a853;
  color: #fff;
}

.fruit-claim__fine {
  font-size: 0.75rem;
  color: #aaa;
  margin: 0;
}

/* ---------- Footer links (T&C / Privacy) ---------- */
.fruit-claim__footer {
  font-size: 0.72rem;
  color: #ccc;
  margin: 4px 0 0;
  text-align: center;
}

.fruit-claim__footer-link {
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.fruit-claim__footer-link:hover {
  color: var(--fruit-coffee);
}

/* Also style the inline checkbox T&C links as button-links */
.fruit-claim__link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  cursor: pointer;
}

/* Ensure the hidden attribute works correctly even when display:flex is set */
.fruit-claim__panel[hidden],
.fruit-claim__success[hidden] {
  display: none;
}


/* =========================================================
   Legal modals (Terms & Conditions / Privacy Policy)
   z-index 300 — sits above the claim overlay (200)
   ========================================================= */

.fruit-legal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.fruit-legal[hidden] {
  display: none;
}

.fruit-legal__box {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 80dvh;
  overflow-y: auto;
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.fruit-legal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.fruit-legal__close:hover {
  background: #f0f0f0;
  color: #333;
}

.fruit-legal__heading {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--fruit-coffee);
  margin: 0 0 16px;
  padding-right: 32px;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}

.fruit-legal__body {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.65;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}

.fruit-legal__body h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 12px;
}

.fruit-legal__body p {
  margin: 0 0 10px;
}

.fruit-legal__body p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   Daily spin limit modal
   ========================================================= */

.fruit-limit {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fruit-limit:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.fruit-limit[hidden] {
  display: none;
}

.fruit-limit__box {
  background: #12121e;
  border: 2px solid var(--fruit-gold);
  box-shadow: var(--fruit-shadow-gold), 0 12px 48px rgba(0,0,0,0.7);
  border-radius: 20px;
  max-width: 360px;
  width: 100%;
  padding: 36px 28px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}

.fruit-limit__icon {
  font-size: 3rem;
  line-height: 1;
}

.fruit-limit__heading {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--fruit-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.fruit-limit__sub {
  font-size: 0.9rem;
  color: #aaa;
  margin: 0;
}

.fruit-limit__until {
  font-size: 0.95rem;
  color: #ccc;
  margin: 4px 0 0;
}

.fruit-limit__until strong {
  color: var(--fruit-neon-cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.fruit-limit__date {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.fruit-limit__share-label {
  font-size: 0.85rem;
  color: #aaa;
  margin: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.fruit-limit__social-row {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.fruit-limit__social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 13px 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.1s ease;
  color: #fff;
}

.fruit-limit__social-btn:active {
  transform: scale(0.96);
}

.fruit-limit__social-btn:hover {
  filter: brightness(1.15);
}

.fruit-limit__social-btn--fb {
  background: #1877f2;
}

.fruit-limit__social-btn--x {
  background: #000;
  border: 1px solid #333;
}

.fruit-limit__social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.fruit-limit__close-btn {
  background: none;
  border: 1px solid #444;
  color: #888;
  border-radius: 50px;
  padding: 10px 28px;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.fruit-limit__close-btn:hover {
  border-color: #888;
  color: #ccc;
}


/* =========================================================
   Intro splash screen
   Full-viewport Vegas-style welcome overlay that appears
   before the game and dismisses on click or after 5 s.
   ========================================================= */

/* ---------- Overlay ---------- */
.fruit-intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--fruit-bg);
  background-image:
    radial-gradient(ellipse at 30% 40%, #1a003388 0%, transparent 55%),
    radial-gradient(ellipse at 70% 60%, #00003388 0%, transparent 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease;
  /* Force own GPU compositing layer so machine animations below
     cannot bleed through the overlay */
  transform: translateZ(0);
  will-change: opacity;
}

.fruit-intro--dismissed {
  opacity: 0;
  pointer-events: none;
}

.fruit-intro[hidden] {
  display: none;
}

/* ---------- Inner card ---------- */
.fruit-intro__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2dvh, 20px);
  text-align: center;
  padding: clamp(20px, 4dvh, 40px) clamp(24px, 5vw, 48px);
  border: 2px solid var(--fruit-gold);
  border-radius: 24px;
  box-shadow: var(--fruit-shadow-gold), inset 0 0 60px #00000099;
  max-width: 520px;
  width: 90%;
  /* Clip child animations to the border-radius so corners stay clean */
  overflow: hidden;
}

/* ---------- Shared animation base ---------- */
.fruit-intro__welcome,
.fruit-intro__date,
.fruit-intro__rule,
.fruit-intro__venue,
.fruit-intro__luck,
.fruit-intro__btn {
  opacity: 0;
  animation: fruit-intro-fade-up 0.6s ease forwards;
}

/* ---------- Welcome line ---------- */
.fruit-intro__welcome {
  animation-delay: 0.3s;
  font-size: clamp(1rem, 3vmin, 1.4rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--fruit-gold);
  text-shadow: var(--fruit-shadow-gold);
  margin: 0;
}

/* ---------- Date line ---------- */
.fruit-intro__date {
  animation-delay: 0.7s;
  font-size: clamp(0.8rem, 2.2vmin, 1rem);
  letter-spacing: 0.12em;
  color: var(--fruit-neon-cyan);
  text-shadow: var(--fruit-shadow-cyan);
  margin: 0;
}

/* ---------- Horizontal rule (expands left→right) ---------- */
.fruit-intro__rule {
  height: 2px;
  width: 0;
  background: var(--fruit-gold);
  box-shadow: var(--fruit-shadow-gold);
  border-radius: 2px;
  /* override the shared fade-up with the expand keyframe */
  animation: fruit-intro-rule-expand 0.6s ease forwards;
}

/* Two rules — stagger the second one further */
.fruit-intro__rule:first-of-type  { animation-delay: 1.0s; }
.fruit-intro__rule:last-of-type   { animation-delay: 1.8s; }

/* ---------- Venue name ---------- */
.fruit-intro__venue {
  animation-delay: 1.4s;
  font-size: clamp(1.6rem, 5vmin, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fruit-gold);
  margin: 0;
  /* fade-up first, then add persistent glow pulse */
  animation:
    fruit-intro-fade-up      0.6s ease         1.4s forwards,
    fruit-intro-name-glow    1.4s ease-in-out  2.0s infinite alternate;
}

/* ---------- Good Luck line ---------- */
.fruit-intro__luck {
  animation-delay: 2.2s;
  font-size: clamp(1rem, 3.2vmin, 1.5rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--fruit-neon-pink);
  text-shadow: var(--fruit-shadow-pink);
  margin: 0;
  animation:
    fruit-intro-fade-up    0.6s ease-in-out  2.2s forwards,
    fruit-intro-bounce     0.5s ease-in-out  3.0s infinite alternate;
}

/* ---------- Footer links on intro ---------- */
.fruit-intro__footer {
  opacity: 0;
  animation: fruit-intro-fade-up 0.6s ease 2.8s forwards;
  font-size: 0.7rem;
  color: #666;
  margin: 0;
  letter-spacing: 0.05em;
}

.fruit-intro__footer-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.7rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.fruit-intro__footer-link:hover {
  color: var(--fruit-gold);
}

/* ---------- Play Now button ---------- */
.fruit-intro__btn {
  animation-delay: 2.6s;
  background: linear-gradient(145deg, var(--fruit-btn-bg), #c2185b);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: clamp(9px, 1.6dvh, 14px) clamp(32px, 6vw, 52px);
  font-size: clamp(0.9rem, 2.5vmin, 1.1rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--fruit-shadow-pink), 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.fruit-intro__btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 28px var(--fruit-neon-pink), 0 6px 24px rgba(0,0,0,0.5);
}

.fruit-intro__btn:active {
  transform: translateY(1px) scale(0.98);
}

/* ---------- Intro keyframes ---------- */
@keyframes fruit-intro-fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fruit-intro-rule-expand {
  from { opacity: 1; width: 0; }
  to   { opacity: 1; width: min(300px, 70vw); }
}

@keyframes fruit-intro-name-glow {
  from { text-shadow: 0 0 20px #ffd700, 0 0 40px #b8860b; }
  to   { text-shadow: 0 0 40px #ffd700, 0 0 80px #ffd700, 0 0 120px #b8860b88; }
}

@keyframes fruit-intro-bounce {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
