:root {
    --primary-color: #5d5dff; /* A purple/blue for accents */
    --secondary-color: #727272; /* Lighter text color */
    --background-dark: #121212;
    --card-dark: #1e1e1e;
    --text-light: #f1f1f1;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --youtube-red: #ff0000;
    --glow-color: #9900ff; /* Neon glow color */
}

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

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-light);
    line-height: 1.6;
    transition: background-color 0.3s;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #8a8aff;
}

/* --- Keyframe Animations --- */
@keyframes neon-pulse {
    0% { box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color); }
    50% { box-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color); }
    100% { box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color); }
}

@keyframes lightning-border {
    0% { border-color: var(--border-color); }
    10% { border-color: #f6ff00; }
    15% { border-color: var(--border-color); }
    25% { border-color: #00ffff; }
    30% { border-color: var(--border-color); }
    100% { border-color: var(--border-color); }
}

/* --- Header & Navigation (Desktop/Base) --- */
.main-header {
    background-color: var(--card-dark);
    padding: 10px 0;
    border-bottom: 2px solid var(--border-color);
    animation: lightning-border 10s infinite;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-light);
    text-shadow: 0 0 5px rgba(153, 0, 255, 0.5);
    margin-right: 10px; 
}

/* Navigation Animation (Desktop) */
.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: nowrap; 
}

.main-nav li {
    margin-right: 20px;
}

.main-nav a {
    color: var(--text-muted);
    padding: 5px 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: -100%;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00ffff, #9933ff, #ff00ff);
    transition: left 0.4s ease;
}

.main-nav a:hover::after {
    left: 0;
}

@keyframes navTextGlow {
    0%, 100% { text-shadow: 0 0 8px #9933ff, 0 0 16px #00ffff; }
    50% { text-shadow: 0 0 16px #00ffff, 0 0 32px #ff00ff; }
}

.main-nav a:hover {
    color: var(--text-light);
    animation: navTextGlow 1.5s ease-in-out infinite;
}

.main-nav a.active {
    color: var(--text-light);
    border-bottom: 2px solid var(--primary-color);
}

/* Login Button (Desktop/Base) */
.login-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.login-btn:hover {
    box-shadow: 0 0 8px var(--glow-color);
    transform: translateY(-2px);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    padding: 15px 0;
    font-size: 0.9em;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
    margin-right: 5px;
}

/* --- Course Layout (Desktop Grid) --- */
.course-page {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding-bottom: 50px;
}

.course-main-content h1 {
    font-size: 2.2em;
    margin-bottom: 20px;
}

/* --- Hero Section --- */
.hero-section {
    margin-bottom: 30px;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 350px; 
    background: linear-gradient(to right, #2c004d, #001f3f);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background-image: url('placeholder-instructor.jpg');
    background-size: cover;
    background-position: center;
    border: 3px solid transparent;
    animation: neon-pulse 3s infinite alternate;
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    font-weight: 900;
    background-image: linear-gradient(45deg, #ff00ff, #00ffff);
    /* -webkit-background-clip: text; */
    -webkit-text-fill-color: transparent;
    animation: floatGlow 4s ease-in-out infinite;
    text-align: center;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        text-shadow: 0 0 15px rgba(153, 0, 255, 0.6);
    }
    50% {
        transform: translate(-50%, -55%) scale(1.05);
        text-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
    }
}

.course-description {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.course-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-muted);
    flex-wrap: wrap; 
}

.course-meta .badge {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* --- Login Prompt --- */
.login-prompt {
    background-color: var(--card-dark);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
}

.login-prompt:hover {
    box-shadow: 0 0 10px rgba(93, 93, 255, 0.2);
}

.login-prompt i {
    font-size: 1.5em;
    color: var(--primary-color);
    flex-shrink: 0;
}

.login-prompt span {
    font-weight: bold;
    flex-grow: 1;
}

.login-prompt p {
    color: var(--text-muted);
    font-size: 0.9em;
}

.sign-in-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sign-in-btn:hover {
    background-color: #8a8aff;
    transform: scale(1.05);
}

/* --- Course Content --- */
.course-content-section h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.content-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: var(--card-dark);
    transition: all 0.2s;
}

.content-item:hover {
    background-color: #2a2a2a;
}

.content-toggle {
    display: none;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
}

.content-header span:first-child {
    flex-grow: 1;
}

.content-header span:last-child {
    font-weight: normal;
    color: var(--text-muted);
    font-size: 0.9em;
    margin-left: auto;
    margin-right: 15px;
}

.content-header i {
    transition: transform 0.2s;
}

/* --- Sidebar --- */
.sidebar-block {
    background-color: var(--card-dark);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sidebar-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.sidebar-block h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

/* --- Authentic Text Styling --- */
h1, h2, h3 {
    font-family: "Poppins", "Segoe UI", sans-serif; 
    letter-spacing: 0.5px;
}

h1 {
    font-weight: 800;
    text-transform: uppercase;
    color: #eaeaff;
    text-shadow: 0 0 8px rgba(153, 0, 255, 0.4);
}

h2 {
    font-weight: 600;
    color: #dcdcff;
}

p {
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #9933ff, #00ffff);
    animation: underlineExpand 2s ease-in-out infinite alternate;
}

@keyframes underlineExpand {
    from { width: 20%; }
    to { width: 100%; }
}

/* --- Bounce Animation --- */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-2px);}
}

/* --- Sidebar Actions --- */
.course-actions {
    text-align: center;
    padding: 30px 20px;
}

.price-label {
    color: var(--text-muted);
    margin-bottom: 5px;
}

.price-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 15px;
}

.start-learning-btn {
    width: 100%; 
    background: linear-gradient(90deg, #9933ff, #6600cc);
    color: white;
    border: none;
    padding: 20px 30px; 
    border-radius: 6px;
    font-size: 1.3em; 
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.start-learning-btn:hover {
    background: linear-gradient(90deg, #cc66ff, #9933ff);
    box-shadow: 0 0 15px var(--glow-color);
    transform: scale(1.02);
}

.watch-on-youtube-btn {
    width: 100%;
    background-color: var(--card-dark);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 10px 0;
    border-radius: 6px;
    font-size: 1em;
    display: block; 
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.watch-on-youtube-btn:hover {
    border-color: black;
    color: var(--youtube-red);
}

.watch-on-youtube-btn i {
    color: var(--youtube-red);
    margin-right: 5px;
}

/* ======================================= */
/* 💻 RESPONSIVENESS: TABLETS (Max-width 1024px) 📱 */
/* ======================================= */

@media (max-width: 1024px) {
    /* Adjust main layout for tablets: sidebar moves to the top */
    .course-page {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
        padding-bottom: 30px;
    }
    
    /* Move sidebar to the top visually */
    .course-main-content {
        order: 1;
    }
    .sidebar-block {
        order: 0;
    }

    /* Reduce header spacing */
    .main-header .container {
        padding: 0 10px; 
    }
    
    /* Reduce large font sizes */
    .course-main-content h1 {
        font-size: 2em;
    }

    .video-thumbnail {
        height: 300px;
    }
    .overlay-text {
        font-size: 2.5em;
    }
}

/* ======================================= */
/* 📱 RESPONSIVENESS: MOBILE (Max-width 768px) 📱 */
/* ======================================= */

@media (max-width: 768px) {
    
    /* FIX: Force .main-header to full viewport width */
    .main-header {
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        width: 100vw;
        padding: 10px 0; /* Adjust vertical padding */
    }

    /* FIX: Ensure the inner container respects the full width of the header */
    .main-header .container {
        width: 100%;
        padding: 0 10px; /* Re-add a small side padding for content spacing */
        
        flex-direction: row; 
        justify-content: flex-start;
        align-items: center;
    }
    
    .logo {
        margin-bottom: 0;
        flex-grow: 1; 
        text-align: center; 
    }

    /* CRITICAL FIX: Hide the entire navigation menu */
    .main-nav {
        display: none; 
    }
    
    /* CRITICAL FIX: Hide the Login button */
    .login-btn {
        display: none;
    }

    .container {
        width: 95%; /* Keep main content container slightly padded */
    }

    /* FIX: Center the DSA Course text (H1) */
    .course-main-content h1 {
        font-size: 1.8em;
        text-align: center; 
    }
    
    /* CRITICAL FIX: Ensure Hero section (image/video) is displayed first */
    .hero-section {
        order: -1; 
    }
    .sidebar-block {
        order: 1; 
    }
    .course-main-content {
        order: 0; 
    }
    
    /* Reduce section padding */
    .course-page {
        padding-bottom: 20px;
    }

    /* Content and button size reduction */
    .video-thumbnail {
        height: 250px;
    }
    .overlay-text {
        font-size: 2em;
    }
    .start-learning-btn {
        padding: 15px 20px;
        font-size: 1.1em;
    }

    /* Adjust Login Prompt for smaller screens */
    .login-prompt {
        flex-wrap: wrap; 
        padding: 15px;
        text-align: center;
        display: block;
    }
    .login-prompt i {
        display: none; 
    }
    .login-prompt span, .login-prompt p {
        display: block;
        margin-bottom: 10px;
    }
    .sign-in-btn {
        width: 100%;
    }

    /* Sidebar text adjustment */
    .price-value {
        font-size: 2em;
    }
}

/* ======================================= */
/* 📱 RESPONSIVENESS: SMALL MOBILE (Max-width 480px) 📱 */
/* ======================================= */

@media (max-width: 480px) {
    
    /* Adjust internal padding for a tighter fit on small devices */
    .main-header .container {
        padding: 0 5px;
    }
    
    .course-main-content h1 {
        font-size: 1.5em;
    }
    
    .video-thumbnail {
        height: 200px;
    }
    .overlay-text {
        font-size: 1.5em;
    }

    /* Make content items slightly smaller */
    .content-header {
        padding: 12px;
        font-size: 0.95em;
    }
}