/* ================================================================
   LIDER BOXING ARCADE — Branded Styles
   Fonts: Tektur (Display), DM Sans (Body)
   ================================================================ */

:root {
    --bg-color: #0b0b0a;
    --primary-red: #c00000;
    --primary-red-hover: #ff2b2b;
    --font-display: 'Tektur', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    overflow: hidden;
    color: #fff;
    font-family: var(--font-body);
    font-weight: 500;
    overscroll-behavior: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#app {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 9 / 16;
    touch-action: none;
    cursor: crosshair;
}

/* ================================================================
   LOADING OVERLAY
   ================================================================ */

#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    text-align: center;
    width: 80%;
    max-width: 320px;
}

.loader-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 2.5rem);
    font-weight: 900;
    color: var(--primary-red);
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(192,0,0,0.4);
    margin-bottom: 2px;
}

.loader-subtitle {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.4em;
    margin-bottom: 40px;
    opacity: 0.8;
}

.loader-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c00000, #ff2b2b);
    transition: width 0.3s ease;
}

.loader-pct {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.4);
    margin-top: 12px;
}

.loader-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.25);
    margin-top: 6px;
}

.hidden { display: none !important; }

/* ================================================================
   PREMIUM OVERLAY (Rules / Ranking)
   ================================================================ */

#arcade-overlay {
    position: absolute;
    inset: 0;
    z-index: 5000;
    background: rgba(10, 10, 10, 0.98); /* Opaque fallback */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.3s ease-out;
    color: #fff;
    touch-action: none; /* Prevent scroll bleed */
    pointer-events: auto;
    user-select: none;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#overlay-content {
    width: 100%;
    max-width: 440px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    padding: 20px 0;
}

.overlay-btn-close {
    width: 100%;
    max-width: 440px;
    background: #333;
    color: #fff;
    border: none;
    padding: 18px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 20px;
}

/* Forms & Inputs */
.lead-form {
    background: rgba(255,255,255,0.03);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

.lead-form h2 {
    font-family: var(--font-display);
    color: var(--primary-red);
    margin-bottom: 8px;
    font-size: 1.8rem;
}

.lead-form p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 24px;
}

.input-group {
    margin-bottom: 16px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 6px;
    letter-spacing: 0.1em;
}

.input-group input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 14px;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
}

.input-group input:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 10px rgba(192,0,0,0.3);
}

.gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 24px;
    cursor: pointer;
}

.gdpr-label input { width: auto; margin-top: 3px; }

.btn-submit {
    width: 100%;
    background: var(--primary-red);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(192,0,0,0.4);
}

/* Leaderboard Table */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ranking-table th {
    text-align: left;
    color: var(--primary-red);
    font-size: 0.7rem;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ranking-table td {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rank-idx { font-weight: 900; color: rgba(255,255,255,0.3); width: 30px; }
.rank-name { font-weight: 700; }
.rank-score { text-align: right; font-family: var(--font-display); font-weight: 800; color: #ffca28; }

#loader-error {
    background: rgba(192, 0, 0, 0.2);
    border: 1px solid var(--primary-red);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-display);
}

/* ================================================================
   END OF STYLES
   ================================================================ */
