@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #121824;
    --bg-header: rgba(10, 14, 23, 0.7);
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 120, 215, 0.4);
    --accent-color: #0078d7;
    --accent-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --accent-glow: rgba(0, 198, 255, 0.15);
    --glow-opacity: 1;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root.light-theme {
    --bg-primary: #f4f6f9;
    --bg-secondary: #ffffff;
    --bg-header: rgba(244, 246, 249, 0.7);
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.04);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 120, 215, 0.5);
    --accent-color: #0078d7;
    --accent-gradient: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
    --accent-glow: rgba(0, 114, 255, 0.06);
    --glow-opacity: 0.4;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: light) {
    :root:not(.dark-theme) {
        --bg-primary: #f4f6f9;
        --bg-secondary: #ffffff;
        --bg-header: rgba(244, 246, 249, 0.7);
        --bg-card: rgba(0, 0, 0, 0.02);
        --bg-card-hover: rgba(0, 0, 0, 0.04);
        --border-color: rgba(0, 0, 0, 0.08);
        --border-hover: rgba(0, 120, 215, 0.5);
        --accent-color: #0078d7;
        --accent-gradient: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
        --accent-glow: rgba(0, 114, 255, 0.06);
        --glow-opacity: 0.4;
        --text-primary: #1f2937;
        --text-secondary: #4b5563;
        --text-muted: #9ca3af;
        --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.08);
    }
}

:root.dark-theme {
    --bg-primary: #0a0e17;
    --bg-secondary: #121824;
    --bg-header: rgba(10, 14, 23, 0.7);
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 120, 215, 0.4);
    --accent-color: #0078d7;
    --accent-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --accent-glow: rgba(0, 198, 255, 0.15);
    --glow-opacity: 1;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

html, body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

.glow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

/* Background Gradients */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(10, 14, 23, 0) 70%);
    top: -200px;
    right: -100px;
    z-index: -1;
    pointer-events: none;
    opacity: var(--glow-opacity);
}

.bg-glow-left {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 114, 255, 0.08) 0%, rgba(10, 14, 23, 0) 70%);
    bottom: 20%;
    left: -200px;
    z-index: -1;
    pointer-events: none;
    opacity: var(--glow-opacity);
}

/* Header & Navigation */
header {
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
}

.logo span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile Toggle Hamburger Button styling */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    z-index: 101;
    transition: var(--transition);
}

.hamburger line {
    transition: var(--transition);
    transform-origin: center;
}

.menu-toggle.active .line-mid {
    opacity: 0;
}

.menu-toggle.active .line-top {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active .line-bot {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-github {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-github:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* Hero Section */
.hero {
    padding: 160px 24px 80px 24px;
    position: relative;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.badge {
    background: rgba(0, 198, 255, 0.1);
    color: #00c6ff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 198, 255, 0.2);
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.hero h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 650px;
    margin: 0 auto 40px auto;
}

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

.btn {
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 114, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 114, 255, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* Feature Showcase */
.showcase-container {
    max-width: 1100px;
    margin: 40px auto 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.showcase-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Main Sections */
section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

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

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(0, 120, 215, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

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

/* Steps Showcase */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-top: 40px;
}

.step-row {
    display: flex;
    align-items: center;
    gap: 60px;
}

.step-row:nth-child(even) {
    flex-direction: row-reverse;
}

.step-image {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: block;
    transition: var(--transition);
}

.step-image:hover img {
    transform: scale(1.02);
}

.step-content {
    flex: 1;
}

.step-num {
    font-size: 48px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.8;
}

.step-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

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

/* Video Preview Section */
.video-section {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.video-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    background: #000;
    aspect-ratio: 16/9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Download Section */
.download-section {
    position: relative;
}

.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 40px;
}

.download-box {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    transition: var(--transition);
}

.download-box:hover {
    border-color: var(--border-hover);
    background: linear-gradient(180deg, rgba(0, 120, 215, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    transform: translateY(-4px);
}

.download-box h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.download-box p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
    min-height: 44px;
}

.download-meta {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Specs Block */
.specs-container {
    width: 100%;
    max-width: 800px;
    margin: 80px auto 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 40px;
}

.specs-container h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.specs-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    list-style: none;
    font-size: 14px;
}

.specs-list li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.specs-list li span:first-child {
    color: var(--text-secondary);
}

.specs-list li span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 24px;
    background: var(--bg-secondary);
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

.copyright {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 40px;
    }
    
    .gallery-layout {
        grid-template-columns: 1fr;
    }
    
    .gallery-text {
        padding-right: 0;
        order: -1;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-list {
        grid-template-columns: 1fr;
    }

    /* Mobile Hamburger Menu Layout */
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 24px;
        gap: 32px;
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        width: 100%;
    }

    .nav-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
    }

    .nav-actions button,
    .nav-actions a {
        width: auto;
        justify-content: flex-start;
    }

    /* Page Content Centering on Mobile */
    .step-content {
        text-align: center;
    }
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.sun-icon, .moon-icon {
    display: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

/* Base states: show icon based on active stylesheet classes */
:root.light-theme .sun-icon,
:root:not(.light-theme):not(.dark-theme) .sun-icon {
    display: block;
}
:root.dark-theme .moon-icon,
:root:not(.light-theme):not(.dark-theme) .moon-icon {
    display: block;
}

/* Media query definitions for System state matching prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) .sun-icon {
        display: none;
    }
    :root:not(.light-theme):not(.dark-theme) .moon-icon {
        display: block;
    }
}
@media (prefers-color-scheme: light) {
    :root:not(.light-theme):not(.dark-theme) .sun-icon {
        display: block;
    }
    :root:not(.light-theme):not(.dark-theme) .moon-icon {
        display: none;
    }
}

/* Stacking Steps Layout for Mobile (425px, 375px and below) */
@media (max-width: 500px) {
    .step-row, .step-row:nth-child(even) {
        flex-direction: column;
        gap: 24px;
    }
    
    .step-content {
        order: 1;
        text-align: center;
    }
    
    .step-image {
        order: 2;
        width: 100%;
    }
    
    .step-image img {
        max-width: 100%;
        margin: 0 auto;
    }
}
