:root {
    --bg-color: #0f0a0a;
    --accent-color: #ef4444;
    --accent-glow: rgba(239, 68, 68, 0.4);
    --secondary-color: #22c55e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(31, 10, 10, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --error-color: #f87171;
    --success-color: #4ade80;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(34, 197, 94, 0.1) 0%, transparent 40%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    z-index: 1;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.game-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    position: relative;
}

input[type="number"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Remove arrows from number input */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #dc2626 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

button:active {
    transform: translateY(0);
}

.feedback {
    min-height: 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.feedback.too-high { color: var(--error-color); }
.feedback.too-low { color: var(--secondary-color); }
.feedback.success { color: var(--success-color); font-size: 1.2rem; font-weight: 700; }

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.stat-item span {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pop {
    animation: pop 0.4s ease-out;
}

/* Responsive */
@media (max-width: 480px) {
    .glass-card {
        padding: 1.5rem;
    }
}
