:root {
    --bg-base: #f8fafc;
    --bg-card: #ffffff;
    --bg-secondary: #f1f5f9;
    --accent: #006838;
    --accent-dark: #004d2a;
    --danger: #ef4444;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
}

.dark {
    --bg-base: #0a0f14;
    --bg-card: #111820;
    --bg-secondary: #162030;
    --accent: #00a651;
    --accent-dark: #006838;
    --danger: #ef4444;
    --text-primary: #f0f4f8;
    --text-secondary: #8a9cb0;
    --text-muted: #4a5568;
    --border-color: #1e2d3d;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
}

/* Custom Utilities to map to variables */
.bg-bg-base { background-color: var(--bg-base); }
.bg-bg-card { background-color: var(--bg-card); }
.bg-bg-secondary { background-color: var(--bg-secondary); }
.text-text-primary { color: var(--text-primary); }
.text-text-secondary { color: var(--text-secondary); }
.text-text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.border-border-color { border-color: var(--border-color); }
.bg-accent { background-color: var(--accent); }
.bg-danger { background-color: var(--danger); }

/* Gradient Green */
.bg-gradient-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

.text-gradient-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Glassmorphism */
.glass {
    background: rgba(17, 24, 32, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Utilities */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.text-shadow-accent {
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

/* ── PASSWORD MODAL ─────────────────────────────────────────────────────────── */
.password-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.password-modal.active { display: flex; }
.password-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 28px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn .3s ease;
}
@keyframes modalSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ── ADMIN PANEL ─────────────────────────────────────────────────────────────── */
.admin-panel {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 200;
    overflow: hidden;
    box-shadow: -8px 0 32px rgba(0,0,0,.6);
    animation: slideInRight .3s ease;
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.admin-panel.active { display: flex; flex-direction: column; }

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-shrink: 0;
}
.admin-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 24px;
}
.admin-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}
.admin-label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 12px;
    margin-bottom: 6px;
}
.admin-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: .88rem;
    outline: none;
}
.admin-input:focus { border-color: var(--accent); }

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: var(--bg-base);
    border: none;
    border-radius: 0.75rem;
    padding: 10px 16px;
    font-weight: 700;
    font-size: .88rem;
    transition: all 0.2s;
}
.admin-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

.admin-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.admin-btn-secondary:hover { border-color: var(--accent); }

.switch {
    width: 52px; height: 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}
.switch.active { background: var(--accent); border-color: var(--accent); }
.switch-knob {
    width: 22px; height: 22px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px; left: 2px;
    transition: transform 0.2s;
}
.switch.active .switch-knob { transform: translateX(24px); }

/* Responsive adjustments */
@media (max-width: 640px) {
    .aspect-video {
        aspect-ratio: 16/10;
    }
}
