/* ══════════════════════════════════════════════════════════════════════
   PIXEL ACADEMY — Shared Design System
   Dark retro B&W theme · Inter font · Film grain
   ══════════════════════════════════════════════════════════════════════ */

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --text-white: #ffffff;
    --text-secondary: #d0d0d0;
    --text-tertiary: #888;
    --border: #222;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #22c55e;
    --accent-orange: #f59e0b;
    --accent-pink: #ec4899;
    --gradient-hero: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a {
    text-decoration: none;
    color: inherit;
}

/* ── Film Grain ──────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="none"/><rect width="1" height="1" fill="rgba(255,255,255,0.015)"/></svg>');
    pointer-events: none;
}

/* ── Top Nav (shared across all pages) ───────────── */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-brand svg {
    width: 28px;
    height: 28px;
}
.nav-brand-text {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}
.nav-brand-text span {
    color: var(--text-tertiary);
    font-weight: 400;
}
.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--text-white);
}
.nav-cta {
    padding: 10px 24px;
    background: var(--text-white);
    color: var(--bg-dark);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}
.nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nav-course-name {
    font-size: 0.78rem;
    font-weight: 700;
}
.nav-module-info {
    font-size: 0.62rem;
    color: var(--text-tertiary);
    font-weight: 600;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.nav-btn:hover {
    border-color: #444;
    color: var(--text-white);
}
.nav-btn.bookmarked {
    background: var(--text-white);
    color: var(--bg-dark);
    border-color: var(--text-white);
}
.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary {
    background: var(--text-white);
    color: var(--bg-dark);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}
.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--text-white);
}
.btn-sm {
    padding: 8px 18px;
    font-size: 0.78rem;
}
.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ── Cards ───────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}
.card:hover {
    border-color: #333;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ── Toast ───────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 10000;
}
.toast {
    background: var(--text-white);
    color: var(--bg-dark);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Department Colors ───────────────────────────── */
.dept-design {
    color: var(--accent-blue);
}
.dept-marketing {
    color: var(--accent-pink);
}
.dept-backend {
    color: var(--accent-green);
}
.dept-ai {
    color: var(--accent-purple);
}

/* ── Badges ──────────────────────────────────────── */
.badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border);
}
.badge-locked {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.badge-enrolled {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

/* ── Progress Bar ────────────────────────────────── */
.progress-bar {
    height: 4px;
    background: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--text-white);
    border-radius: 2px;
    transition: width 0.4s;
}

/* ── Footer ──────────────────────────────────────── */
.footer {
    padding: 40px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}
.footer a {
    color: var(--text-secondary);
    transition: color 0.2s;
}
.footer a:hover {
    color: var(--text-white);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .top-nav {
        padding: 0 16px;
    }
    .nav-links {
        gap: 20px;
    }
    .nav-center {
        display: none;
    }
}
@media (max-width: 480px) {
    .nav-links {
        display: none;
    }
}
