:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --accent: #22d3ee;
    --success: #4ade80;
    --danger: #f87171;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

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

h1 { margin-bottom: 1rem; font-size: 2.5rem; color: var(--accent); }
p { margin-bottom: 1.5rem; opacity: 0.8; }

.input-group { margin-bottom: 1.5rem; }
input {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
}

button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

button:hover { background: var(--primary-hover); transform: translateY(-1px); }
button:active { transform: translateY(0); }

.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.join-group {
    display: flex;
    gap: 0.5rem;
}

#status { margin-top: 1rem; font-size: 0.9rem; font-style: italic; }

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

.room-info { font-weight: bold; color: var(--accent); }
.timer { font-size: 1.5rem; font-weight: bold; color: var(--success); }

.game-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pose-target {
    background: #0f172a;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--primary);
}

.target-name {
    font-size: 1.8rem;
    font-weight: 900;
    margin-top: 0.5rem;
    color: var(--accent);
    text-transform: uppercase;
}

.scoreboard {
    background: #0f172a;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: left;
}

.scoreboard h3 { margin-bottom: 0.5rem; font-size: 1.1rem; color: var(--accent); }
#playerList { list-style: none; }
#playerList li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
}

.main-panel { position: relative; }
.canvas-wrapper {
    position: relative;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
    line-height: 0;
}

canvas {
    width: 100%;
    height: auto;
    max-width: 600px;
}

.feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 900;
    color: var(--success);
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    pointer-events: none;
    transition: all 0.3s;
    opacity: 0;
}

.feedback.show { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }

.controls { margin-top: 1.5rem; }

/* Overlay */
.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.overlay-content {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid var(--primary);
}

.overlay h2 { font-size: 2.5rem; color: var(--accent); margin-bottom: 1rem; }
.overlay p { font-size: 1.2rem; margin-bottom: 2rem; }

@media (max-width: 768px) {
    .game-layout { grid-template-columns: 1fr; }
    .container { padding: 1rem; }
}
