* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

body {
    background-color: #0a0a0c;
    color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    overflow-x: hidden;
}

/* Fancy background glow */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(
            circle at 20% 30%,
            rgba(37, 99, 235, 0.15) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(16, 185, 129, 0.1) 0%,
            transparent 40%
        );
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 550px;
    padding: 2.5rem;
    background: rgba(23, 23, 27, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

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

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.compact-header h1 {
    margin-bottom: 0;
    font-size: 1.4rem;
    flex: 1;
    text-align: left;
}

.compact-header #sample-counter {
    white-space: nowrap;
    font-size: 0.8rem;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 24px;
    margin-bottom: 2.5rem;
    transition: transform 0.3s ease;
}

.video-card h2 {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 1.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.video-container {
    width: 100%;
    background-color: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16 / 9;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

#video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.btn.download {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.btn.download:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn {
    width: 56px;
    height: 56px;
    padding: 0;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn i {
    width: 24px;
    height: 24px;
    color: white;
}

.btn:active {
    transform: scale(0.92);
}

.btn-record {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-record:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-record.recording {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.7);
    }
    100% {
        transform: scale(1);
    }
}

.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.secondary.playing {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.results-panel {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.main-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.label {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.score-display {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    color: #ef4444;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #10b981, #34d399);
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.detailed-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.value {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
}

.progress-bar.small {
    height: 6px;
}

.progress-fill.small {
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
        border-radius: 24px;
        max-width: 95%;
    }

    .compact-header {
        margin-bottom: 1rem;
    }

    .compact-header h1 {
        font-size: 1.2rem;
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .video-card h2 {
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
    }

    .controls {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .btn {
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    .results-panel {
        margin-bottom: 1rem;
        gap: 1rem;
    }

    .main-score-container {
        gap: 0.25rem;
    }

    .score-display {
        font-size: 3rem;
    }

    .detailed-scores {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .next {
        margin-top: 0;
        padding: 0.8rem;
    }
}
