/* Premium Design - Dark Mode & Glassmorphism */
:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #8b5cf6; /* Violet */
    --secondary: #06b6d4; /* Cyan */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(
            at 0% 0%,
            rgba(139, 92, 246, 0.15) 0px,
            transparent 50%
        ),
        radial-gradient(
            at 100% 0%,
            rgba(6, 182, 212, 0.15) 0px,
            transparent 50%
        ),
        radial-gradient(
            at 100% 100%,
            rgba(139, 92, 246, 0.15) 0px,
            transparent 50%
        ),
        radial-gradient(
            at 0% 100%,
            rgba(6, 182, 212, 0.15) 0px,
            transparent 50%
        );
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-top: 0;
}

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 1rem 0;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.glass-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Video Elements */
video {
    width: 100%;
    border-radius: 0.75rem;
    background: #000;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.video-item {
    overflow: hidden;
}

.video-info {
    margin-top: 1rem;
}

.video-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Recorder Specific */
.recorder-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.recording-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #ef4444;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.timer {
    font-variant-numeric: tabular-nums;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--secondary);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Status Messages */
.status-success {
    color: #4ade80;
}
.status-error {
    color: #f87171;
}
.status-message {
    margin-top: 1rem;
    min-height: 1.5rem;
    font-weight: 500;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .gallery-header span {
        font-size: 0.875rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .header nav {
        display: flex;
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .header h1 {
        margin-bottom: 0.5rem;
        font-size: 2rem;
    }

    /* Adjust Grid for Mobile */
    .video-grid {
        grid-template-columns: 1fr; /* Full width on mobile */
        gap: 1.5rem;
    }

    /* Stack controls vertically if needed, or just allow wrapping */
    .controls {
        flex-wrap: wrap;
    }

    .btn {
        width: 100%; /* Full width buttons on mobile for easier tapping */
        justify-content: center;
    }

    .header nav .btn {
        width: auto; /* Keep nav buttons auto width */
        flex: 1; /* But let them grow to fill space */
    }

    .glass-card {
        padding: 1.5rem; /* Slightly less padding */
    }
}
