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

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

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

h1 { color: var(--primary); margin-bottom: 2rem; }

.input-group {
    margin: 1rem 0;
    display: flex;
    gap: 10px;
    justify-content: center;
}

input {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 1rem;
}

button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
}

button:hover { opacity: 0.9; }

.btn-primary { background-color: var(--primary); color: white; }
.btn-secondary { background-color: var(--secondary); color: white; }
.btn-danger { background-color: var(--danger); color: white; }
.btn-info { background-color: #06b6d4; color: white; margin-top: 1rem; }

#camera-container {
    position: relative;
    margin: 2rem auto;
    width: 400px;
    height: 400px;
    background: #000;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary);
}

#webcam-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

#pose-overlay {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    padding: 5px;
}

#instruction {
    font-size: 2rem;
    color: var(--secondary);
    min-height: 3rem;
    margin: 1rem 0;
}

#scoreboard {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

#scores-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

#scores-list li {
    background: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

#history-container {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.8rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    border: 1px solid #334155;
    padding: 8px;
}
th { background: #334155; }

#timer-bar {
    width: 100%;
    height: 10px;
    background: #334155;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

#timer-progress {
    width: 0%;
    height: 100%;
    background: var(--secondary);
    transition: width 0.1s linear;
}
