:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --success: #10b981;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    touch-action: none;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.container {
    width: 100%;
    max-width: 440px;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    padding: 20px;
    text-align: center;
}

h1, h2 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.5rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.warning {
    color: #f59e0b;
    font-weight: 600;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-bottom: 10px;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn:active {
    transform: scale(0.98);
}

.btn-share {
    background-color: #1877f2;
}

.btn-share:hover {
    background-color: #166fe5;
}

.btn-secondary {
    background-color: #334155;
}

.btn-secondary:hover {
    background-color: #475569;
}

.screen {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

canvas {
    background-color: #090d16;
    border-radius: 12px;
    border: 2px solid #334155;
    display: block;
    margin: 0 auto 15px auto;
    cursor: pointer;
    max-width: 100%;
    height: auto;
}

.hud {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
    padding: 0 5px;
}

.status-alert {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-error {
    color: var(--error);
}

.result-comment {
    margin-bottom: 20px;
    font-weight: 600;
    color: #f59e0b;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--success);
    margin: 10px 0;
}
