/* Landing Page Specific Styles */
:root {
    --landing-bg: #0f0f13;
    --landing-card: #1a1a24;
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #ff7675;
    --text-primary: #ffffff;
    --text-secondary: #b2bec3;
    --border-color: #2d3436;
}

body.landing-page {
    background-color: var(--landing-bg);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global Reset */
* {
    box-sizing: border-box;
}

/* Tech Grid Background */
body.landing-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark radial gradient + Tech Grid */
    background:
        radial-gradient(circle at 100% 50%, transparent 20%, rgba(15, 15, 19, 0.95) 100%),
        linear-gradient(rgba(108, 92, 231, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 92, 231, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* Use left/right: 0 instead of width: 100% to respect padding */
    z-index: 1000;
    background: rgba(15, 15, 19, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 30px;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links {
    display: flex;
    align-items: center;
    /* Fix vertical alignment */
}

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

.btn-cta-nav {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color) !important;
    padding: 8px 20px;
    border-radius: 5px;
    transition: all 0.3s ease !important;
    margin-left: 20px !important;
    /* Proper spacing from login link */
}

/* Old background removed */

/* Hero Section */
.hero-section {
    min-height: 100vh;
    /* Changed from fixed 100vh to fit content better */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 100px 20px 50px 20px;
    /* Added top padding for fixed nav */
    padding: 100px 20px 100px 20px;
    /* Equalized top/bottom padding for perfect center */
    background: radial-gradient(circle at center, #1e1e2f 0%, #0f0f13 100%);
}


.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: rgba(108, 92, 231, 0.15);
    color: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.hero-logo {
    display: block;
    margin: 0 auto 20px auto;
    /* Force horizontal centering */
    max-width: 150px;
    /* Optional constraint */
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-primary-lg {
    background: var(--primary-color);
    color: white;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
}

.btn-secondary-lg {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary-lg:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Features Grid */
.features-section {
    padding: 100px 50px;
    background: #13131a;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--landing-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
.landing-footer {
    padding: 40px 50px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}




/* Curriculum Section */
.curriculum-section {
    padding: 100px 50px;
    background: #13131a;
}

.curriculum-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.module-card {
    background: var(--landing-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.module-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.module-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.module-tag {
    display: inline-block;
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(108, 92, 231, 0.4);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.module-card h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.module-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.module-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Collapsible Modules */
.module-content {
    max-height: 1000px;
    transition: max-height 0.5s ease-out, opacity 0.5s ease;
    overflow: hidden;
    opacity: 1;
}

.module-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.btn-show-more {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 15px;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-show-more:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-show-more i {
    transition: transform 0.3s ease;
}

.btn-show-more.active i {
    transform: rotate(180deg);
}

/* Background Shapes (Now scoped to Hero) */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Above shapes, below content */
    pointer-events: none;
}

.shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    /* Increased opacity slightly */
    border-radius: 50%;
    animation: floatShape 20s infinite alternate ease-in-out;
}

.shape-1 {
    top: -15%;
    /* Adjusted for better visibility */
    left: -10%;
    width: 800px;
    /* Increased from 600px */
    height: 800px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    animation-delay: 0s;
}

.shape-2 {
    bottom: -15%;
    right: -10%;
    width: 700px;
    /* Increased from 500px */
    height: 700px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    animation-delay: -5s;
}

.shape-3 {
    top: 50%;
    left: 50%;
    margin-top: -250px;
    margin-left: -250px;
    width: 500px;
    /* Increased from 300px */
    height: 500px;
    background: transparent;
    border: 2px solid rgba(162, 155, 254, 0.15);
    /* More visible */
    border-radius: 20px;
    transform: rotate(45deg);
    animation: rotate 60s linear infinite;
    /* Slower rotation */
    filter: none;
    opacity: 0.8;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Code Snippets */
.code-snippet-container {
    background: #0f0f13;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #dcdcdc;
    overflow-x: auto;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.code-snippet-container::before {
    content: 'EXAMPLE.c';
    position: absolute;
    top: 0;
    right: 0;
    background: #333;
    color: #aaa;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-bottom-left-radius: 8px;
}

.code-line {
    display: block;
    line-height: 1.5;
}

.c-keyword {
    color: #cc7832;
}

/* Orange */
.c-type {
    color: #a9b7c6;
}

/* Grey/White */
.c-function {
    color: #ffc66d;
}

/* Yellow */
.c-string {
    color: #6a8759;
}

/* Green */
.c-comment {
    color: #808080;
    font-style: italic;
}

/* Grey */
.c-number {
    color: #6897bb;
}

/* Blue */
.c-preprocessor {
    color: #bbb529;
}

/* Yellow/Green */

.asm-instruction {
    color: #9876aa;
}

/* Purple */
.asm-register {
    color: #cc7832;
}

/* Orange */

/* Overview Section */
.overview-section {
    padding: 100px 50px;
    background: #0f0f13;
    border-bottom: 1px solid var(--border-color);
}

.overview-container {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.overview-text {
    flex: 1;
}

.overview-text .section-title {
    margin-bottom: 15px;
}

.overview-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.overview-highlights {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.overview-highlights li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.overview-highlights li i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.overview-code {
    flex: 1;
    perspective: 1000px;
    min-width: 0;
    /* Prevent flex child from overflowing */
    max-width: 100%;
}

.code-window {
    background: #1e1e2f;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    overflow: hidden;
    /* Prevent children from overflowing rounded corners */
}

.code-window:hover {
    transform: rotateY(0) rotateX(0);
}

.code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-buttons {
    display: flex;
    gap: 8px;
}

.code-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-buttons .red {
    background: #ff5f56;
}

.code-buttons .yellow {
    background: #ffbd2e;
}

.code-buttons .green {
    background: #27c93f;
}

.code-title {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.9rem;
}

.code-content {
    padding: 20px;
    margin: 0;
    color: #f8f8f2;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    background: transparent;
}

/* Code lines */
.cl {
    white-space: nowrap;
}

.cl.i1 {
    padding-left: 2em;
}

.cl.i2 {
    padding-left: 4em;
}

/* Syntax Highlighting for Overview */
.code-content .c-comment {
    color: #6272a4;
}

.code-content .c-preprocessor {
    color: #ff79c6;
}

.code-content .c-keyword {
    color: #8be9fd;
}

.code-content .c-function {
    color: #50fa7b;
}

.code-content .asm-instruction {
    color: #bd93f9;
}

.code-content .asm-register {
    color: #ffb86c;
}

.code-content .asm-label {
    color: #f1fa8c;
}

/* ============================
   RESPONSIVE BREAKPOINTS
   ============================ */

/* Tablet (max 900px) */
@media (max-width: 900px) {
    .overview-container {
        flex-direction: column;
        gap: 40px;
    }

    .overview-text .section-title {
        text-align: center !important;
    }

    .code-window {
        transform: none;
    }
}

/* Tablet & Small Screens (max 768px) */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .landing-nav {
        padding: 15px 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .btn-primary-lg,
    .btn-secondary-lg {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .hero-section {
        padding: 100px 20px 60px 20px;
    }

    /* Overview */
    .overview-section {
        padding: 60px 20px;
    }

    /* Curriculum */
    .curriculum-section {
        padding: 60px 20px;
    }

    .curriculum-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Features */
    .features-section {
        padding: 60px 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .landing-footer {
        padding: 30px 20px;
    }
}

/* Mobile (max 480px) */
@media (max-width: 480px) {
    .nav-logo a span {
        font-size: 1.1rem !important;
    }

    .nav-logo a img {
        height: 30px !important;
        margin-right: 8px !important;
    }

    .hero-section {
        min-height: 100vh;
        padding: 100px 15px 50px 15px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-logo {
        width: 80px !important;
    }

    /* Overview */
    .overview-section {
        padding: 10px 15px;
    }

    .overview-highlights li {
        font-size: 0.95rem;
    }

    /* Code Window */
    .code-window {
        transform: none !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }

    .code-content {
        font-size: 0.65rem;
        padding: 10px;
        line-height: 1.5;
    }

    .code-header {
        padding: 8px 10px;
    }

    .code-title {
        font-size: 0.75rem;
    }

    /* Curriculum */
    .curriculum-section {
        padding: 40px 15px;
    }

    .module-card {
        padding: 20px;
    }

    .module-card h3 {
        font-size: 1.2rem;
    }

    .module-list li {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 40px;
    }
}