
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #4f46e5;
    --secondary: #06b6d4;
    --bg-dark: #0f172a;
    --surface: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --accent: #22c55e;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.app-container {
    max-width: 1440px;
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

p.subtitle {
    color: #94a3b8;
    font-size: 1.1rem;
}

.main-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .main-content {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
    }

    .sidebar-info {
        height: 100%;
    }
}

.vision-card {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-width: 640px;
}

/* Removed old display-container */

#canvas {
    border-radius: 16px;
    max-width: 720px;
    width: 100%;
    height: auto;
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fps-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    font-family: monospace;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Removed old overlay positioning */

#gesture-image {
    width: 100%;
    max-width: 180px;
    height: auto;
    border-radius: 12px;
    filter: drop-shadow(0 0 30px rgba(79, 70, 229, 0.4));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none;
}

.gesture-preview-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
}

.sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.info-card {
    background: var(--surface);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
}

.info-card h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

#gesture-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 1rem;
}

.label-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.label-item .name {
    font-weight: 600;
    color: var(--text);
}

.label-item .prob {
    font-family: monospace;
    color: var(--accent);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.active-gesture {
    animation: pulse 2s infinite ease-in-out;
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

#quality-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

#quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

#quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--secondary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
}

#quality-value {
    min-width: 3rem;
    font-family: monospace;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    text-align: center;
}
