:root {
    --bg-color: #0F1215;
    --primary-color: #636E72;
    --secondary-color: #B2BEC3;
    --accent-color: #00B894;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#app {
    width: 100%;
    max-width: 600px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 80%;
    max-width: 300px;
}

.btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: var(--accent-color);
    color: #000;
    font-weight: bold;
}

.btn.primary:hover {
    filter: brightness(1.1);
    background: var(--accent-color);
}

.score-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 400px;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.score {
    font-size: 1.5rem;
    font-weight: bold;
}

.turn-indicator {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-color);
    background: rgba(0, 184, 148, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.canvas-container {
    width: 90%;
    max-width: 400px;
    aspect-ratio: 1/1;
    background: var(--glass-bg);
    border-radius: 24px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

canvas {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    cursor: pointer;
}

#btn-back {
    margin-top: 1rem;
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
}

.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #1e2227; /* Slightly lighter than bg */
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 85%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

@media (max-width: 400px) {
    h1 { font-size: 2.5rem; }
    .score-board { padding: 0.8rem; }
    .score { font-size: 1.2rem; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
