:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

#app {
    width: 100%;
    max-width: 1700px;
    padding: 20px;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
}

h1 { font-size: 3rem; margin-bottom: 0.5rem; letter-spacing: 2px; }
h2 { font-size: 1.5rem; color: #94a3b8; margin-bottom: 2rem; }

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 500px;
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 10px;
}

button.primary { background: var(--accent); color: white; }
button.primary:hover { background: var(--accent-hover); }
button.secondary { background: #475569; color: white; }
button.secondary:hover { background: #334155; }

.actions { display: flex; flex-direction: column; gap: 10px; }
.join-box { display: flex; gap: 10px; }
.join-box input { margin-bottom: 0; }

#player-list {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
}

#player-list li {
    padding: 10px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
}

.canvas-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.canvas-box h3 { margin-bottom: 10px; color: #cbd5e1; }
canvas {
    background: #ffffff;
    border-radius: 8px;
    cursor: crosshair;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    max-width: 100%;
    height: auto;
}

.game-header { display: flex; justify-content: space-between; width: 100%; max-width: 1620px; }
.game-footer { margin-top: 20px; width: 100%; max-width: 1620px; }
.live-scores { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 15px; }
.score-badge { background: var(--card-bg); padding: 10px 20px; border-radius: 20px; font-weight: bold; }

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

/* Visual Markers */
.marker { position: absolute; border: 3px solid var(--success); border-radius: 50%; pointer-events: none; }