@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800;900&family=Syncopate:wght@700&display=swap');

:root {
    --brand: #f59e0b;
    --brand-dark: #b45309;
    --bg: #050505;
    --danger: #ef4444;
}

body, html {
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    background-color: var(--bg);
    font-family: 'Inter', sans-serif;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

#gameCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

.ui-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(5,5,5,0.7) 0%, rgba(5,5,5,0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.4s ease, visibility 0.4s;
    pointer-events: auto;
    z-index: 20;
}

.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Glass Card */
.glass-card {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 32px;
    padding: 50px 60px;
    text-align: center;
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.9), 
                inset 0 1px 0 rgba(255,255,255,0.05);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 90%;
    max-width: 480px;
}

.screen:not(.hidden) .glass-card {
    transform: translateY(0) scale(1);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.2);
}

.icon-wrapper i {
    font-size: 36px;
    color: var(--danger);
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 1));
}

h2 {
    font-size: 32px;
    font-weight: 900;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #a1a1aa;
    font-size: 15px;
    margin-bottom: 32px;
}

.stats-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 36px;
}

.stat-box {
    display: flex;
    flex-direction: column;
}
.stat-box.divider {
    width: 1px;
    background: rgba(255,255,255,0.05);
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #71717a;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-value {
    font-family: 'Syncopate', sans-serif;
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
}
.stat-value.highlight {
    color: var(--brand);
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
    background: var(--brand);
    color: #000;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    gap: 12px;
    box-sizing: border-box;
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    background: #ffb833;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.35);
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    color: #a1a1aa;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
    text-decoration: none;
    gap: 12px;
    box-sizing: border-box;
}
.btn-secondary:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

.btn-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}
.btn-toggle:hover {
    background: rgba(255,255,255,0.05);
}
.toggle-indicator {
    color: var(--brand);
    font-weight: 800;
}

/* Base HUD */
.hud {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 5;
    pointer-events: none;
}

.hud-right {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.hud-icon-btn {
    pointer-events: auto;
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    cursor: pointer;
}
.hud-icon-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: scale(1.05);
}
.settings-btn-hud:hover {
    transform: rotate(90deg) scale(1.05);
}


.live-score {
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 16px 36px;
    border-radius: 24px;
    text-align: right;
    transition: transform 0.2s;
}
.live-score-val {
    font-family: 'Syncopate', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

@media (max-width: 640px) {
    .glass-card { padding: 40px 24px; border: none; background: rgba(10,10,10,0.95); box-shadow: none; border-radius: 24px; }
    h2 { font-size: 28px; }
    .stats-container { padding: 16px; margin-bottom: 24px; }
    .stat-value { font-size: 28px; }
    .hud { padding: 20px; }
    .live-score { padding: 12px 24px; }
    .live-score-val { font-size: 24px; }
    .icon-wrapper { width: 64px; height: 64px; margin-bottom: 20px; }
    .icon-wrapper i { font-size: 28px; }
}
