:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --glass-bg: rgba(22, 27, 34, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #58a6ff;
    --primary-hover: #1f6feb;
    --secondary-color: #238636;
    --secondary-hover: #2ea043;
    --gradient: linear-gradient(135deg, #1f6feb, #8957e5);
}

body.dark-theme {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.background-glass {
    position: fixed;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(137,87,229,0.15) 0%, transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(88,166,255,0.15) 0%, transparent 40%);
    z-index: -1;
}

.container {
    max-width: 800px;
    width: 100%;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

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

header h1 {
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    color: transparent;
    margin: 0;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn.primary {
    background: var(--primary-color);
    color: #fff;
}
.btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn.secondary {
    background: var(--secondary-color);
    color: #fff;
}
.btn.secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.inline-form {
    display: flex;
    gap: 1rem;
}

.flex-grow {
    flex-grow: 1;
    margin-bottom: 0;
}

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

.video-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0;
}

.video-card h3 {
    margin: 0;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-container {
    font-size: 0.9rem;
}

.status.downloading { color: #f2cc60; }
.status.ready { color: var(--secondary-color); }
.status.failed { color: #f85149; }

.skeleton {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
