*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
  :root {
    --bg:          #d4f5d4;
    --bg2:         #b8edb8;
    --card:        #ffffff;
    --green-vivid: #1db954;
    --green-mid:   #16a34a;
    --green-dark:  #15803d;
    --green-border:#6ee07f;
    --green-soft:  #dcfce7;
    --green-panel: #f0fdf4;
    --gold:        #d97706;
    --gold-light:  #fbbf24;
    --text-dark:   #14532d;
    --text-mid:    #166534;
    --text-muted:  #4ade80;
  }
 
  html, body {
    height: 100%;
    background: var(--bg);
    font-family: 'Libre Baskerville', serif;
    overflow-x: hidden;
  }
 
  body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: repeating-linear-gradient(
      135deg,
      transparent,
      transparent 18px,
      rgba(255,255,255,0.18) 18px,
      rgba(255,255,255,0.18) 19px
    );
    pointer-events: none; z-index: 0;
  }
 
  .page {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px 16px;
    gap: 0;
  }
 
  /* Title */
  .title-wrap {
    text-align: center;
    margin-bottom: 20px;
  }
  .title-top {
    font-family: 'Playfair Display', serif;
    font-size: clamp(11px, 2vw, 14px);
    font-weight: 700;
    letter-spacing: 0.35em;
    color: var(--green-dark);
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.75;
  }
  .title-main {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 400;
    color: var(--text-dark);
    line-height: 0.9;
    text-shadow: 0 2px 0 rgba(255,255,255,0.5), 0 4px 12px rgba(21,128,61,0.2);
  }
  .title-sub {
    font-family: 'Playfair Display', serif;
    font-size: clamp(13px, 2.5vw, 18px);
    font-style: italic;
    color: var(--green-mid);
    margin-top: 6px;
    letter-spacing: 0.05em;
  }
 
  .machine {
    background: var(--card);
    border: 2.5px solid var(--green-border);
    border-radius: 28px;
    padding: 28px 32px 24px;
    box-shadow:
      0 0 0 5px rgba(255,255,255,0.6),
      0 0 0 8px var(--green-vivid),
      0 16px 48px rgba(29,185,84,0.2),
      0 4px 12px rgba(0,0,0,0.06);
    max-width: 540px;
    width: 100%;
    position: relative;
  }
 
  .machine::before, .machine::after {
    content: '✦';
    position: absolute;
    color: var(--green-border);
    font-size: 18px;
    top: 10px;
  }
  .machine::before { left: 14px; }
  .machine::after  { right: 14px; }
 
  .deco-bar {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
  }
  .deco-bar::before, .deco-bar::after {
    content: '';
    flex: 1; height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--green-border), transparent);
  }
  .deco-bar span {
    font-size: 18px;
    color: var(--green-vivid);
  }
 
  .paytable {
    background: var(--green-soft);
    border: 1.5px solid var(--green-border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 20px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .pay-item {
    font-size: 11px;
    color: var(--text-mid);
    font-family: 'Libre Baskerville', serif;
    white-space: nowrap;
  }
  .pay-item span { color: var(--gold); font-weight: 700; }
  .pay-sep { color: var(--green-border); font-size: 11px; align-self: center; }
 
  .reel-window {
    background: var(--green-panel);
    border: 2.5px solid var(--green-border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: inset 0 2px 8px rgba(29,185,84,0.08), 0 2px 16px rgba(29,185,84,0.1);
    margin-bottom: 20px;
    position: relative;
  }
 
  .win-line {
    position: absolute;
    top: 50%; left: 8px; right: 8px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-light));
    transform: translateY(-50%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(217,119,6,0.5);
    z-index: 10;
    pointer-events: none;
  }
 
  .reels-row {
    display: flex; gap: 8px;
    position: relative;
  }
 
  .reel-container {
    flex: 1;
    height: 110px;
    overflow: hidden;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid var(--green-border);
    position: relative;
  }
 
  .reel-container::before,
  .reel-container::after {
    content: '';
    position: absolute; left: 0; right: 0; z-index: 5;
    pointer-events: none;
    height: 28px;
  }
  .reel-container::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(240,253,244,0.9), transparent);
  }
  .reel-container::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(240,253,244,0.9), transparent);
  }
 
  .reel-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 0; left: 0; right: 0;
    transition: top 0.05s linear;
  }
 
  .reel-symbol {
    height: 110px;
    display: flex; align-items: center; justify-content: center;
    font-size: 56px;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
    width: 100%;
  }
 
  .info-bar {
    display: flex; gap: 12px; margin-bottom: 20px;
  }
  .info-box {
    flex: 1;
    background: var(--green-soft);
    border: 1.5px solid var(--green-border);
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
  }
  .info-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green-mid);
    margin-bottom: 4px;
    font-family: 'Libre Baskerville', serif;
  }
  .info-value {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    transition: color 0.2s;
  }
  .info-value.flash { color: var(--gold); }
 
  /* Bet controls */
  .bet-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 18px;
    justify-content: center;
  }
  .bet-btn {
    background: var(--green-soft);
    border: 1.5px solid var(--green-border);
    border-radius: 8px;
    color: var(--green-dark);
    font-size: 18px;
    width: 36px; height: 36px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-family: 'Playfair Display', serif;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
  }
  .bet-btn:hover { background: var(--bg2); }
  .bet-btn:active { transform: scale(0.92); }
  .bet-display {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    color: var(--text-mid);
    min-width: 90px; text-align: center;
    letter-spacing: 0.05em;
  }
  .bet-display strong { color: var(--text-dark); font-size: 20px; }
 
  .spin-btn {
    width: 100%;
    padding: 16px 24px;
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #fff;
    background: linear-gradient(135deg, #34d058 0%, var(--green-vivid) 45%, var(--green-dark) 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 0 #166534, 0 6px 24px rgba(29,185,84,0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    position: relative;
    overflow: hidden;
  }
  .spin-btn::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 55%);
    pointer-events: none;
  }
  .spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #166534, 0 12px 32px rgba(29,185,84,0.5);
  }
  .spin-btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #166534, 0 4px 12px rgba(29,185,84,0.3);
  }
  .spin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
 
  .message {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: clamp(15px, 3vw, 20px);
    font-style: italic;
    min-height: 32px;
    margin-top: 16px;
    color: var(--text-mid);
    transition: opacity 0.3s;
  }
  .message.win  { color: var(--gold); animation: pulse 0.5s ease infinite alternate; }
  .message.loss { color: #86efac; }
 
  @keyframes pulse {
    from { text-shadow: 0 0 6px rgba(217,119,6,0.3); }
    to   { text-shadow: 0 0 22px rgba(217,119,6,0.8); }
  }
 
  .coin-rain {
    position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden;
  }
  .coin {
    position: absolute; top: -40px;
    font-size: 24px;
    animation: fall linear forwards;
  }
  @keyframes fall {
    to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
  }
 
  .reel-container.winner {
    box-shadow: 0 0 0 2.5px var(--gold-light), 0 0 18px rgba(251,191,36,0.5);
    border-color: var(--gold-light);
  }
 
  .bottom-deco {
    margin-top: 18px;
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    color: var(--green-dark);
    letter-spacing: 0.15em;
    text-align: center;
    opacity: 0.6;
  }