/* AINNA Detached System - Cyberpunk/Futuristic Theme */

:root {
    /* Day Mode - Better Contrast */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e8e8ed;
    --text-primary: #1a1a1a;
    --text-secondary: #3a3a3a;
    --text-tertiary: #5a5a5a;
    --accent-cyan: #0066cc;
    --accent-purple: #6b21a8;
    --accent-blue: #1d4ed8;
    --border-light: #d1d1d1;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.16);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
    --gradient-cyber: linear-gradient(135deg, #0066cc 0%, #6b21a8 100%);
    --gradient-dark: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

[data-theme="dark"] {
    /* Night Mode - Cyberpunk */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #d0d0e0;
    --text-tertiary: #9090a8;
    --accent-cyan: #00ffff;
    --accent-purple: #a78bfa;
    --accent-blue: #60a5fa;
    --border-light: #2a2a3a;
    --shadow-sm: 0 2px 8px rgba(0,255,255,0.1);
    --shadow-md: 0 4px 16px rgba(0,255,255,0.15);
    --shadow-lg: 0 8px 32px rgba(0,255,255,0.2);
    --gradient-cyber: linear-gradient(135deg, #00ffff 0%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a0f 0%, #12121a 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

/* Clear Cache Button */
#clearCacheBtn {
    right: 80px;
}

#clearCacheBtn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(240,244,248,0.7) 0%, rgba(226,232,240,0.7) 100%), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 24px 80px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 24px;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-principles {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.principle-badge {
    padding: 12px 24px;
    background: rgba(0,255,255,0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
    backdrop-filter: blur(10px);
}

    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    max-width: 200px;
    line-height: 1.4;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Schematic Section */
.schematic-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.schematic-diagram {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.phase {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    width: 100%;
}

.phase-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.phase-icon {
    font-size: 40px;
    color: var(--accent-cyan);
}

.phase-title h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Arrow between schematic cards via CSS pseudo-element */
.scroll-content .schematic-card {
    position: relative;
}

.scroll-content .schematic-card + .schematic-card::before {
    content: '→';
    font-size: 28px;
    color: var(--accent-cyan);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
    animation: arrow-pulse 2s ease-in-out infinite;
}

@keyframes arrow-pulse {
    0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.1); }
}

.phase-cards {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Schematic Cards - Larger and Responsive */
.schematic-card {
    flex: 0 0 auto;
    min-width: 280px;
    max-width: 340px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.schematic-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-cyan);
}

.card-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.schematic-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.schematic-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Arrow styling for schematic cards - now CSS pseudo-element */
.schematic-card {
    position: relative;
}

/* Principles Section */
.principles-section {
    padding: 100px 0;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.principle-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
}

.principle-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-cyan);
}

.principle-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.principle-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.principle-card p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.feature-list li:last-child {
    border-bottom: none;
}

/* Examples Section */
.examples-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.scrolling-track {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
    cursor: grab;
    touch-action: pan-y;
}

.scroll-content {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: scroll-left 40s linear infinite;
    cursor: grab;
    will-change: transform;
    touch-action: pan-y;  /* Enable manual swipe while auto-scrolling */
}

/* Allow manual swipe while auto-scrolling */
.scroll-content:active,
.scroll-content.swipe-active {
    cursor: grabbing;
    animation-play-state: paused !important;
}

.scroll-content:hover,
.scroll-content.paused {
    animation-play-state: paused;
}

.scroll-left .scroll-content {
    animation-direction: normal;
}

@keyframes scroll-left {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(-50%); 
    }
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.example-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.example-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-cyan);
}

.example-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.example-icon {
    font-size: 32px;
}

.example-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.example-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.example-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tech-tag {
    padding: 6px 12px;
    background: rgba(0,255,255,0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.example-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--gradient-cyber);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.example-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,255,255,0.4);
}

/* Comparison Section */
.comparison-section {
    padding: 100px 0;
}

.comparison-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 1px solid var(--border-light);
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-cell {
    padding: 20px;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.comparison-cell:first-child {
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-primary);
}

.comparison-cell.detached {
    color: var(--accent-cyan);
    font-weight: 600;
    background: rgba(0,255,255,0.05);
}

.comparison-cell.traditional {
    color: var(--text-tertiary);
}

.comparison-row.header .comparison-cell {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--bg-primary);
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(240,244,248,0.7) 0%, rgba(226,232,240,0.7) 100%), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.cta-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 60px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-box h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.cta-box > p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    text-align: left;
}

.step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gradient-cyber);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.step-text h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-cyber);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,255,255,0.4);
}

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

.btn-secondary:hover {
    background: rgba(0,255,255,0.1);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 40px 0;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
}

.footer-links {
    margin-top: 16px;
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 42px;
    }
    
    .hero-subtitle {
        font-size: 22px;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .phase-cards {
        flex-direction: column;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
    
    .comparison-row {
        grid-template-columns: 1fr;
    }
    
    .cta-box {
        padding: 32px 24px;
    }
    
    .cta-steps {
        grid-template-columns: 1fr;
    }
}

/* Fix Auto-Scroll - Re-enable animation */
.scroll-content {
    animation: scroll-left 40s linear infinite;
    justify-content: flex-start;
    will-change: transform;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* SVG Icon Styles - Black & White Corporate */
.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-primary);
}

.principle-badge svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-cyan);
}

.phase-icon {
    width: 32px;
    height: 32px;
    stroke: var(--accent-cyan);
}

.card-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-primary);
}

.principle-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--accent-cyan);
}

.example-icon {
    width: 40px;
    height: 40px;
    stroke: var(--accent-cyan);
}
/* Section Headers - FIXED FOR TEXT WRAP */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.3;
}

.highlight-cyan {
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

/* Fix Principle Card Width - Force Text Wrap */
.principle-card {
    max-width: 320px !important;
    min-width: 280px !important;
    flex-shrink: 0 !important;
}

.principle-card p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* Hero Overlay - 70% Transparent */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.3);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Night Mode - Hero Transparent Black Overlay */
[data-theme="dark"] .hero::before {
    background: rgba(0,0,0,0.7);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, rgba(10,10,15,0.8) 0%, rgba(18,18,26,0.8) 100%), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Schematic Section Auto-Scroll */
.schematic-section .scrolling-track {
    padding: 20px 0;
    cursor: grab;
    overflow: hidden;
}

.schematic-section .scroll-content.phase-cards {
    display: flex;
    gap: 40px;
    align-items: center;
    animation: scroll-left 45s linear infinite;
    will-change: transform;
}

.schematic-section .scroll-content.phase-cards:active,
.schematic-section .scroll-content.phase-cards.swipe-active {
    cursor: grabbing;
    animation-play-state: paused !important;
}

.schematic-section .phase {
    overflow: visible;
    width: 100%;
}

.schematic-section .phase-cards {
    gap: 24px;
}

.schematic-section .schematic-card {
    flex: 0 0 auto;
    min-width: 280px;
    max-width: 340px;
}

@media (max-width: 768px) {
    .schematic-section .phase {
        padding: 24px;
    }
    
    .schematic-section .schematic-card {
        min-width: 220px;
        max-width: 280px;
    }
    
    .schematic-section .scroll-content.phase-cards {
        gap: 16px;
    }
    
    .schematic-card h4 {
        font-size: 17px;
    }
    
    .schematic-card p {
        font-size: 13px;
    }
}

/* Fix Card Widths - Responsive Sizes */
.principle-card {
    max-width: 300px !important;
    min-width: 260px !important;
}

.schematic-section .phase {
    min-width: auto !important;
    max-width: none !important;
    width: 100% !important;
}

.schematic-section .schematic-card {
    min-width: 260px !important;
    max-width: 320px !important;
}

.example-card {
    min-width: 280px !important;
    max-width: 300px !important;
}

/* Fix Scroll Issue - Allow vertical scroll while swiping cards */
.scrolling-track {
    touch-action: pan-y pinch-zoom !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
}

.scroll-content {
}

/* Prevent card swipe from blocking page scroll */
.scrolling-track {
    max-height: 100%;
    overscroll-behavior-x: contain !important;
}

/* Mobile - better scroll behavior */
@media (max-width: 768px) {
    .scrolling-track {
        touch-action: auto !important;
    }
    
    .principle-card {
        max-width: 260px !important;
        min-width: 240px !important;
    }
    
    .example-card {
        min-width: 260px !important;
        max-width: 280px !important;
    }
    
    .schematic-section .phase {
        min-width: 500px !important;
        max-width: 500px !important;
    }
    
    .schematic-section .schematic-card {
        min-width: 140px !important;
        max-width: 140px !important;
    }
}

/* FORCE NARROW CARDS - 50% Reduction */
.principle-card,
.example-card {
    width: 320px !important;
    max-width: 320px !important;
    min-width: 320px !important;
    flex: 0 0 320px !important;
}

.schematic-section .schematic-card {
    width: auto !important;
    min-width: 260px !important;
    max-width: 320px !important;
    flex: 0 0 auto !important;
}

.schematic-section .phase {
    width: 650px !important;
    max-width: 650px !important;
    min-width: 650px !important;
    flex: 0 0 650px !important;
}

/* FIX SCROLL - Allow page scroll while touching cards */
.scrolling-track {
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
}

.scroll-content {
    display: flex;
    gap: 20px;
    width: max-content;
}

/* Disable JavaScript interference with scroll */
.scrolling-track {
}

/* Mobile - Even narrower */
@media (max-width: 768px) {
    .principle-card,
    .example-card {
        width: 280px !important;
        max-width: 280px !important;
        min-width: 280px !important;
        flex: 0 0 280px !important;
    }
    
    .schematic-section .schematic-card {
        width: 150px !important;
        max-width: 150px !important;
        min-width: 150px !important;
        flex: 0 0 150px !important;
    }
    
    .schematic-section .phase {
        width: 550px !important;
        max-width: 550px !important;
        min-width: 550px !important;
        flex: 0 0 550px !important;
    }
}

/* MOBILE RESPONSIVE - Fix Overflow */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    body {
        position: relative !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* Hero Section - Mobile */
    .hero {
        padding: 100px 20px 60px !important;
        min-height: auto !important;
        height: auto !important;
    }
    
    .hero h1 {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }
    
    .hero p {
        font-size: 16px !important;
    }
    
    /* Section Headers - Mobile */
    .section-header h2 {
        font-size: 24px !important;
    }
    
    .section-header p {
        font-size: 14px !important;
    }
    
    /* Scrolling Sections - Mobile */
    .scrolling-track {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }
    
    .scroll-content {
        gap: 16px !important;
    }
    
    /* Cards - Mobile */
    .principle-card,
    .example-card {
        min-width: 260px !important;
        max-width: 280px !important;
    }
    
    .schematic-section .phase {
        min-width: 500px !important;
        max-width: 85vw !important;
        padding: 24px !important;
    }
    
    .schematic-section .schematic-card {
        min-width: 130px !important;
        max-width: 150px !important;
    }
    
    .schematic-section .phase-cards {
        gap: 10px !important;
    }
    
    /* Buttons - Mobile */
    #themeToggle,
    #clearCacheBtn {
        width: 44px !important;
        height: 44px !important;
        right: 20px !important;
    }
    
    #clearCacheBtn {
        right: 75px !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px !important;
    }
    
    .hero p {
        font-size: 14px !important;
    }
    
    .section-header h2 {
        font-size: 20px !important;
    }
    
    .principle-card,
    .example-card {
        min-width: 240px !important;
        max-width: 260px !important;
        padding: 24px !important;
    }
    
    .schematic-section .phase {
        min-width: 450px !important;
        padding: 20px !important;
    }
    
    .schematic-section .schematic-card {
        min-width: 110px !important;
        max-width: 130px !important;
        padding: 16px !important;
    }
    
    .schematic-section .schematic-card h4 {
        font-size: 13px !important;
    }
    
    .schematic-section .schematic-card p {
        font-size: 11px !important;
    }
}

/* Night Mode Mobile Adjustments */
@media (max-width: 768px) {
    [data-theme="dark"] .hero {
        background: linear-gradient(135deg, rgba(10,10,15,0.9) 0%, rgba(18,18,26,0.9) 100%), url('../assets/hero-bg.jpg');
    }
    
    [data-theme="dark"] body {
        background-color: #0a0a0f !important;
    }
}

/* Day Mode Mobile Adjustments */
@media (max-width: 768px) {
    [data-theme="light"] .hero {
        background: linear-gradient(135deg, rgba(240,244,248,0.8) 0%, rgba(226,232,240,0.8) 100%), url('../assets/hero-bg.jpg');
    }
    
    [data-theme="light"] body {
        background-color: #ffffff !important;
    }
}

/* DESKTOP RESPONSIVE - Fix Layout Issues */

/* Ensure body doesn't overflow */
html {
    overflow-x: hidden !important;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
}

/* Container - Responsive */
.container {
    width: 100% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    box-sizing: border-box !important;
}

/* Hero Section - Responsive */
.hero {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

.hero-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 48px) !important;
    line-height: 1.2 !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}

.hero p {
    font-size: clamp(16px, 2vw, 18px) !important;
    max-width: 700px !important;
    margin: 0 auto !important;
}

/* Section Headers - Responsive */
.section-header {
    max-width: 900px !important;
    margin: 0 auto 60px !important;
    padding: 0 20px !important;
    text-align: center !important;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 36px) !important;
    line-height: 1.3 !important;
}

.section-header p {
    font-size: clamp(14px, 1.5vw, 16px) !important;
}

/* Scrolling Sections - Desktop Responsive */
.scrolling-track {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
    touch-action: pan-y !important;
}

.scroll-content {
    gap: 24px !important;
    padding: 20px !important;
}

/* Card Widths - Desktop Responsive */
.principle-card,
.example-card {
    width: auto !important;
    min-width: 280px !important;
    max-width: 320px !important;
    flex: 0 0 auto !important;
}

/* Schematic Section - Desktop Responsive */
.schematic-section .phase {
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding: 32px !important;
}

.schematic-section .schematic-card {
    width: auto !important;
    min-width: 260px !important;
    max-width: 320px !important;
    flex: 0 0 auto !important;
}

.schematic-section .phase-cards {
    gap: 24px !important;
}

/* CTA Section - Responsive */
.build-cta {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
}

.build-cta h2 {
    font-size: clamp(24px, 3vw, 32px) !important;
}

/* Footer - Responsive */
footer {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

/* Buttons - Desktop Position */
#themeToggle,
#clearCacheBtn {
    position: fixed !important;
    top: 20px !important;
    width: 48px !important;
    height: 48px !important;
    z-index: 9999 !important;
}

#themeToggle {
    right: 20px !important;
}

#clearCacheBtn {
    right: 80px !important;
}

/* Tablet Responsive (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100% !important;
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
    
    .hero h1 {
        font-size: 36px !important;
    }
    
    .section-header h2 {
        font-size: 28px !important;
    }
    
    .principle-card,
    .example-card {
        min-width: 260px !important;
        max-width: 300px !important;
    }
    
    .schematic-section .phase {
        min-width: 500px !important;
        max-width: 650px !important;
    }
    
    .schematic-section .schematic-card {
        min-width: 140px !important;
        max-width: 160px !important;
    }
}

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px !important;
    }
    
    .hero h1 {
        font-size: 56px !important;
    }
    
    .section-header h2 {
        font-size: 42px !important;
    }
    
    .principle-card,
    .example-card {
        min-width: 320px !important;
        max-width: 360px !important;
    }
    
    .schematic-section .phase {
        min-width: 650px !important;
        max-width: 850px !important;
    }
}
