* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(ellipse at top, #0a1929 0%, #050a14 100%);
  color: #e2e8f0;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}
a { color: #60a5fa; text-decoration: none; }
a:hover { text-decoration: underline; }
kbd { background: #1e293b; border: 1px solid #334155; border-radius: 4px; padding: 2px 6px; font-family: monospace; font-size: 0.9em; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: rgba(2,6,23,0.7); backdrop-filter: blur(10px);
  border-bottom: 1px solid #1e293b; position: sticky; top: 0; z-index: 100;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { font-size: 26px; }
.brand h1 {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #34d399, #fbbf24);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-header nav { display: flex; gap: 18px; font-size: 14px; }

.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 12px auto; min-height: 90px;
  background: rgba(15,23,42,0.4); border: 1px dashed #334155; border-radius: 8px;
  position: relative; max-width: 970px; width: calc(100% - 24px);
}
.ad-slot .ad-label { position: absolute; top: 2px; right: 8px; font-size: 9px; color: #475569; text-transform: uppercase; letter-spacing: 0.5px; }
.ad-side { min-height: 250px; width: 100%; margin-top: 16px; }
.ad-content { min-height: 250px; margin: 28px auto; }

.layout {
  display: grid; grid-template-columns: 220px 1fr 220px;
  gap: 16px; padding: 16px; max-width: 1100px; margin: 0 auto;
  align-items: start;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 12px; padding: 8px; }
  .side-panel.right { order: 3; }
  .side-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .side-panel .ad-side { grid-column: 1 / -1; }
}

.side-panel { display: flex; flex-direction: column; gap: 10px; }
.stat-card {
  background: rgba(30, 41, 59, 0.6); border: 1px solid #1e293b; border-radius: 12px;
  padding: 12px 14px; text-align: center;
}
.stat-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 800; color: #f1f5f9; }
.stat-value.good { color: #34d399; }
.stat-value.warn { color: #fbbf24; }
.stat-value.bad { color: #f87171; }
.stat-sub { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.bad { color: #f87171; }
.good { color: #34d399; }
.side-btn {
  background: linear-gradient(135deg, #34d399, #10b981); color: white; border: none;
  padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: transform 0.1s, box-shadow 0.2s;
}
.side-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(52,211,153,0.4); }
.side-btn.daily { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.game-area { display: flex; flex-direction: column; align-items: center; }
.canvas-frame {
  position: relative;
  width: min(95vw, 400px);
  aspect-ratio: 4/7;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px; overflow: hidden;
  border: 2px solid #0f766e;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
#game { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; }

.controls { display: flex; gap: 10px; margin-top: 14px; width: 100%; max-width: 400px; justify-content: center; }
.ctrl-btn {
  flex: 1; padding: 16px; border-radius: 12px; border: 1px solid #334155;
  background: rgba(30,41,59,0.8); color: white; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: background 0.15s, transform 0.1s; letter-spacing: 0.5px;
}
.ctrl-btn:active { transform: scale(0.96); }
.ctrl-btn.drop {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 4px 12px rgba(52,211,153,0.4);
}
.ctrl-btn.cashout {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1f2937; box-shadow: 0 4px 12px rgba(251,191,36,0.4);
}

.hint { margin-top: 10px; font-size: 12px; color: #94a3b8; text-align: center; max-width: 400px; }

.overlay {
  position: absolute; inset: 0; background: rgba(2,6,23,0.92);
  backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center;
  z-index: 50;
  animation: fadeIn 0.3s ease;
}
.overlay[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay-card {
  background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
  border: 1px solid #334155; border-radius: 16px; padding: 28px;
  text-align: center; max-width: 92%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.overlay-card h2 { font-size: 28px; margin-bottom: 4px; color: #f87171; }
.overlay-card h2.win { color: #34d399; }
.overlay-card p { color: #94a3b8; font-size: 13px; margin-bottom: 4px; }
.big-score {
  font-size: 56px; font-weight: 900; margin: 8px 0;
  background: linear-gradient(135deg, #fbbf24, #34d399);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.best-line { color: #cbd5e1; margin-bottom: 18px; }
.overlay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 12px 24px; border-radius: 10px; border: 1px solid #334155;
  background: rgba(30,41,59,0.8); color: white; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: all 0.15s;
}
.btn:hover { background: rgba(51,65,85,0.8); }
.btn.primary { background: linear-gradient(135deg, #34d399, #10b981); border-color: transparent; }

.content-section {
  max-width: 760px; margin: 32px auto; padding: 24px;
  background: rgba(15,23,42,0.5); border-radius: 12px;
  border: 1px solid #1e293b;
}
.content-section h2 { font-size: 22px; margin-bottom: 14px; color: #f1f5f9; }
.content-section h3 { font-size: 17px; margin: 16px 0 8px; color: #cbd5e1; }
.content-section p, .content-section li { line-height: 1.6; color: #cbd5e1; font-size: 14px; }
.content-section ol, .content-section ul { padding-left: 20px; margin: 10px 0; }
.content-section li { margin-bottom: 6px; }

.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(2,6,23,0.95); backdrop-filter: blur(10px);
  padding: 14px calc(20px + env(safe-area-inset-right))
           calc(14px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  border-top: 1px solid #1e293b;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  z-index: 200; flex-wrap: wrap; font-size: 13px;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner button {
  padding: 8px 18px; border-radius: 6px; border: none; white-space: nowrap;
  background: linear-gradient(135deg, #34d399, #10b981); color: white; font-weight: 700; cursor: pointer;
}
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-btn.cookie-ghost { background: transparent; border: 1px solid #334155; color: #cbd5e1; }
.cookie-btn.cookie-ghost:hover { background: rgba(51,65,85,0.5); }

.site-footer { text-align: center; padding: 24px; color: #64748b; font-size: 12px; border-top: 1px solid #1e293b; margin-top: 32px; }
.site-footer nav { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* --- Ad slots: hidden until AdSense approval ------------------------------
   The loader in index.html is commented out, but .ad-slot still paints a
   dashed 90px box labelled "Advertisement". On a live domain that reads as a
   broken page to a visitor and as placeholder ad inventory to an AdSense
   reviewer, which is a known rejection reason. !important is deliberate: this
   is a temporary switch that must beat every rule above it, including the
   responsive overrides. Delete this block when the real publisher id goes in. */
.ad-slot { display: none !important; }
