/* =============================================
   GLOBALFOLKGAMES - Brand: Orange + Purple
   Mobile-first, never breaks on small screens
   ============================================= */

:root {
    --bg-dark: #0f0f13;
    --card-bg: #1a1a24;
    --accent: #f39c12;          /* Orange */
    --accent-purple: #9b59b6;   /* Purple */
    --text: #ffffff;
    --muted: #a0a0b0;
    --border: #2c2c3a;
    --success: #27ae60;
    --danger: #e74c3c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* ===== SHARED HEADER (used on every page) ===== */
.gfg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.gfg-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gfg-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.gfg-game-tag {
    font-size: 0.75rem;
    background: var(--accent-purple);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.gfg-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gfg-local-pts {
    font-size: 0.8rem;
    color: var(--accent-purple);
    font-weight: 600;
}

.gfg-user-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #252535;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.auth-btn-small {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.auth-user {
    color: var(--muted);
    font-size: 0.8rem;
}

/* ===== LANDING PAGE LAYOUT ===== */
.mobile-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 640px;
    margin: 0 auto;
}

/* High-converting Billboard */
.onboarding-billboard {
    background: linear-gradient(135deg, #1a1a24 0%, #2a1a3a 100%);
    border: 1px solid var(--accent-purple);
    border-radius: 16px;
    padding: 22px 18px;
    text-align: center;
}

.onboarding-billboard h2 {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 8px;
    line-height: 1.3;
}

.onboarding-billboard p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Level Tabs - horizontal scroll, never wraps */
.level-tabs-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.level-tabs-scroll::-webkit-scrollbar { display: none; }

.tab-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    background: #252535;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* Campaign status tabs */
.campaign-status-tabs {
    display: flex;
    gap: 6px;
}

.sub-tab-btn {
    flex: 1;
    padding: 9px 6px;
    background: #252535;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.sub-tab-btn.active {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
}

/* Game cards */
.content-viewport {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
}

.game-card h3 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.game-card p {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 14px;
    line-height: 1.4;
}

.launch-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

/* ===== AUTH MODAL ===== */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
}
.auth-modal.visible {
    opacity: 1;
    visibility: visible;
}
.auth-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    width: 90%;
    max-width: 340px;
    position: relative;
    text-align: center;
}
.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.auth-modal-content h2 {
    color: var(--accent);
    margin-bottom: 6px;
}
.auth-hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.auth-modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #252535;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}
.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.auth-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.auth-btn.primary {
    background: var(--accent);
    color: #000;
}
.auth-btn.secondary {
    background: #252535;
    color: white;
    border: 1px solid var(--border);
}

/* Banner */
.auth-banner {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1100;
    max-width: 90%;
    text-align: center;
}
.auth-banner.success { background: var(--success); color: white; }
.auth-banner.error { background: var(--danger); color: white; }

#auth-otp {
  letter-spacing: 4px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
}
