@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --primary-mid: #bfdbfe;
    --accent: #f59e0b;
    --bg: #f8faff;
    --surface: #ffffff;
    --surface2: #f1f5fd;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-focus: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(37,99,235,0.08), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(37,99,235,0.12), 0 4px 12px rgba(0,0,0,0.08);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── NAVBAR ── */
.navbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-brand::before {
    content: '📚';
    font-size: 22px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ── HERO ── */
.hero-section {
    background: linear-gradient(135deg, #eff6ff 0%, #f8faff 50%, #fef3c7 100%);
    padding: 70px 40px 60px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -80px; left: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -60px;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #1e40af, #2563eb, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ── MAIN ── */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 40px;
}

/* ── GRID ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ── CARDS ── */
.premium-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: fadeUp 0.4s ease both;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-mid);
}

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

.tag {
    display: inline-flex;
    align-items: center;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-mid);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    width: max-content;
}

.card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text);
}

.card-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* ── BUTTONS ── */
.modern-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
    width: 100%;
}

.modern-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

.modern-btn.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary-mid);
    box-shadow: none;
}

.modern-btn.btn-outline:hover {
    background: var(--primary-light);
    box-shadow: none;
    transform: none;
}

.modern-btn.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}

.modern-btn.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 8px rgba(239,68,68,0.25);
}

/* ── FORMS ── */
.form-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.4s ease both;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.modern-input, select.modern-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.modern-input:focus, select.modern-input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.modern-input::placeholder { color: var(--text-light); }

/* ── AUTH PAGES ── */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #eff6ff 0%, #f8faff 60%, #fef3c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: fadeUp 0.5s ease both;
}

.auth-logo {
    text-align: center;
    margin-bottom: 8px;
    font-size: 40px;
}

.auth-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── ALERT / FLASH ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--success);
}

/* ── ADMIN ── */
.admin-header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 32px 40px;
    color: white;
}

.admin-header h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.admin-header p { color: #94a3b8; font-size: 14px; }

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── TABLE ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.data-table thead {
    background: var(--surface2);
}

.data-table th {
    padding: 13px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--primary-light); }

/* ── COURSE PAGE ── */
.course-header {
    background: linear-gradient(135deg, #eff6ff, #f8faff);
    border-bottom: 1px solid var(--border);
    padding: 40px;
}

.course-header h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text);
    margin-bottom: 8px;
}

.material-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    animation: fadeUp 0.4s ease both;
}

.material-card:hover {
    border-color: var(--primary-mid);
    box-shadow: var(--shadow);
}

.material-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.video-container video {
    width: 100%;
    border-radius: var(--radius-sm);
    background: #000;
}

/* ── PRICE BOX ── */
.price-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 16px;
}

.price-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.price-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
}

/* ── CHECKBOX ── */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ── BACK LINK ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover { color: var(--primary); }

/* ── DIVIDER ── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 32px 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .hero-section { padding: 50px 20px 40px; }
    .hero-section h1 { font-size: 28px; }
    .main-content, .admin-content { padding: 30px 20px; }
    .admin-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 32px 24px; }
    .course-header { padding: 24px 20px; }
}
