/* ==========================================================================
   Design System & Styling for MagicToys Landing Page
   ========================================================================== */

/* 1. Theme Variables & Global Setup */
:root[data-theme="dark"] {
    --bg-color: #090D16;
    --text-color: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --card-bg: rgba(15, 23, 42, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(56, 189, 248, 0.35);
    --card-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.55);
    
    --nav-bg: rgba(9, 13, 22, 0.82);
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Vibrant Electric Gradients */
    --gradient-start: #06B6D4; /* Cyan */
    --gradient-mid: #3B82F6;   /* Azure */
    --gradient-end: #8B5CF6;   /* Purple */
    
    --accent-cyan: #06B6D4;
    --accent-blue: #3B82F6;
    --accent-purple: #A855F7;
    --accent-amber: #F59E0B;
    --accent-rose: #F43F5E;
    --accent-emerald: #10B981;
    
    --badge-bg-accent: rgba(6, 182, 212, 0.15);
    --badge-color-accent: #38BDF8;
    --badge-bg-secondary: rgba(255, 255, 255, 0.06);
    --badge-color-secondary: #CBD5E1;
    
    --code-bg: #0d1322;
    --code-border: rgba(255, 255, 255, 0.1);
    --kbd-bg: #1e293b;
    --kbd-border: rgba(255, 255, 255, 0.15);
    --kbd-shadow: rgba(0, 0, 0, 0.5);
    
    --orb-1: rgba(6, 182, 212, 0.12);
    --orb-2: rgba(139, 92, 246, 0.10);
    --orb-3: rgba(59, 130, 246, 0.08);
}

:root[data-theme="light"] {
    --bg-color: #F8FAFC;
    --text-color: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(15, 23, 42, 0.08);
    --card-border-hover: rgba(2, 132, 199, 0.35);
    --card-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.06);
    
    --nav-bg: rgba(248, 250, 252, 0.85);
    --border-color: rgba(15, 23, 42, 0.08);
    
    /* Vibrant Electric Gradients */
    --gradient-start: #0284C7; /* Deep Cyan */
    --gradient-mid: #2563EB;   /* Royal Blue */
    --gradient-end: #7C3AED;   /* Deep Violet */
    
    --accent-cyan: #0284C7;
    --accent-blue: #2563EB;
    --accent-purple: #7C3AED;
    --accent-amber: #D97706;
    --accent-rose: #E11D48;
    --accent-emerald: #059669;
    
    --badge-bg-accent: rgba(2, 132, 199, 0.1);
    --badge-color-accent: #0284C7;
    --badge-bg-secondary: rgba(15, 23, 42, 0.05);
    --badge-color-secondary: #475569;
    
    --code-bg: #EEF2F6;
    --code-border: rgba(15, 23, 42, 0.1);
    --kbd-bg: #E2E8F0;
    --kbd-border: rgba(15, 23, 42, 0.15);
    --kbd-shadow: rgba(0, 0, 0, 0.1);
    
    --orb-1: rgba(2, 132, 199, 0.08);
    --orb-2: rgba(124, 58, 237, 0.06);
    --orb-3: rgba(37, 99, 235, 0.06);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
}

body {
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    line-height: 1.6;
}

/* Ambient Glowing Background Orbs (bounded to prevent horizontal scroll) */
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

body::before {
    top: -50px;
    right: 0;
    width: min(600px, 90vw);
    height: min(600px, 90vw);
    background: radial-gradient(circle, var(--orb-1) 0%, var(--orb-2) 60%, transparent 100%);
}

body::after {
    top: 750px;
    left: 0;
    width: min(550px, 85vw);
    height: min(550px, 85vw);
    background: radial-gradient(circle, var(--orb-3) 0%, var(--orb-1) 60%, transparent 100%);
}

.container {
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}

/* 2. Glassmorphism Utilities */
.glassmorphism {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: 18px;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    width: 100%;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    user-select: none;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-color);
    line-height: 1;
}

.logo-tagline {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* Desktop Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14.5px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-color);
}

/* Nav Actions (GitHub & Theme Toggle) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-action-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s ease;
}

:root[data-theme="light"] .nav-action-btn {
    background: rgba(15, 23, 42, 0.04);
}

.nav-action-btn:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.1);
}

.github-svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

/* Theme Switcher Button */
.theme-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s ease;
}

:root[data-theme="light"] .theme-btn {
    background: rgba(15, 23, 42, 0.04);
}

.theme-btn:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.1);
}

.theme-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.theme-icon.hide {
    display: none;
}

/* 4. Hero Section */
.hero-section {
    padding-top: 150px;
    padding-bottom: 50px;
    text-align: center;
}

.hero-container {
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.badge {
    padding: 5px 13px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-accent {
    background: var(--badge-bg-accent);
    color: var(--badge-color-accent);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.badge-secondary {
    background: var(--badge-bg-secondary);
    color: var(--badge-color-secondary);
    border: 1px solid var(--border-color);
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(36px, 5.5vw, 62px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.2px;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(16px, 2.2vw, 18.5px);
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 34px;
}

.inline-explore-link {
    color: var(--gradient-start);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.inline-explore-link:hover {
    color: var(--gradient-mid);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Installation Terminal Box */
.install-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 12px;
    padding: 10px 14px 10px 18px;
    max-width: 100%;
    width: 540px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    margin-bottom: 30px;
    gap: 12px;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease;
}

.install-box:hover {
    border-color: var(--gradient-start);
}

.install-code-group {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.terminal-prompt {
    color: var(--gradient-start);
    font-weight: bold;
    user-select: none;
}

#install-command {
    color: var(--text-color);
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#install-command::-webkit-scrollbar {
    display: none;
}

/* Copy Button inside Terminal Box */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 7px 13px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    border-color: var(--gradient-start);
    color: var(--text-color);
}

.copy-btn.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10B981;
    color: #10B981;
}

.copy-svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.download-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Button UI Components */
.btn {
    text-decoration: none;
    padding: 13px 28px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    opacity: 0.95;
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-secondary);
}

/* 5. Section Headers */
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px auto;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gradient-start);
    margin-bottom: 10px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(26px, 3.8vw, 38px);
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 15.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Keyboard Tag (<kbd>) Styling */
kbd {
    background: var(--kbd-bg);
    border: 1px solid var(--kbd-border);
    border-bottom: 2px solid var(--kbd-border);
    box-shadow: 0 1px 2px var(--kbd-shadow);
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--text-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    vertical-align: middle;
}

/* 7. Core Tools Section */
.powertoys-section {
    padding: 70px 0;
}

.powertoys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.powertoys-card {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.powertoys-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-border-hover);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-cyan {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.icon-amber {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.icon-purple {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.icon-rose {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.tool-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--badge-bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.powertoys-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-color);
}

.shortcut-pill {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.powertoys-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* 8. Why MagicToys Features Grid */
.all-features-section {
    padding: 70px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 22px;
}

.feature-card {
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.feature-icon {
    font-size: 28px;
    line-height: 1;
}

.feature-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.feature-description {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* 9. Packages Download Section */
.packages-section {
    padding: 70px 0;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.package-card {
    padding: 30px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.package-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-border-hover);
}

.package-icon {
    font-size: 36px;
    line-height: 1;
}

.package-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
}

.package-file {
    font-size: 12px;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    padding: 3px 9px;
    border-radius: 6px;
    color: var(--gradient-start);
    font-family: 'JetBrains Mono', monospace;
}

.package-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.btn-sm {
    padding: 9px 18px;
    font-size: 13px;
    width: 100%;
    margin-top: 6px;
}

/* 10. FAQ Section */
.faq-section {
    padding: 70px 0 100px 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 820px;
    margin: 0 auto;
}

.faq-item {
    padding: 24px 28px;
}

.faq-item:hover {
    border-color: var(--card-border-hover);
}

.faq-question {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.faq-answer {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.faq-answer code {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 13px;
    color: var(--gradient-start);
    font-family: 'JetBrains Mono', monospace;
}

/* 11. Footer Section */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 36px 0;
    background: var(--nav-bg);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
}

.footer-license {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.footer-license a {
    color: var(--text-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

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

/* Tablet Navigation Scaling (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 28px;
    }
    .nav-links {
        gap: 18px;
    }
    .nav-link {
        font-size: 14px;
    }
}

/* ==========================================================================
   Mobile Responsive Styles (<= 768px)
   Strict Requirement:
   In navbar on mobile: ONLY logo + name on left, github icon + theme toggle on right.
   ========================================================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
        width: 100%;
    }

    /* Fixed Single-Row Header with generous inset from screen edges */
    .header-container {
        height: 60px;
        padding: 0 4px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        width: 100%;
    }

    .logo-group {
        gap: 10px;
        align-items: center;
    }

    .logo-img {
        width: 28px;
        height: 28px;
    }

    .logo-text {
        font-size: 17px;
        font-weight: 700;
        line-height: 1;
    }

    .logo-tagline {
        display: none;
    }

    /* Hide desktop nav links entirely on mobile */
    .nav-links {
        display: none !important;
    }

    /* Nav actions: GitHub icon + Theme toggle only */
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .github-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
    }

    .github-label {
        display: none;
    }

    .theme-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
    }

    /* Hero Section */
    .hero-section {
        padding-top: 86px;
        padding-bottom: 36px;
    }

    .badge-row {
        gap: 6px;
        margin-bottom: 18px;
    }

    .badge {
        padding: 4px 10px;
        font-size: 11px;
    }

    .hero-title {
        font-size: clamp(28px, 7.5vw, 36px);
        letter-spacing: -0.6px;
        line-height: 1.15;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 14.5px;
        line-height: 1.55;
        margin-bottom: 22px;
    }

    .inline-explore-link {
        display: inline-flex;
        margin-top: 4px;
    }

    .install-box {
        font-size: 12px;
        padding: 8px 10px 8px 12px;
        gap: 8px;
        margin-bottom: 20px;
        width: 100%;
        border-radius: 10px;
    }

    #install-command {
        font-size: 12px;
    }

    .copy-btn {
        padding: 5px 9px;
        font-size: 11px;
        border-radius: 6px;
        gap: 4px;
    }

    .download-row {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 10px;
    }

    .powertoys-section,
    .all-features-section,
    .packages-section,
    .faq-section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .powertoys-grid,
    .features-grid,
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .powertoys-card,
    .feature-card,
    .package-card,
    .faq-item {
        padding: 20px 16px;
        border-radius: 14px;
    }
}


