/* ============================================================================
   PersonalStudy - Landing Page Styles
   ============================================================================ */

:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --success: #00C9A7;
    --danger: #FF6584;
    --warning: #FFB74D;
    --blue: #42A5F5;
    --purple: #AB47BC;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fc;
    --bg-tertiary: #f0f1f5;
    --border-color: #e5e7eb;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    margin: 0;
    line-height: 1.6;
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.ps-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

.ps-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.ps-brand:hover { color: var(--primary); }

.ps-lang-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 2px;
}

.ps-lang-switcher a {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.ps-lang-switcher a.active,
.ps-lang-switcher a:hover {
    background: var(--primary);
    color: #fff;
}

/* ============================================================================
   HERO
   ============================================================================ */

.ps-hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef0ff 100%);
}

.ps-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--danger));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ps-hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
}

.ps-hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ps-hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.ps-hero-stats .stat {
    display: flex;
    flex-direction: column;
}

.ps-hero-stats .stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.ps-hero-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Code Window Visual */
.ps-hero-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    background: #1e1e2e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.code-header {
    background: #2d2d3f;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28ca42; }

.code-title {
    margin-left: 12px;
    font-size: 0.75rem;
    color: #8888a0;
    font-family: monospace;
}

.code-body {
    padding: 20px;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #cdd6f4;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    overflow-x: auto;
}

.code-body .kw { color: #cba6f7; }
.code-body .fn { color: #89b4fa; }
.code-body .cls { color: #a6e3a1; }
.code-body .str { color: #a6e3a1; }
.code-body .num { color: #fab387; }

/* ============================================================================
   FEATURES
   ============================================================================ */

.ps-features {
    padding: 80px 0;
    background: var(--bg-primary);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

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

.feature-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* ============================================================================
   COURSES
   ============================================================================ */

.ps-courses {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.course-card {
    display: block;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}

.course-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    color: inherit;
}

.course-card-soon {
    opacity: 0.7;
    cursor: default;
}
.course-card-soon:hover {
    border-color: var(--border-color);
    transform: none;
    box-shadow: none;
}

.course-card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), #4834d4);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.course-badge {
    background: linear-gradient(135deg, var(--success), #00b894);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-soon {
    background: linear-gradient(135deg, #aaa, #888);
}

.course-card-body {
    padding: 1.5rem;
}

.course-card-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.course-card-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.course-meta span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.course-tags .tag {
    font-size: 0.72rem;
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    color: var(--text-secondary);
    font-weight: 500;
}

.course-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.course-cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

/* ============================================================================
   HOW IT WORKS
   ============================================================================ */

.ps-how-it-works {
    padding: 80px 0;
    background: var(--bg-primary);
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 auto 1rem;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* ============================================================================
   COURSE OVERVIEW PAGE
   ============================================================================ */

.course-hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef0ff 100%);
}

.course-title {
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.course-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.course-stats-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.stat-item i { color: var(--primary); }

/* Skill Tree Preview */
.course-visual {
    display: flex;
    justify-content: center;
}

.skill-tree-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.tree-node {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
}

.tree-node.active {
    background: rgba(0,201,167,0.1);
    color: var(--success);
    border: 2px solid var(--success);
}

.tree-node.current {
    background: rgba(108,99,255,0.1);
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(108,99,255,0.15);
}

.tree-node.locked {
    background: var(--bg-tertiary);
    color: #bbb;
    border: 2px solid var(--border-color);
}

.tree-connector {
    width: 2px;
    height: 20px;
    background: var(--border-color);
}

/* What You'll Learn */
.course-learn {
    padding: 60px 0;
    background: var(--bg-primary);
}

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

.learn-list li {
    padding: 10px 0;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.learn-list li i {
    color: var(--success);
    margin-top: 3px;
    flex-shrink: 0;
}

/* Course Levels */
.course-levels {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.level-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.level-item:hover {
    box-shadow: var(--shadow-sm);
}

.level-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.level-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 2px;
}

.level-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Final CTA */
.course-final-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fc, #eef0ff);
}

.course-final-cta h2 {
    font-size: 2rem;
    font-weight: 800;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.ps-footer {
    background: var(--text-primary);
    color: #aaa;
    padding: 3rem 0 1.5rem;
}

.ps-footer .footer-brand {
    color: white;
}

.ps-footer h5 {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.ps-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ps-footer ul li {
    margin-bottom: 0.4rem;
}

.ps-footer ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.ps-footer ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.8rem;
}

/* ============================================================================
   BUTTONS (overrides)
   ============================================================================ */

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

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

@media (max-width: 768px) {
    .ps-hero {
        padding: 40px 0;
    }
    
    .ps-hero-title {
        font-size: 2rem;
    }
    
    .course-title {
        font-size: 1.8rem;
    }
    
    .ps-hero-stats {
        gap: 1rem;
    }
    
    .course-stats-bar {
        gap: 1rem;
    }
    
    .levels-grid {
        grid-template-columns: 1fr;
    }
    
    .ps-navbar .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .ps-hero-title {
        font-size: 1.7rem;
    }
    
    .ps-hero-cta {
        flex-direction: column;
    }
    
    .ps-hero-cta .btn {
        width: 100%;
    }
}


/* ============================================================================
   DARK MODE — Landing Page
   ============================================================================ */




/* Auth toggle — Login/Signup as segmented control */
.ps-auth-toggle {
    display: flex;
    background: rgba(108, 99, 255, 0.08);
    border-radius: 24px;
    padding: 3px;
    border: 1px solid rgba(108, 99, 255, 0.15);
}

.ps-auth-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    color: var(--primary, #6C63FF);
    background: transparent;
}

.ps-auth-btn:hover {
    background: rgba(108, 99, 255, 0.08);
    color: var(--primary, #6C63FF);
    text-decoration: none;
}

.ps-auth-btn.active {
    background: var(--primary, #6C63FF);
    color: #fff;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
}

.ps-auth-btn.active:hover {
    background: #5b54e0;
    color: #fff;
}

[data-theme="dark"] .ps-auth-toggle {
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.2);
}

[data-theme="dark"] .ps-auth-btn {
    color: #9b94ff;
}

[data-theme="dark"] .ps-auth-btn.active {
    background: #6C63FF;
    color: #fff;
}

/* ============================================================================
   LANDING NAVBAR — Desktop/Mobile Split
   ============================================================================ */

/* Desktop nav — visible on large screens */
.ps-landing-desktop-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile nav — hidden on desktop */
.ps-landing-mobile-nav {
    display: none;
    align-items: center;
    gap: 10px;
}

/* Hamburger button */
.ps-landing-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color, #2d3148);
    background: transparent;
    cursor: pointer;
    padding: 7px;
    border-radius: 8px;
    gap: 4px;
    transition: all 0.2s;
}
.ps-landing-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary, #e8eaed);
    border-radius: 2px;
    transition: all 0.3s;
}
[data-theme="light"] .ps-landing-hamburger {
    border-color: #e2e8f0;
}
[data-theme="light"] .ps-landing-hamburger span {
    background: #374151;
}
.ps-landing-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(3px, 3px); }
.ps-landing-hamburger.open span:nth-child(2) { opacity: 0; }
.ps-landing-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(3px, -3px); }

/* Mobile dropdown */
.ps-landing-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 16px;
    min-width: 200px;
    background: var(--bg-card, #1a1d2e);
    border: 1px solid var(--border-color, #2d3148);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    padding: 8px;
    z-index: 999;
    flex-direction: column;
    gap: 4px;
}
.ps-landing-dropdown.open {
    display: flex;
}
[data-theme="light"] .ps-landing-dropdown {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.ps-landing-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-primary, #e8eaed);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.ps-landing-dropdown-item:hover {
    background: rgba(108, 99, 255, 0.08);
}
[data-theme="light"] .ps-landing-dropdown-item {
    color: #374151;
}
[data-theme="light"] .ps-landing-dropdown-item:hover {
    background: #f3f4f6;
}

/* ============================================================================
   RESPONSIVE — Show/Hide nav sections
   ============================================================================ */
@media (max-width: 768px) {
    .ps-landing-desktop-nav {
        display: none !important;
    }
    .ps-landing-mobile-nav {
        display: flex !important;
    }
    .ps-navbar .container {
        position: relative;
    }
}


[data-theme="dark"] body {
    background: #0d1121;
    color: #e8eaed;
}

[data-theme="dark"] .ps-navbar {
    background: rgba(20, 23, 37, 0.95);
    border-bottom-color: #2d3148;
}

[data-theme="dark"] .ps-brand {
    color: #e8eaed;
}

[data-theme="dark"] .ps-lang-switcher {
    background: #252836;
}

[data-theme="dark"] .ps-lang-switcher a {
    color: #a1a7b4;
}

[data-theme="dark"] .ps-lang-switcher a.active,
[data-theme="dark"] .ps-lang-switcher a:hover {
    background: var(--primary);
    color: #fff;
}

/* Hero */
[data-theme="dark"] .ps-hero {
    background: linear-gradient(160deg, #0a0a1a 0%, #0f1030 40%, #0a2050 100%);
}

[data-theme="dark"] .ps-hero-title {
    color: #ffffff;
}

[data-theme="dark"] .ps-hero-subtitle {
    color: #a1a7b4;
}

[data-theme="dark"] .ps-hero-stats .stat-number {
    color: var(--primary);
}

[data-theme="dark"] .ps-hero-stats .stat-label {
    color: #a1a7b4;
}

[data-theme="dark"] .text-gradient {
    background: linear-gradient(135deg, #9b94ff, #00e6c3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Code window */
[data-theme="dark"] .code-window {
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Sections */
[data-theme="dark"] .ps-features,
[data-theme="dark"] .ps-courses,
[data-theme="dark"] .ps-how-it-works {
    background: #080a14;
}

[data-theme="dark"] .section-title {
    color: #ffffff;
}

[data-theme="dark"] .section-subtitle {
    color: #a1a7b4;
}

/* Feature cards */
[data-theme="dark"] .feature-card {
    background: linear-gradient(160deg, #1a0a3e 0%, #0a1a4a 60%, #0a3a6a 100%);
    border: none;
    position: relative;
    overflow: visible;
}
[data-theme="dark"] .feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, #7c73ff, #00e6c3);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
[data-theme="dark"] .feature-card h3 {
    color: #ffffff;
}
[data-theme="dark"] .feature-card p {
    color: #c0c8d8;
}
[data-theme="dark"] .feature-icon {
    background: rgba(255,255,255,0.06) !important;
}

/* Course cards */
[data-theme="dark"] .course-card {
    background: linear-gradient(160deg, #0f0a2e 0%, #0a1a4a 50%, #0a3a6a 100%);
    border: none;
    position: relative;
    overflow: visible;
}
[data-theme="dark"] .course-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, #7c73ff, #00e6c3, #ff6584);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
[data-theme="dark"] .course-card h3,
[data-theme="dark"] .course-card .course-title {
    color: #ffffff;
}
[data-theme="dark"] .course-card p {
    color: #c0c8d8;
}
[data-theme="dark"] .course-meta span {
    color: #a1a7b4;
}
[data-theme="dark"] .course-tags .tag {
    background: rgba(124, 115, 255, 0.12);
    color: #9b94ff;
    border-color: rgba(124, 115, 255, 0.3);
}
[data-theme="dark"] .course-cta {
    color: #9b94ff;
}
[data-theme="dark"] .course-badge {
    background: var(--primary);
    color: #fff;
}

/* How It Works */
[data-theme="dark"] .step-number {
    background: linear-gradient(135deg, #7c73ff, #a855f7);
    color: #fff;
}
[data-theme="dark"] .step-text h3 {
    color: #ffffff;
}
[data-theme="dark"] .step-text p {
    color: #a1a7b4;
}

/* Buttons — gradient pills */
[data-theme="dark"] .ps-hero-cta .btn-primary {
    background: linear-gradient(135deg, #7c73ff, #a855f7, #ec4899);
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(124, 115, 255, 0.4);
}
[data-theme="dark"] .ps-hero-cta .btn-primary:hover {
    box-shadow: 0 6px 30px rgba(124, 115, 255, 0.6);
    transform: translateY(-2px);
}
[data-theme="dark"] .ps-hero-cta .btn-outline-secondary {
    border-color: #3d4158;
    color: #a1a7b4;
    border-radius: 50px;
}
[data-theme="dark"] .ps-hero-cta .btn-outline-secondary:hover {
    background: rgba(124, 115, 255, 0.08);
    border-color: #7c73ff;
    color: #ffffff;
}

/* Nav buttons */
[data-theme="dark"] .btn-outline-primary {
    border-color: #3d4158;
    color: #a1a7b4;
}
[data-theme="dark"] .btn-outline-primary:hover {
    background: rgba(124, 115, 255, 0.1);
    border-color: #7c73ff;
    color: #fff;
}

/* Footer */
[data-theme="dark"] .ps-footer {
    background: #060810;
    border-top: 1px solid #1a1d2e;
}
[data-theme="dark"] .ps-footer h5 {
    color: #e8eaed;
}
[data-theme="dark"] .ps-footer a,
[data-theme="dark"] .ps-footer p,
[data-theme="dark"] .ps-footer li {
    color: #6b7280;
}
[data-theme="dark"] .ps-footer a:hover {
    color: #9b94ff;
}
[data-theme="dark"] .footer-bottom {
    border-top-color: #1a1d2e;
}

/* ============================================================================
   LIGHT MODE ENHANCEMENTS — Landing Page
   ============================================================================ */

/* Feature cards — subtle gradient tint */
[data-theme="light"] .feature-card {
    background: linear-gradient(160deg, #ffffff 0%, #faf8ff 50%, #f4fffe 100%);
    position: relative;
    border: none;
    overflow: visible;
}
[data-theme="light"] .feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #6C63FF55, #00C9A755);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Course cards — subtle gradient */
[data-theme="light"] .course-card {
    background: linear-gradient(160deg, #ffffff 0%, #faf8ff 50%, #f0fffa 100%);
    position: relative;
    border: none;
    overflow: visible;
}
[data-theme="light"] .course-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #6C63FF44, #00C9A744, #FF658444);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Buttons — gradient pills (light mode too) */
[data-theme="light"] .ps-hero-cta .btn-primary {
    background: linear-gradient(135deg, #6C63FF, #a855f7, #ec4899);
    border: none;
    border-radius: 50px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}
[data-theme="light"] .ps-hero-cta .btn-primary:hover {
    box-shadow: 0 6px 25px rgba(108, 99, 255, 0.45);
    transform: translateY(-2px);
}
[data-theme="light"] .ps-hero-cta .btn-outline-secondary {
    border-radius: 50px;
    border-color: var(--primary);
    color: var(--primary);
}

/* Sign Up nav button */
[data-theme="light"] a[href="?page=register"].btn-primary {
    background: linear-gradient(135deg, #6C63FF, #a855f7, #ec4899);
    border: none;
    border-radius: 50px;
    color: #fff;
}

/* Theme toggle button */
.theme-toggle-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color, #e5e7eb);
    background: var(--bg-tertiary, #f0f1f5);
    color: var(--text-secondary, #6b7280);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    padding: 0;
}
.theme-toggle-btn:hover {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(15deg);
}
[data-theme="dark"] .theme-toggle-btn {
    background: #252836;
    border-color: #3d4158;
    color: #a1a7b4;
}
[data-theme="light"] .theme-toggle-btn .bi-sun-fill { display: none; }
[data-theme="dark"] .theme-toggle-btn .bi-moon-fill { display: none; }
[data-theme="dark"] .theme-toggle-btn .bi-sun-fill { display: inline; }

/* Smooth transitions */
body, .ps-navbar, .feature-card, .course-card, .ps-footer {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}




/* Landing Dark Mode — Rich Navy Blue Theme */
[data-theme="dark"] .ps-hero {
    background: linear-gradient(180deg, #0d1121 0%, #111a33 100%);
}

[data-theme="dark"] .ps-features,
[data-theme="dark"] .ps-how-it-works {
    background: #0f1528;
}

[data-theme="dark"] .ps-courses {
    background: #0d1121;
}

[data-theme="dark"] .feature-card {
    background: #151c35 !important;
    border: 1px solid #1e2a4a;
}

[data-theme="dark"] .course-card {
    background: #151c35 !important;
    border: 1px solid #1e2a4a;
}

[data-theme="dark"] .course-card-soon {
    background: #121828 !important;
    border: 1px solid #1a2340;
}

[data-theme="dark"] .step-card {
    background: #151c35;
    border: 1px solid #1e2a4a;
}

[data-theme="dark"] .ps-footer {
    background: #080c18;
}

[data-theme="dark"] .ps-hero-subtitle {
    color: #9ba3b8;
}

[data-theme="dark"] .section-subtitle {
    color: #8891a5;
}

/* ============================================================================
   LANDING PAGE — MOBILE RESPONSIVE
   ============================================================================ */

/* Hamburger (reuse same style as main nav) */
.ps-landing-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: background 0.2s;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0;
}
.ps-landing-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary, #1a1a2e);
    margin: 4px auto;
    border-radius: 2px;
    transition: all 0.3s;
}
[data-theme="dark"] .ps-landing-hamburger span {
    background: #e8eaed;
}
.ps-landing-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.ps-landing-hamburger.open span:nth-child(2) { opacity: 0; }
.ps-landing-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* Landing mobile menu */
.ps-landing-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card, #ffffff);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 20px 24px;
    z-index: 999;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.ps-landing-mobile-menu.open {
    display: flex;
}

.ps-navbar {
    position: relative;
}
[data-theme="dark"] .ps-landing-mobile-menu {
    background: #1a1d2e;
    border-color: #2d3148;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.ps-landing-mobile-menu .ps-lang-switcher {
    justify-content: center;
}
.ps-landing-mobile-menu .btn {
    text-align: center;
    width: 100%;
}

/* ============================================================================
   BREAKPOINT: <= 768px — Landing page tablet/mobile
   ============================================================================ */
@media (max-width: 768px) {
    /* Brand text smaller on mobile */
    .ps-navbar .ps-brand span {
        font-size: 0.9rem !important;
    }

    /* Navbar */
    .ps-navbar .container {
        position: relative;
    }

    /* Overall section padding */
    section {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Hero */
    .ps-hero {
        padding: 30px 0 40px !important;
        text-align: center;
    }

    .ps-hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }

    .ps-hero-subtitle {
        font-size: 0.9rem !important;
        padding: 0 8px;
    }

    .ps-hero-cta {
        flex-direction: column;
        gap: 10px;
        padding: 0 8px;
    }
    .ps-hero-cta .btn {
        width: 100%;
    }

    .ps-hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    /* Features — single column on mobile for breathing room */
    .ps-features .row {
        padding: 0 4px;
    }

    .ps-features .col-lg-3,
    .ps-features .col-md-6 {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .feature-card {
        padding: 24px 20px !important;
        margin-bottom: 12px;
    }

    .feature-card h3 {
        font-size: 1rem;
    }

    .feature-card p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    /* Course cards full width with padding */
    .ps-courses .row {
        padding: 0 4px;
        gap: 20px 0;
    }

    .ps-courses .col-lg-6,
    .ps-courses .col-md-8 {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .course-card {
        margin-bottom: 24px;
    }

    .course-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .course-tags {
        flex-wrap: wrap;
    }

    /* How it works — stack */
    .ps-how-it-works .col-md-4 {
        width: 100%;
    }

    .step-card {
        text-align: center;
        margin-bottom: 12px;
    }

    /* Footer — compact mobile layout */
    .ps-footer {
        padding: 30px 20px 20px !important;
    }

    .ps-footer .row {
        gap: 0 !important;
    }

    .ps-footer .col-md-4 {
        width: 100% !important;
        text-align: left;
        margin-bottom: 16px;
        padding: 0 !important;
    }

    .ps-footer .col-md-4:first-child {
        margin-bottom: 20px;
        padding-bottom: 16px !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Platform + Account side by side */
    .ps-footer .col-md-4:nth-child(2),
    .ps-footer .col-md-4:nth-child(3) {
        display: inline-block !important;
        width: 48% !important;
        vertical-align: top;
        text-align: left;
    }

    .ps-footer h5 {
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
        margin-top: 0;
        opacity: 0.7;
    }

    .ps-footer ul {
        margin-bottom: 0;
    }

    .ps-footer ul li {
        margin-bottom: 4px;
    }

    .ps-footer ul li a {
        font-size: 0.85rem;
    }

    .ps-footer .footer-brand span {
        font-size: 1rem;
    }

    .ps-footer p {
        font-size: 0.8rem !important;
        margin-top: 6px !important;
    }

    .footer-bottom {
        text-align: center;
        margin-top: 16px;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .footer-bottom p {
        font-size: 0.75rem !important;
        opacity: 0.5;
    }

    /* Section titles */
    .section-title {
        font-size: 1.5rem !important;
    }

    .section-subtitle {
        font-size: 0.85rem !important;
        padding: 0 8px;
    }
}

/* ============================================================================
   BREAKPOINT: <= 480px — Landing small phones
   ============================================================================ */
@media (max-width: 480px) {
    .ps-hero-title {
        font-size: 1.5rem !important;
    }

    /* Features — single column */
    .ps-features .col-lg-3,
    .ps-features .col-md-6 {
        width: 100% !important;
    }

    .ps-hero-stats .stat-number {
        font-size: 1.3rem;
    }

    .ps-hero-stats .stat-label {
        font-size: 0.7rem;
    }

    /* Course card padding */
    .course-card {
        padding: 16px !important;
    }

    .course-card-body h3 {
        font-size: 1.1rem;
    }

    /* Navbar brand font */
    .ps-navbar .ps-brand span {
        font-size: 0.95rem;
    }
}

/* CRITICAL FIX: Override style.css hiding navbar on mobile */
@media (max-width: 768px) {
    .ps-navbar {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .ps-navbar { display: flex !important; }
    .ps-landing-desktop-nav { display: none !important; }
    .ps-landing-mobile-nav { display: flex !important; }
}
