/* ===== SmallBigHouse — Styles ===== */
:root {
    --maize: #FFCB05;
    --blue: #00274C;
    --dark: #0a0e1a;
    --darker: #060912;
    --card: #111827;
    --border: #1f2937;
    --text: #f9fafb;
    --muted: #9ca3af;
    --green: #10b981;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Manrope', system-ui, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ─── Header ─── */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10,14,26,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
}
.header-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 20px; font-weight: 800; color: var(--maize); letter-spacing: -0.5px; }
.header-stats { display: flex; align-items: center; gap: 12px; }
.stat { text-align: right; }
.stat span { font-size: 18px; font-weight: 800; color: var(--maize); }
.stat small { display: block; font-size: 11px; color: var(--muted); }
.progress-bar {
    width: 120px; height: 6px;
    background: var(--border); border-radius: 3px; overflow: hidden;
}
.progress-fill { height: 100%; background: var(--maize); border-radius: 3px; transition: width 0.6s ease; width: 0%; }

/* ─── Hero ─── */
.hero {
    padding: 140px 20px 60px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 30%, rgba(255,203,5,0.06) 0%, transparent 60%);
}
.hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 900; line-height: 1.1; letter-spacing: -1px; }
.highlight { color: var(--maize); }
.hero p { font-size: 18px; color: var(--muted); margin: 16px 0 28px; }
.btn-primary {
    display: inline-block; padding: 14px 36px;
    background: var(--maize); color: var(--blue);
    font: 700 16px/1 'Manrope', sans-serif;
    border: none; border-radius: 50px; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255,203,5,0.35); }

/* ─── Stadium ─── */
.stadium-section {
    position: relative;
    padding: 0 0 16px;
}
.canvas-container {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    background: var(--darker);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    cursor: grab;
    overflow: hidden;
}
#stadiumCanvas { width: 100%; height: 100%; display: block; }

.stadium-controls {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.zoom-controls { display: flex; gap: 6px; }
.ctrl-btn {
    width: 36px; height: 36px; border: 1px solid var(--border);
    background: var(--card); color: var(--text); font-size: 18px;
    border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.ctrl-btn:hover { background: var(--border); }
.minimap-wrap {
    border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
    background: var(--card);
}
#minimapCanvas { display: block; }

.stadium-legend {
    display: flex; gap: 20px; justify-content: center; padding: 10px;
    font-size: 13px; color: var(--muted);
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.dot-unclaimed { background: #1a1f2e; border: 1px solid #374151; }
.dot-claimed { background: var(--maize); }

/* ─── Seat Popup ─── */
.seat-popup {
    position: absolute; z-index: 20;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px; min-width: 220px; max-width: 280px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    pointer-events: none;
}
.popup-claimed { display: flex; gap: 12px; align-items: flex-start; }
.popup-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.popup-info strong { display: block; font-size: 14px; color: var(--maize); }
.popup-info p { font-size: 12px; color: var(--muted); margin: 4px 0; }
.popup-info a { font-size: 11px; color: #60a5fa; word-break: break-all; text-decoration: none; }
.popup-meta { font-size: 11px; color: #4b5563; display: block; margin-top: 4px; }
.popup-unclaimed { text-align: center; }
.popup-unclaimed strong { color: var(--maize); display: block; margin-bottom: 4px; }
.popup-unclaimed p { color: var(--muted); font-size: 12px; }
.popup-unclaimed span { color: var(--green); font-size: 13px; font-weight: 600; }

/* ─── Modals ─── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    z-index: 200; display: none;
}
.modal-overlay.active { display: block; }
.modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    z-index: 210; background: var(--card); border: 1px solid var(--border);
    border-radius: 20px; padding: 32px; width: 90%; max-width: 420px;
    display: none;
}
.modal.active { display: block; }
.modal h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.modal-x {
    position: absolute; top: 16px; right: 16px; background: none;
    border: none; color: var(--muted); font-size: 22px; cursor: pointer;
}
.modal label {
    display: block; font-size: 13px; font-weight: 600; color: var(--muted);
    margin-bottom: 14px;
}
.modal input, .modal textarea {
    display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
    background: var(--dark); border: 1px solid var(--border); border-radius: 10px;
    color: var(--text); font: 400 14px/1.4 'Manrope', sans-serif;
}
.modal input:focus { border-color: var(--maize); outline: none; }
.modal input[type="file"] { padding: 8px; }
.btn-submit {
    width: 100%; padding: 14px; margin-top: 8px;
    background: var(--maize); color: var(--blue);
    font: 700 16px/1 'Manrope', sans-serif;
    border: none; border-radius: 50px; cursor: pointer;
    transition: transform 0.15s;
}
.btn-submit:hover { transform: translateY(-1px); }

.success-modal { text-align: center; }
.success-icon { font-size: 48px; margin-bottom: 12px; }
.share-row { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.share-btn {
    padding: 8px 16px; background: var(--dark); border: 1px solid var(--border);
    color: var(--text); border-radius: 8px; cursor: pointer; font: 600 13px 'Manrope';
    transition: background 0.15s;
}
.share-btn:hover { background: var(--border); }

/* ─── How It Works ─── */
.how-section { padding: 60px 20px; text-align: center; }
.how-section h2 { font-size: 28px; font-weight: 800; margin-bottom: 32px; }
.steps-row { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.step-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 28px 24px; flex: 1; min-width: 200px; max-width: 280px;
}
.step-num {
    width: 44px; height: 44px; margin: 0 auto 12px;
    background: var(--maize); color: var(--blue);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 20px;
}
.step-card h3 { font-size: 18px; margin-bottom: 6px; }
.step-card p { font-size: 14px; color: var(--muted); }

/* ─── Ticker ─── */
.ticker-section { padding: 40px 20px; text-align: center; overflow: hidden; }
.ticker-section h3 { font-size: 16px; color: var(--muted); margin-bottom: 16px; }
.ticker-wrap { overflow: hidden; position: relative; }
.ticker {
    display: flex; gap: 40px; white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}
.ticker-item { font-size: 14px; color: var(--muted); flex-shrink: 0; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ─── Confetti ─── */
.confetti-piece {
    position: fixed; top: -10px; width: 10px; height: 10px;
    z-index: 300; pointer-events: none;
    animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ─── Toast ─── */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--card); color: var(--text); padding: 12px 24px;
    border-radius: 10px; border-left: 4px solid var(--maize);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5); z-index: 400;
    font: 600 14px 'Manrope'; animation: toast-in 0.3s ease;
}
.toast.out { animation: toast-out 0.3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateX(-50%) translateY(20px); } }

/* ─── Footer ─── */
.footer { padding: 32px 20px; text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.footer strong { color: var(--maize); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .header-stats { gap: 8px; }
    .progress-bar { width: 60px; }
    .canvas-container { height: 55vh; }
    .stadium-controls { top: 8px; right: 8px; }
    .steps-row { flex-direction: column; align-items: center; }
}
