/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-light: #f8fafc;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dark: #334155;
    --border: #334155;
    --border-light: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.25);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-dark: linear-gradient(135deg, #4f46e5, #7c3aed);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Fix mobile horizontal overflow */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 0 0 4px 0;
    text-decoration: none;
    z-index: 1001;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Navigation */
.navbar {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 4rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 90vh;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #f1f5f9, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    background: var(--gradient-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.hero-image {
    animation: fadeIn 1s ease 0.2s both;
}

.code-snippet {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px var(--shadow);
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.code-snippet:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.code-header span {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    font-size: 0.9rem;
}

pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e6edf3;
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
}

code {
    font-family: 'JetBrains Mono', monospace;
}

/* Sections Common Styles */
section {
    padding: 5rem 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #f1f5f9, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Features Section */
.features {
    background-color: rgba(30, 41, 59, 0.3);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px var(--shadow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Courses Section */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.course-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.course-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px var(--shadow);
}

.course-icon {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
}

.course-icon i {
    font-size: 3rem;
    color: var(--primary);
}

.course-content {
    padding: 1.5rem;
}

.course-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.course-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coming-soon {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    padding: 2rem;
    border: 2px dashed var(--border);
}

.coming-soon h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Stats Section */
.stats {
    background: var(--gradient);
    color: white;
}

.stats .section-title {
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.about-features {
    margin-top: 2rem;
}

.about-features p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-features i {
    color: var(--secondary);
}

.terminal {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px var(--shadow);
}

.terminal-header {
    background: #1a1a1a;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-content {
    padding: 2rem;
    font-family: 'JetBrains Mono', monospace;
    max-width: 100%;
    overflow-x: auto
}

.terminal-content p {
    margin-bottom: 1rem;
    color: #e6edf3;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.prompt {
    color: var(--secondary);
    margin-right: 1rem;
}

/* Footer */
.footer {
    background: #0a0e1a;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-links h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom i {
    color: #ef4444;
    margin: 0 0.25rem;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}




/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
    }
    
    section {
        padding: 3rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .code-snippet {
        transform: none;
    }
    
    .footer {
        margin-top: 2.5rem;
        padding-top: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .feature-card,
    .course-card {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .terminal {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-buttons,
    .social-links,
    .footer-links,
    .mobile-menu-btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero,
    .features,
    .courses,
    .stats,
    .about,
    .footer {
        padding: 1rem 0;
    }
    
    .section-title,
    .hero-title {
        background: none;
        -webkit-text-fill-color: black;
        color: black;
    }
    
    .course-card,
    .feature-card {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* Modal Styles */
/* Modal Styles */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0,0,0,0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.modal-close:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.15);
}

/* Modal Header */
.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.modal-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Difficulty Options */
.difficulty-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.difficulty-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.difficulty-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.difficulty-btn .level-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.difficulty-btn .level-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.difficulty-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.difficulty-btn:hover i {
    transform: scale(1.1);
}

/* Level-specific hover colors */
.difficulty-btn.beginner:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.difficulty-btn.beginner:hover i {
    color: #10b981;
}

.difficulty-btn.intermediate:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.difficulty-btn.intermediate:hover i {
    color: #f59e0b;
}

.difficulty-btn.advanced:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.difficulty-btn.advanced:hover i {
    color: #8b5cf6;
}

.difficulty-btn.expert:hover {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
}

.difficulty-btn.expert:hover i {
    color: #ec4899;
}

/* ==================== */
/* Mobile Responsive */
/* ==================== */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        max-width: 350px;
        padding: 1.5rem;
    }

    .modal-close {
        font-size: 2rem;
        width: 2.5rem;
        height: 2.5rem;
        top: 1rem;
        right: 1rem;
    }

    .modal-header i {
        font-size: 2.5rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-header p {
        font-size: 0.85rem;
    }

    .difficulty-options {
        grid-template-columns: 1fr;
    }

    .difficulty-btn {
        padding: 1rem;
    }

    .difficulty-btn i {
        font-size: 1.75rem;
    }

    .difficulty-btn .level-title {
        font-size: 0.9rem;
    }

    .difficulty-btn .level-desc {
        font-size: 0.7rem;
    }
}
