@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Premium Palette: Obsidian & Golden Sun */
    --primary-blue: #001a35;
    --primary-dark: #000d1a;
    --accent-orange: #ff9d00;
    --accent-gold: #ffbe0b;
    --accent-gradient: linear-gradient(135deg, #ff9d00 0%, #ff6b00 100%);
    --accent-glow: 0 0 20px rgba(255, 157, 0, 0.4);

    /* Surface Colors */
    --white: #ffffff;
    --bg-main: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 31, 0.08);

    /* Text & Content */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-on-dark: #f8fafc;

    /* Functional Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Spacing & Radius */
    --radius-xs: 6px;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-full: 9999px;

    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Landing Page Specifics */
    --header-height: 90px;
    --section-spacing: 8rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', 'Outfit', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Refinement */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-blue);
}

p {
    margin-bottom: 1rem;
}

/* Premium Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive table {
    min-width: 600px;
}

/* Navigation Overhaul */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 65px;
    width: auto;
    object-fit: contain;
}

/* Branding Visibility for logo text (if used) */
.logo span:first-child {
    color: var(--white);
}

.logo span:last-child {
    color: var(--accent-orange);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: var(--transition-fast);
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Buttons & Interactions */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 26, 53, 0.2);
}

.btn-accent {
    background: var(--accent-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 107, 0, 0.4);
}

.btn-white {
    background: var(--white);
    color: var(--primary-blue);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    background: var(--bg-main);
    transform: translateY(-2px);
}

/* Auth Pages Overhaul */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    position: relative;
    padding: 2rem;
    overflow-y: auto;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(255, 157, 0, 0.15) 0%, transparent 60%);
    top: -25%;
    left: -25%;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--white);
    padding: 2rem 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    animation: authFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 1.5rem 0;
}

.auth-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--text-muted);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition-fast);
    z-index: 10;
}

.auth-close svg {
    width: 18px;
    height: 18px;
}

.auth-close:hover {
    background: var(--accent-orange);
    color: var(--white);
    transform: rotate(90deg);
}

.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 5;
    border-radius: 50%;
}

.password-toggle:hover {
    color: var(--accent-orange);
    background: rgba(255, 157, 0, 0.05);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Modern Outlined Inputs */
.modern-form-group {
    position: relative;
    margin-bottom: 2rem;
}

.modern-form-group label {
    position: absolute;
    top: -10px;
    left: 12px;
    background: var(--white);
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 10;
    transition: var(--transition-fast);
    pointer-events: none;
}

.modern-form-group .form-control {
    background: transparent !important;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.875rem 1rem;
}

.modern-form-group .form-control:focus {
    border-color: var(--accent-orange);
    box-shadow: none;
}

.modern-form-group .form-control:focus+label {
    color: var(--accent-orange);
}

.modern-form-group .password-toggle {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-xs);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-orange);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255, 157, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Hero Section Refinement */
.hero {
    padding: 12rem 0 10rem;
    background: radial-gradient(circle at 70% 30%, rgba(255, 157, 0, 0.05) 0%, transparent 50%), var(--white);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-image-wrap {
    position: relative;
}

.hero-image-wrap img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 100px -20px rgba(0, 26, 53, 0.15);
}

/* Landing Section General */
.landing-section {
    padding: var(--section-spacing) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
    text-align: center;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 31, 0.08);
    border-color: var(--accent-orange);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 157, 0, 0.1);
    color: var(--accent-orange);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* Testimonial Section */
.testimonial-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 31, 0.05);
    margin-bottom: 2rem;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #cbd5e1;
    overflow: hidden;
}

/* Dashboard & Cards */
.dashboard-header {
    background: var(--white);
    padding: 5rem 0 4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.platform-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 31, 0.12);
}

.course-thumb-box {
    position: relative;
    aspect-ratio: 16/9;
}

.course-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.course-card:hover .course-thumb-box img {
    transform: scale(1.1);
}

/* Video Player Shell Overhaul */
.player-shell {
    display: flex;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    min-height: 700px;
}

.video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.playlist-section {
    width: 400px;
    background: #0a0a0a;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

/* Tables & Admin */
table {
    width: 100%;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid #f1f5f9;
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

tr:hover td {
    background: #f8fafc;
}

/* Responsive Cleanup */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .player-shell {
        flex-direction: column;
    }

    .playlist-section {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .platform-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .auth-page {
        padding: 1rem;
        align-items: flex-start;
        overflow-y: auto;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .logo {
        font-size: 1.25rem !important;
    }

    .logo img {
        height: 40px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .management-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .auth-page {
        padding: 0.75rem;
        align-items: flex-start;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .logo img {
        height: 35px;
    }

    .stats-grid .course-card {
        padding: 1.5rem !important;
    }

    .stats-grid h2 {
        font-size: 2rem !important;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Dashboard Specific Classes */
.stats-card {
    padding: 2.5rem;
    text-align: center;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.stats-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.stats-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 800;
}

.stats-value {
    font-size: 2.5rem;
    margin-top: 0.5rem;
    font-weight: 800;
}

.management-link {
    padding: 2.5rem;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.management-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Overrides for Dashboard Classes */
@media (max-width: 640px) {
    .stats-card {
        padding: 1.5rem;
    }

    .stats-value {
        font-size: 2rem;
    }

    .management-link {
        padding: 1.5rem;
    }

    .dashboard-header h1 {
        font-size: 1.75rem !important;
    }
}

.health-card {
    padding: 2.5rem;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dashboard-header-title {
    font-size: 3rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .health-card {
        padding: 1.5rem;
    }

    .dashboard-header-title {
        font-size: 2rem !important;
    }
}