:root {
    --bg-color: #0f172a; /* Slate 900 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-1: #06b6d4; /* Cyan */
    --accent-2: #3b82f6; /* Blue */
    --accent-3: #8b5cf6; /* Purple */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background effects */
body::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--accent-3) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(80px);
    z-index: -1;
}

body::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 20%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(80px);
    z-index: -1;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.container {
    width: 90%;
    max-width: 800px;
    padding: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-box .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-box .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-1);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.game-area {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.glow-btn {
    position: relative;
    padding: 2rem 4rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.2);
    border-color: rgba(255,255,255,0.3);
}

.glow-btn:hover::before {
    opacity: 0.1;
}

.glow-btn:active {
    transform: translateY(4px) scale(0.96);
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.1);
}

.btn-text {
    position: relative;
    z-index: 2;
    letter-spacing: 2px;
    pointer-events: none;
}

.glow-btn.small {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

.glow-btn.playing {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(255,255,255,0.2);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    padding: 4rem;
    text-align: center;
    transform: translateY(0) scale(1);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.hidden .modal-content {
    transform: translateY(20px) scale(0.9);
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-1);
    text-shadow: 0 0 15px rgba(6,182,212,0.4);
}

.final-stats {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.final-stats span {
    font-weight: 700;
    color: var(--accent-3);
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.4s linear;
    pointer-events: none;
    z-index: 2;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
