/* =====================
   SmartLearning Frontend
   ===================== */

:root {
    --sl-primary:   #1a56db;
    --sl-secondary: #0e4abf;
    --sl-accent:    #f59e0b;
    --sl-dark:      #111827;
    --sl-muted:     #6b7280;
    --sl-light:     #f9fafb;
    --sl-border:    #e5e7eb;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--sl-dark);
    background: #fff;
}

/* Navbar */
.sl-navbar {
    background: #fff;
    border-bottom: 1px solid var(--sl-border);
    padding: 0.75rem 0;
}
.sl-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--sl-primary);
}
.sl-navbar .nav-link {
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 1rem;
}
.sl-navbar .nav-link:hover,
.sl-navbar .nav-link.active {
    color: var(--sl-primary);
}

/* Hero */
.sl-hero {
    background: linear-gradient(135deg, #1a56db 0%, #0e4abf 100%);
    color: #fff;
    padding: 5rem 0 4rem;
}
.sl-hero h1 { font-size: 2.75rem; font-weight: 800; line-height: 1.2; }
.sl-hero p  { font-size: 1.15rem; opacity: 0.9; }

/* Section */
.sl-section        { padding: 4rem 0; }
.sl-section-title  { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.sl-section-sub    { color: var(--sl-muted); margin-bottom: 2.5rem; }

/* Cards */
.sl-card {
    border: 1px solid var(--sl-border);
    border-radius: 0.75rem;
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
}
.sl-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.sl-card .card-body { padding: 1.5rem; }

/* Level cards */
.sl-level-card {
    border-top: 4px solid var(--sl-primary);
    cursor: pointer;
}
.sl-level-card .level-icon {
    width: 56px; height: 56px;
    background: #eff6ff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--sl-primary);
    margin-bottom: 1rem;
}

/* Pricing */
.sl-price-card { border-radius: 1rem; }
.sl-price-card.featured {
    border: 2px solid var(--sl-primary);
    position: relative;
}
.sl-price-card.featured .badge-popular {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--sl-primary); color: #fff;
    padding: 0.25rem 1rem; border-radius: 99px; font-size: 0.78rem; font-weight: 600;
}
.sl-price-amount { font-size: 2.25rem; font-weight: 800; color: var(--sl-dark); }
.sl-price-period { color: var(--sl-muted); font-size: 0.9rem; }

/* Lesson viewer */
.sl-lesson-content { font-size: 1.05rem; line-height: 1.8; }
.sl-video-wrap {
    position: relative; padding-bottom: 56.25%;
    height: 0; overflow: hidden; border-radius: 0.75rem;
    background: #000;
}
.sl-video-wrap iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: 0;
}
.sl-video-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 10;
}

/* Comments */
.sl-comment { border-left: 3px solid var(--sl-border); padding-left: 1rem; margin-bottom: 1.25rem; }
.sl-comment.is-answer { border-left-color: #10b981; background: #f0fdf4; border-radius: 0 0.5rem 0.5rem 0; padding: 0.75rem 1rem; }

/* Lock overlay */
.sl-locked {
    position: relative; cursor: pointer;
}
.sl-locked-overlay {
    position: absolute; inset: 0;
    background: rgba(17,24,39,0.65);
    border-radius: 0.75rem;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: #fff; gap: 0.5rem;
}
.sl-locked-overlay i { font-size: 2rem; }

/* Footer */
.sl-footer {
    background: var(--sl-dark);
    color: #d1d5db;
    padding: 3rem 0 1.5rem;
}
.sl-footer h6     { color: #fff; font-weight: 600; margin-bottom: 1rem; }
.sl-footer a      { color: #9ca3af; text-decoration: none; }
.sl-footer a:hover { color: #fff; }
.sl-footer-bottom {
    border-top: 1px solid #1f2937;
    margin-top: 2rem; padding-top: 1.5rem;
    font-size: 0.875rem; color: #6b7280;
}

/* Buttons */
.btn-sl-primary {
    background: var(--sl-primary); color: #fff; border: none;
    padding: 0.6rem 1.5rem; border-radius: 0.5rem; font-weight: 600;
}
.btn-sl-primary:hover { background: var(--sl-secondary); color: #fff; }
.btn-sl-outline {
    background: transparent; color: var(--sl-primary);
    border: 2px solid var(--sl-primary);
    padding: 0.6rem 1.5rem; border-radius: 0.5rem; font-weight: 600;
}
.btn-sl-outline:hover { background: var(--sl-primary); color: #fff; }

/* Hero */
.sl-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #1a56db 0%, #0e4abf 100%);
    color: #fff;
    padding: 5rem 0 6rem;
}
.sl-hero::after {
    content: '';
    position: absolute; bottom: -2px; left: 0; right: 0;
    height: 70px;
    background: #fff;
    clip-path: ellipse(55% 100% at 50% 100%);
}
.sl-hero h1 { font-size: 2.75rem; font-weight: 800; line-height: 1.2; }
.sl-hero p  { font-size: 1.15rem; opacity: 0.9; }
.sl-hero-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: rgba(255,255,255,0.15); color: #fff;
    padding: 0.35rem 1rem; border-radius: 99px;
    font-size: 0.82rem; font-weight: 600;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255,255,255,0.25);
}
.sl-hero-search {
    display: flex;
    background: #fff;
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 500px;
}
.sl-hero-search input {
    border: none; outline: none;
    flex: 1; padding: 0.85rem 1.1rem;
    font-size: 0.95rem; color: var(--sl-dark);
    background: transparent;
}
.sl-hero-search button {
    background: var(--sl-accent); color: #fff;
    border: none; padding: 0.85rem 1.4rem;
    font-weight: 600; font-size: 0.9rem;
    cursor: pointer; white-space: nowrap;
}
.sl-hero-search button:hover { background: #e08c00; }
.sl-popular { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.sl-popular span { font-size: 0.82rem; opacity: 0.8; }
.sl-popular a {
    font-size: 0.8rem; color: rgba(255,255,255,0.9);
    text-decoration: underline; font-weight: 500;
}
.sl-popular a:hover { color: #fff; }
.sl-hero-stats {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(4px);
    display: inline-flex; gap: 2rem;
    margin-top: 2.5rem;
}
.sl-hero-stats .stat-value { font-size: 1.6rem; font-weight: 800; }
.sl-hero-stats .stat-label { font-size: 0.75rem; opacity: 0.85; }

/* Subject cards */
.sl-subject-card .sl-subject-header {
    height: 160px;
    border-radius: 0.75rem 0.75rem 0 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #fff;
    flex-shrink: 0;
}
.sl-subject-card .card-body { padding: 1.25rem; }
.sl-subject-card .subject-name { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.sl-subject-card .subject-meta { font-size: 0.78rem; color: var(--sl-muted); }

/* Filter tabs */
.sl-filter-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sl-filter-tab {
    padding: 0.4rem 1.1rem;
    border-radius: 99px;
    border: 1.5px solid var(--sl-border);
    background: #fff;
    color: var(--sl-muted);
    font-size: 0.85rem; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
}
.sl-filter-tab:hover, .sl-filter-tab.active {
    background: var(--sl-primary);
    border-color: var(--sl-primary);
    color: #fff;
}

/* Stats with icons */
.sl-stat-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Section label */
.sl-section-label {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--sl-primary); font-size: 0.82rem; font-weight: 600;
    margin-bottom: 0.5rem;
}
.sl-section-label::before { content: '+,'; font-weight: 800; }

/* How it works steps */
.sl-step-num {
    width: 48px; height: 48px;
    background: var(--sl-primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 800;
    margin: 0 auto 1rem;
    flex-shrink: 0;
}
.sl-step-connector {
    position: absolute; top: 24px;
    left: calc(50% + 32px); right: calc(-50% + 32px);
    height: 2px; background: #e5e7eb;
}

/* Level card accent colours */
.sl-level-card.ple  { border-top-color: #1a56db; }
.sl-level-card.uce  { border-top-color: #059669; }
.sl-level-card.uace { border-top-color: #d97706; }
.sl-level-card.ple  .level-icon { background: #eff6ff; color: #1a56db; }
.sl-level-card.uce  .level-icon { background: #ecfdf5; color: #059669; }
.sl-level-card.uace .level-icon { background: #fffbeb; color: #d97706; }

/* Feature icons */
.sl-feature-icon {
    width: 60px; height: 60px;
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

/* Hero mockup */
.sl-hero-mockup {
    position: relative;
    height: 340px;
}
.sl-mock-card {
    position: absolute;
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}
.sl-mock-main {
    width: 280px;
    top: 0; right: 20px;
}
.sl-mock-subjects {
    width: 200px;
    bottom: 20px; left: 0;
}
.sl-mock-badge {
    bottom: 30px; right: 0;
    display: flex; align-items: center;
    white-space: nowrap;
    padding: 0.75rem 1.25rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.sl-mock-play {
    width: 44px; height: 44px;
    background: var(--sl-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.85rem;
    flex-shrink: 0;
}
.sl-mock-label { font-size: 0.72rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }
.sl-mock-title { font-size: 0.9rem; font-weight: 700; color: #111827; }
.sl-mock-bar-wrap { background: #e5e7eb; border-radius: 99px; height: 6px; margin-top: 0.75rem; }
.sl-mock-bar     { background: var(--sl-primary); height: 6px; border-radius: 99px; }
.sl-mock-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sl-primary);
    flex-shrink: 0;
}

/* Font weight utilities */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }

@media (max-width: 768px) {
    .sl-hero h1 { font-size: 1.9rem; }
    .sl-hero    { padding: 3rem 0 2.5rem; }
}

/* ==================
   Auth Pages
   ================== */
.sl-auth-wrap {
    display: flex;
    min-height: 100vh;
}
.sl-auth-left {
    flex: 0 0 42%;
    background: linear-gradient(160deg, #1a56db 0%, #0e4abf 55%, #0a3a9e 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden;
}
.sl-auth-left::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}
.sl-auth-left::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}
.sl-auth-brand {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}
.sl-auth-brand:hover { color: rgba(255,255,255,0.9); text-decoration: none; }
.sl-auth-tagline {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}
.sl-auth-sub {
    opacity: 0.85;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}
.sl-auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}
.sl-auth-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    font-size: 0.9rem;
    opacity: 0.92;
}
.sl-auth-features .feat-icon {
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.sl-auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: #f8fafc;
}
.sl-auth-card {
    width: 100%;
    max-width: 440px;
}
.sl-auth-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}
.sl-auth-card .sl-auth-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}
.sl-form-group { margin-bottom: 1rem; }
.sl-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}
.sl-form-row-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}
.sl-form-row-label label { margin-bottom: 0; }
.sl-form-group input[type=text],
.sl-form-group input[type=email],
.sl-form-group input[type=password],
.sl-form-group input[type=tel] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #111827;
    outline: none;
}
.sl-form-group input:focus {
    border-color: var(--sl-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}
.sl-form-group input.is-invalid { border-color: #dc2626; }
.sl-field-error { color: #dc2626; font-size: 0.8rem; margin-top: 0.3rem; }
.sl-forgot {
    font-size: 0.8rem;
    color: var(--sl-primary);
    text-decoration: none;
    font-weight: 500;
}
.sl-forgot:hover { text-decoration: underline; color: var(--sl-primary); }
.sl-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.4rem;
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}
.sl-remember input[type=checkbox] {
    width: 15px; height: 15px;
    accent-color: var(--sl-primary);
    cursor: pointer;
    flex-shrink: 0;
}
.btn-sl-submit {
    width: 100%;
    padding: 0.8rem;
    background: var(--sl-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-sl-submit:hover { background: var(--sl-secondary); }
.sl-auth-divider { border: none; border-top: 1px solid #e5e7eb; margin: 1.5rem 0; }
.sl-auth-footer { text-align: center; font-size: 0.875rem; color: #6b7280; }
.sl-auth-footer a { color: var(--sl-primary); font-weight: 600; text-decoration: none; }
.sl-auth-footer a:hover { text-decoration: underline; }
.sl-auth-footer.muted a { color: #9ca3af; font-weight: 400; }
.sl-auth-alert {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.sl-auth-alert.error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.sl-auth-alert.info  { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.sl-mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--sl-primary);
    text-decoration: none;
}
.sl-mobile-brand:hover { color: var(--sl-secondary); text-decoration: none; }
@media (max-width: 768px) {
    .sl-auth-left  { display: none; }
    .sl-mobile-brand { display: block; }
    .sl-auth-right { align-items: flex-start; padding-top: 3rem; }
}
