:root {
    --bg-dark: #FAFBFE;
    --bg-secondary: #F0F4F8;
    --bg-card: rgba(255, 255, 255, 0.6);
    --card-border: rgba(91, 164, 230, 0.12);
    --border: rgba(91, 164, 230, 0.18);
    --glass-bg: rgba(255, 255, 255, 0.72);
    
    --primary: #5BA4E6;
    --primary-hover: #4A93D5;
    --accent: #5BA4E6;
    --accent-glow: rgba(91, 164, 230, 0.15);
    
    --text-main: #1A1D2E;
    --text-muted: #5A6178;
    
    --green: #22c55e;
    --red: #ef4444;
    --blue: #5BA4E6;
    --yellow: #eab308;
    
    --shadow-color: rgba(91, 164, 230, 0.4);
    --shadow-color-strong: rgba(91, 164, 230, 0.6);
}

[data-theme="dark"] {
    --bg-dark: #0F1117;
    --bg-secondary: #1A1D27;
    --bg-card: rgba(26, 29, 39, 0.6);
    --card-border: rgba(107, 179, 240, 0.1);
    --border: rgba(107, 179, 240, 0.12);
    --glass-bg: rgba(15, 17, 23, 0.78);
    
    --primary: #6BB3F0;
    --primary-hover: #7EC0F7;
    --accent: #7EC0F7;
    --accent-glow: rgba(107, 179, 240, 0.12);
    
    --text-main: #E8ECF4;
    --text-muted: #8B92A8;
    
    --blue: #6BB3F0;
    
    --shadow-color: rgba(107, 179, 240, 0.3);
    --shadow-color-strong: rgba(107, 179, 240, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
}

body {
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.1;
}

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

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    cursor: pointer;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 0;
}

.brand .letter {
    display: inline-block;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 1em;
    opacity: 1;
    overflow: hidden;
    white-space: nowrap;
}

.brand .letter.collapsible {
    max-width: 0.9em;
}

#navbar.scrolled .brand .letter.collapsible {
    max-width: 0;
    opacity: 0;
    margin: 0;
}

#navbar.scrolled .brand .brand-n {
    text-transform: uppercase;
}

.brand .brand-dot {
    color: var(--accent);
    margin-left: 1px;
}

.brand-divider {
    margin: 0 10px;
    color: var(--border);
    font-weight: 400;
}

.brand-product {
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.nav-btn {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 99px;
    background: rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.1);
}

.btn-primary {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    color: var(--text-main);
}

.btn-primary:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
    color: var(--accent);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-support {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 10px 20px;
    margin-top: 15px;
}
.btn-support:hover {
    transform: translateY(-2px);
    border-color: var(--yellow);
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.3);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 5% 40px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Background Glow */
.hero::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.phone-mockup {
    width: 500px;
    height: 250px;
    background: #111;
    border-radius: 30px;
    border: 8px solid #222;
    box-shadow: 20px 30px 60px rgba(0,0,0,0.5), 0 0 40px var(--shadow-color);
    transform: rotateY(-15deg) rotateX(5deg);
    position: relative;
    overflow: hidden;
}

.mockup-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #0a0a0f);
    position: relative;
}

.mockup-ui {
    position: absolute;
    inset: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.m-dpad {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.m-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    transform: rotate(45deg);
}

.m-buttons span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0.8;
}

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

.section-title {
    font-size: 3rem;
    margin-bottom: 60px;
    text-align: center;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(40, 40, 55, 0.5);
}

.f-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

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

/* How it Works */
.steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    z-index: -1;
}

.step {
    flex: 1;
    text-align: center;
    background: var(--bg-dark);
    padding: 0 10px;
}

.step-num {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 20px;
    color: var(--primary);
    box-shadow: 0 0 20px var(--shadow-color);
}

.step h3 {
    margin-bottom: 10px;
}

.step p {
    color: var(--text-muted);
}

/* Download Section */
.download-section {
    background: linear-gradient(180deg, var(--bg-dark), var(--bg-secondary));
}

.download-container {
    text-align: center;
    padding: 120px 24px;
}

.download-container h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.download-container p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.support-box {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.support-box.visible {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

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

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        margin-bottom: 60px;
    }
    
    .hero-actions {
        display: flex;
        justify-content: center;
    }
    
    .phone-mockup {
        width: 100%;
        max-width: 400px;
        height: 200px;
        transform: none;
    }
    
    .steps {
        flex-direction: column;
        gap: 50px;
    }
    
    .steps::before {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
}

/* Theme Toggle Button SVGs */
.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--text-main);
}
.theme-toggle-btn svg {
    transition: transform var(--transition-fast);
}
:root .sun-icon {
    display: none;
}
:root .moon-icon {
    display: block;
}
[data-theme="dark"] .sun-icon {
    display: block;
}
[data-theme="dark"] .moon-icon {
    display: none;
}

/* ===========================================
   Guide Layout & Typography
   =========================================== */

.guide-layout {
    display: flex;
    max-width: 1200px;
    margin: 70px auto 0; /* Flush with navbar */
    padding: 0 24px;
    gap: 60px;
    align-items: flex-start;
    min-height: calc(100vh - 70px);
}

.guide-sidebar {
    width: 260px;
    flex-shrink: 0;
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
    border-right: 1px solid var(--border);
    padding: 40px 20px 40px 0;
    overflow-y: auto;
}

/* Scrollbar for sidebar */
.guide-sidebar::-webkit-scrollbar {
    width: 6px;
}
.guide-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.sidebar-sticky {
    /* No longer a card, just a wrapper inside the scrollable sidebar */
}

.sidebar-sticky h3 {
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 4px;
    display: block;
    transition: background 0.15s ease, color 0.15s ease;
    border-left: 2px solid transparent;
}

.sidebar-link:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.guide-content {
    flex: 1;
    min-width: 0;
    padding: 40px 0 80px 0;
    max-width: 800px;
}

.guide-title {
    font-size: 3rem;
    margin-bottom: 16px;
}

.guide-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 60px;
    line-height: 1.6;
}

.guide-section {
    margin-bottom: 80px;
}

.guide-section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
}

.guide-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.guide-card {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.guide-card h4 {
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 1.1rem;
}

.guide-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.guide-card p + p {
    margin-top: 12px;
}

.guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.guide-subcard {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    padding: 24px;
    border-radius: 12px;
}

.guide-subcard h4 {
    margin-bottom: 12px;
}

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

.guide-list li {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    color: var(--text-muted);
    line-height: 1.6;
}

.guide-list li b {
    color: var(--text-main);
    margin-right: 8px;
}

.warning-card {
    border-left: 4px solid #ff4444;
}

.warning-card ol {
    margin-top: 16px;
    padding-left: 24px;
    color: var(--text-muted);
}

.warning-card ol li {
    margin-bottom: 8px;
}

@media (max-width: 900px) {
    .guide-layout {
        flex-direction: column;
        margin-top: 80px;
        gap: 40px;
    }
    
    .guide-sidebar {
        width: 100%;
        border-bottom: 1px solid var(--card-border);
        padding-bottom: 20px;
    }
    
    .sidebar-sticky {
        position: static;
    }
    
    .guide-grid {
        grid-template-columns: 1fr;
    }
    
    .guide-title {
        font-size: 2.2rem;
    }
}
