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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    margin-top: 5px;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

#video {
    width: 100%;
    display: block;
    transform: scaleX(-1); /* Mirror effect */
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
    pointer-events: none;
}

.status {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    transform: scale(1.05);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #333;
    color: white;
}

.features-display {
    background: #252542;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.features-display h3 {
    margin-bottom: 15px;
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.label {
    width: 70px;
    font-size: 0.85rem;
    color: #aaa;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: #1a1a2e;
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.1s ease-out;
}

.bar-container.symmetry {
    position: relative;
}

.bar-container.symmetry .bar {
    position: absolute;
    left: 50%;
    width: 0%;
    transform: translateX(0);
}

.value {
    width: 45px;
    text-align: right;
    font-family: monospace;
    font-size: 0.85rem;
    color: #667eea;
}

.connection-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
}

.ws-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ws-indicator.connected {
    background: #4ade80;
    box-shadow: 0 0 10px #4ade80;
}

.ws-indicator.disconnected {
    background: #ef4444;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #555;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}