:root {
    --primary: #6366f1;
    --secondary: #a855f7;
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
    --accent: #22c55e;
    --danger: #ef4444;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.screen {
    background: var(--card);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

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

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

input {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary);
}

button {
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

button:hover {
    background: #4f46e5;
    transform: scale(1.02);
}

button:active {
    transform: scale(0.98);
}

.btn-danger {
    background: var(--danger);
}

.divider {
    margin: 1rem 0;
    color: #64748b;
    position: relative;
}

.status-msg {
    color: #94a3b8;
    font-style: italic;
    margin-top: 1rem;
}

/* Game Interface */
.game-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #0f172a;
    border-radius: 1rem;
}

.game-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.target-container {
    background: #334155;
    padding: 1.5rem;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.target-pose {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    margin: 1rem 0;
    text-transform: uppercase;
}

.timer {
    font-size: 2rem;
    font-family: monospace;
    color: var(--secondary);
}

.visuals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.webcam-box {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    border: 4px solid var(--primary);
}

#webcam-container canvas, #pose-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#pose-canvas {
    pointer-events: none;
}

.prediction-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.score-board {
    background: #0f172a;
    padding: 1rem;
    border-radius: 1rem;
}

#scores {
    text-align: left;
}

.score-entry {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #334155;
}

#game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
