@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --bg-background: #0A0A0A;
    --bg-card: #1A1A1A;
    --bg-card-hover: #202020;
    --border-color: #242424;
    --primary-red: #EA384C;
    --primary-red-glow: rgba(234, 56, 76, 0.5);
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-muted: #52525B;

    /* Spacing & Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Effects */
    --shadow-glow: 0 0 20px var(--primary-red-glow);
    --glass-bg: rgba(10, 10, 10, 0.8);
    --backdrop-blur: blur(12px);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-background);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.text-gradient {
    background: linear-gradient(to right, #fff, #A1A1AA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Login Page Styles */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #0a0a0a 70%);
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.brand-section {
    margin-bottom: 2rem;
}

.logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red), #991b1b);
    border-radius: var(--radius-md);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 8px 30px rgba(234, 56, 76, 0.3);
}

.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #121212;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(234, 56, 76, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--text-primary);
    color: black;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dashboard Styles */
.dashboard-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

/* Hero Section Responsive */
.dashboard-hero {
    margin-top: 70px;
    padding: 6rem 2rem;
    /* Increased padding for better spacing */
    background: linear-gradient(180deg, rgba(10, 10, 10, 1) 0%, rgba(20, 20, 20, 1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

/* Background Logo Graphic */
/* Background Logo Graphic */
.dashboard-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -100px;
    transform: translateY(-50%) rotate(15deg);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(234, 56, 76, 0.15) 0%, transparent 70%);
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 22L1 3H5L12 15L19 3H23L12 22Z" fill="%23EA384C" opacity="0.1"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 0;
    filter: blur(2px);
}

.hero-tag-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-tag {
    background-color: var(--primary-red);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(234, 56, 76, 0.4);
}

.hero-tag-text {
    color: #d1d5db;
    /* Lighter gray for better contrast */
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    font-weight: 500;
}

.hero-title-large {
    font-size: clamp(2.5rem, 6vw, 4rem);
    /* Increased base size for mobile impact */
    line-height: 1.05;
    font-weight: 800;
    /* Extra bold */
    letter-spacing: -0.03em;
    margin-bottom: 0.2rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-title-red {
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(234, 56, 76, 0.3);
}

.hero-desc {
    color: #a3a3a3;
    max-width: 650px;
    font-size: 1.125rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 0 1.25rem;
    }

    /* Hide email text on mobile to prevent overflow */
    .user-email {
        display: none;
    }

    .user-menu .user-avatar {
        font-size: 1rem;
        /* Restore font size for avatar icon */
    }

    .dashboard-hero {
        padding: 4rem 1.25rem;
        background: linear-gradient(180deg, rgba(10, 10, 10, 1) 0%, #171717 100%);
    }

    /* Adjust background logo position for mobile */
    .dashboard-hero::after {
        width: 300px;
        height: 300px;
        right: -50px;
        top: 30%;
        opacity: 0.6;
    }

    .hero-tag-container {
        flex-direction: row;
        /* Keep inline on mobile if space allows, or wrap nicely */
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-title-large {
        font-size: 2.25rem;
        /* Specific check for mobile size from screenshot */
    }

    .hero-desc {
        font-size: 1rem;
        margin-top: 1rem;
    }

    .section-title {
        padding-left: 1.25rem;
    }

    .courses-row {
        padding: 0.5rem 1.25rem 2rem 1.25rem;
        gap: 1rem;
        /* Reduced gap for mobile */
        scroll-padding-left: 1.25rem;
        /* Align snap to start padding */
    }

    .course-card {
        min-width: 75vw;
        /* Shows 75% of card, forcing a nice peek of the next one */
        max-width: 300px;
    }
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-left: 2rem;
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.01em;
}

.courses-row {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 2rem 2rem 2rem;
    gap: 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    /* Enable Scroll Snap */
    scroll-snap-type: x mandatory;
}

.courses-row::-webkit-scrollbar {
    display: none;
}

.course-card {
    min-width: 280px;
    /* Desktop default */
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* Snap alignment */
    scroll-snap-align: start;
}

.course-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-red);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 15px rgba(234, 56, 76, 0.3);
    z-index: 10;
}

.card-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #2a2a2a;
    position: relative;
    overflow: hidden;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.course-card:hover .card-thumbnail img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 10px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    /* More rectangular like screenshot */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.badge-video {
    left: 10px;
    background-color: var(--primary-red);
    /* Solid red per screenshot */
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.badge-continue {
    right: 10px;
    background-color: #3b82f6;
    /* Blue for 'Continue' */
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    display: none;
    /* Hidden by default */
}

.badge-completed {
    right: 10px;
    background-color: #10B981;
    /* Brighter green like reference */
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    /* Pill shape */
    text-transform: none;
    /* Title Case */
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
}

.card-content {
    padding: 1.25rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #f3f4f6;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

.section-header {
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
    cursor: pointer;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Adjustments for new elements */
@media (max-width: 768px) {
    .section-header {
        padding-left: 1.25rem;
        margin-top: 2rem;
    }
}

/* Video Modal */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.video-container {
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: black;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 50px rgba(234, 56, 76, 0.2);
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 10px;
    transition: all 0.2s;
    z-index: 1001;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}