/* ==========================================
   0xAddress - Main Styles
   ========================================== */

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-lighter: #252542;
    --text: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #6b7280;
    --border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Light Mode */
body.light-mode {
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --bg-lighter: #eef1f5;
    --text: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}
body.light-mode .bg-grid {
    background-image: linear-gradient(rgba(102, 126, 234, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.08) 1px, transparent 1px);
}
body.light-mode .bg-glow { opacity: 0.05; }
body.light-mode nav { background: rgba(255, 255, 255, 0.9); }
body.light-mode .code-block { background: #1e293b; }

/* Background Effects */
.bg-grid {
    position: fixed; inset: 0;
    background-image: linear-gradient(rgba(102, 126, 234, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none; z-index: 0;
}
.bg-glow {
    position: fixed; width: 600px; height: 600px; border-radius: 50%;
    filter: blur(150px); opacity: 0.15; pointer-events: none; z-index: 0;
}
.bg-glow-1 { top: -200px; right: -200px; background: var(--primary); }
.bg-glow-2 { bottom: -200px; left: -200px; background: var(--secondary); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* Navigation */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 16px 0; background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.5rem; text-decoration: none; color: var(--text); }
.logo-icon {
    width: 40px; height: 40px; background: var(--gradient); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: white;
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-controls { display: flex; align-items: center; gap: 12px; }
.nav-btn {
    background: none; border: 1px solid var(--border); color: var(--text-secondary);
    padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
    transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.nav-btn:hover { background: var(--bg-lighter); color: var(--text); }
.nav-cta {
    background: var(--gradient); color: white; padding: 10px 20px; border-radius: 8px;
    font-weight: 600; font-size: 14px; cursor: pointer; border: none;
    font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4); }

/* Install Panel */
.install-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px); z-index: 2000;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.install-overlay.active { opacity: 1; visibility: visible; }
.install-panel {
    position: fixed; top: 0; right: -420px; width: 400px; max-width: 90vw; height: 100vh;
    background: var(--bg-card); border-left: 1px solid var(--border); z-index: 2001;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
}
.install-panel.active { right: 0; }
.install-panel-header {
    padding: 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.install-panel-header h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.install-panel-close {
    background: var(--bg-lighter); border: 1px solid var(--border); color: var(--text-secondary);
    width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 18px;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.install-panel-close:hover { background: var(--bg-lighter); color: var(--text); }
.install-panel-content { flex: 1; padding: 24px; overflow-y: auto; }
.install-panel-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.install-option {
    display: flex; align-items: center; gap: 16px; padding: 20px;
    background: var(--bg-lighter); border: 1px solid var(--border); border-radius: 16px;
    margin-bottom: 12px; text-decoration: none; color: var(--text);
    transition: all 0.25s; position: relative; overflow: hidden;
}
.install-option:hover { border-color: var(--primary); transform: translateX(-4px); }
.install-option.featured { border-color: var(--success); background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent); }
.install-option.featured::before {
    content: 'RECOMENDADO'; position: absolute; top: 0; right: 0;
    background: var(--success); color: white; font-size: 9px; font-weight: 700;
    padding: 4px 10px; border-radius: 0 16px 0 8px; letter-spacing: 0.5px;
}
.install-icon {
    width: 52px; height: 52px; background: var(--bg); border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0;
}
.install-info { flex: 1; }
.install-info h4 { font-size: 1rem; margin-bottom: 4px; font-weight: 600; }
.install-info p { color: var(--text-secondary); font-size: 13px; margin: 0; }
.install-arrow { color: var(--text-muted); font-size: 20px; transition: all 0.2s; }
.install-option:hover .install-arrow { transform: translateX(4px); color: var(--primary); }
.install-panel-footer { padding: 20px 24px; border-top: 1px solid var(--border); text-align: center; }
.install-panel-footer a { color: var(--text-secondary); font-size: 13px; text-decoration: none; }
.install-panel-footer a:hover { color: var(--primary); }

/* SIDEBAR INSTALL BUTTON - Fixed Right Side */
.sidebar-install-wrapper {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}

.sidebar-install {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--gradient);
    color: white;
    padding: 20px 10px;
    border-radius: 16px 0 0 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -6px 0 30px rgba(102, 126, 234, 0.5);
    min-height: 380px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    animation: sidebarAttention 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.sidebar-install::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
    border-radius: 16px 0 0 16px;
}

.sidebar-install:hover {
    padding-right: 16px;
    box-shadow: -10px 0 40px rgba(102, 126, 234, 0.7);
    animation: none;
}

@keyframes sidebarAttention {
    0%, 100% { transform: translateX(0); box-shadow: -6px 0 30px rgba(102, 126, 234, 0.5); }
    25% { transform: translateX(-8px); box-shadow: -10px 0 35px rgba(102, 126, 234, 0.7); }
    50% { transform: translateX(-4px); box-shadow: -8px 0 32px rgba(102, 126, 234, 0.6); }
    75% { transform: translateX(-6px); box-shadow: -9px 0 34px rgba(102, 126, 234, 0.65); }
}

.sidebar-install-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.sidebar-install-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
}

.sidebar-click-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar-click-icon {
    font-size: 20px;
    animation: clickBounce 1.2s ease-in-out infinite;
}

@keyframes clickBounce {
    0%, 100% { transform: rotate(-90deg) translateX(0) scale(1); opacity: 0.9; }
    50% { transform: rotate(-90deg) translateX(-5px) scale(1.1); opacity: 1; }
}

.sidebar-click-text {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.sidebar-install-arrow {
    font-size: 18px;
    animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { transform: rotate(-90deg) translateX(0); opacity: 0.7; }
    50% { transform: rotate(-90deg) translateX(-6px); opacity: 1; }
}

.sidebar-glow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(255,255,255,0.4);
    animation: glowLine 2s ease-in-out infinite;
}

@keyframes glowLine {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@media (max-width: 1200px) {
    .sidebar-install-wrapper { display: none; }
}

/* Hero Section */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(102, 126, 234, 0.1); border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 8px 16px; border-radius: 100px; font-size: 13px; margin-bottom: 24px; color: var(--primary);
}
.hero-badge .dot { background: var(--success); width: 8px; height: 8px; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.1; margin-bottom: 24px; }
.hero h1 .gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.7; }
.hero-quote {
    background: var(--bg-card); border-left: 3px solid var(--primary);
    padding: 16px 20px; margin-bottom: 28px; border-radius: 0 12px 12px 0;
}
.hero-quote p { font-style: italic; color: var(--text-secondary); font-size: 14px; }
.hero-quote strong { color: var(--warning); }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
    border-radius: 12px; font-size: 15px; font-weight: 600; text-decoration: none;
    transition: all 0.2s; cursor: pointer; border: none; font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--gradient); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4); }
.btn-secondary { background: var(--bg-lighter); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); }

/* Wallet Preview */
.hero-visual { position: relative; display: flex; align-items: center; gap: 0; }
.wallet-preview {
    background: var(--bg-card); border-radius: 24px; padding: 24px;
    border: 1px solid var(--border); box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg); transition: transform 0.3s;
    flex: 1;
}
.wallet-preview:hover { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); }
.wallet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.wallet-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; }
.wallet-logo .logo-icon { width: 32px; height: 32px; font-size: 11px; }
.wallet-network {
    display: flex; align-items: center; gap: 8px;
    background: rgba(16, 185, 129, 0.1); padding: 6px 12px; border-radius: 20px;
    font-size: 12px; color: var(--success); font-weight: 500;
}
.wallet-address-display { text-align: center; margin-bottom: 24px; }
.wallet-avatar {
    width: 80px; height: 80px; background: var(--gradient); border-radius: 50%;
    margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: white;
}
.wallet-addr { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--text-secondary); }
.wallet-balance { text-align: center; padding: 24px; background: var(--bg-lighter); border-radius: 16px; margin-bottom: 20px; }
.balance-amount { font-size: 2.2rem; font-weight: 700; }
.balance-usd { color: var(--text-secondary); font-size: 14px; }
.wallet-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wallet-action {
    background: var(--bg-lighter); padding: 16px; border-radius: 12px;
    text-align: center; transition: all 0.2s; cursor: pointer;
}
.wallet-action:hover { background: var(--bg); transform: translateY(-2px); }
.wallet-action-icon { font-size: 24px; margin-bottom: 8px; }
.wallet-action-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

/* Floating Badges */
.floating-badge {
    position: absolute; background: var(--bg-card); border: 1px solid var(--border);
    padding: 12px 16px; border-radius: 12px; font-size: 13px;
    display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow);
    animation: float 4s ease-in-out infinite;
}
.floating-badge.top-right { top: -20px; right: 60px; }
.floating-badge.bottom-left { bottom: 40px; left: -40px; animation-delay: -2s; }
.floating-badge .check { color: var(--success); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Sections */
section { padding: 100px 0; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.section-badge {
    display: inline-block; background: rgba(102, 126, 234, 0.1); color: var(--primary);
    padding: 8px 16px; border-radius: 100px; font-size: 13px; font-weight: 600;
    margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px;
}
.section-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; }
.section-header p { color: var(--text-secondary); font-size: 1.1rem; }

/* Quickstart */
.quickstart { background: linear-gradient(180deg, transparent, rgba(102, 126, 234, 0.03), transparent); }
.role-selector { display: flex; justify-content: center; gap: 16px; margin-bottom: 48px; }
.role-tab {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: var(--bg-card); border: 2px solid var(--border); border-radius: 20px;
    padding: 24px 48px; cursor: pointer; transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}
.role-tab:hover { border-color: var(--primary); transform: translateY(-4px); }
.role-tab.active { 
    border-color: var(--primary); 
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}
.role-icon { font-size: 32px; }
.role-label { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.role-desc { font-size: 13px; color: var(--text-secondary); }
.steps-container { transition: opacity 0.3s, transform 0.3s; }
.steps-container.hidden { display: none; }
.dev-note {
    display: flex; align-items: flex-start; gap: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 16px;
    padding: 20px 24px; margin-top: 32px;
}
.dev-note-icon { font-size: 28px; }
.dev-note-content strong { display: block; margin-bottom: 6px; color: var(--success); }
.dev-note-content p { color: var(--text-secondary); font-size: 14px; margin: 0; }
.dev-note-content code { 
    background: var(--bg-lighter); padding: 2px 8px; border-radius: 4px; 
    font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--primary);
}
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
    padding: 32px; text-align: center; transition: all 0.3s;
}
.step-card:hover { border-color: var(--primary); transform: translateY(-6px); }
.step-number {
    width: 60px; height: 60px; background: var(--gradient); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; margin: 0 auto 20px;
    font-family: 'JetBrains Mono', monospace;
}
.step-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.step-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.step-card .btn { width: 100%; }
.step-time { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 13px; font-weight: 500; margin-top: 16px; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; padding: 32px; transition: all 0.3s;
}
.feature-card:hover {
    border-color: var(--primary); transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}
.feature-icon-box {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.feature-card h4 { font-size: 1.1rem; margin-bottom: 12px; font-weight: 600; }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* Why Section */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.why-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; transition: all 0.3s; }
.why-card:hover { transform: translateY(-4px); }
.why-card.danger { border-color: rgba(239, 68, 68, 0.3); }
.why-card.success { border-color: rgba(16, 185, 129, 0.3); }
.why-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 20px; }
.why-card.danger .why-icon { background: rgba(239, 68, 68, 0.1); }
.why-card.success .why-icon { background: rgba(16, 185, 129, 0.1); }
.why-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.why-card > p { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.why-list { list-style: none; }
.why-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14px; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.why-list li:last-child { border-bottom: none; }
.why-card.danger .icon-mark { color: #ef4444; }
.why-card.success .icon-mark { color: var(--success); }

/* Use Cases */
.usecases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.usecase-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; transition: all 0.3s; }
.usecase-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.usecase-header { padding: 24px 32px; background: var(--gradient); color: white; }
.usecase-header h3 { font-size: 1.4rem; display: flex; align-items: center; gap: 12px; }
.usecase-body { padding: 32px; }
.usecase-body > p { color: var(--text-secondary); margin-bottom: 24px; }
.usecase-features { list-style: none; }
.usecase-features li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.usecase-features li:last-child { border-bottom: none; }
.usecase-features .check { color: var(--success); font-size: 18px; flex-shrink: 0; }
.usecase-features strong { display: block; margin-bottom: 4px; }
.usecase-features span { color: var(--text-secondary); font-size: 13px; }

/* Training Center */
.training-section { background: linear-gradient(180deg, rgba(16, 185, 129, 0.02), transparent, rgba(102, 126, 234, 0.02)); }
.training-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; }
.training-content { display: grid; grid-template-columns: 1fr 1fr; }
.training-text { padding: 48px; }
.training-text h2 { font-size: 2rem; margin-bottom: 16px; }
.training-text > p { color: var(--text-secondary); margin-bottom: 28px; line-height: 1.7; }
.training-features { list-style: none; margin-bottom: 32px; }
.training-features li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.training-features li:last-child { border-bottom: none; }
.training-check {
    width: 24px; height: 24px; background: rgba(16, 185, 129, 0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--success); font-size: 12px; flex-shrink: 0; margin-top: 2px;
}
.training-feature-text strong { display: block; margin-bottom: 4px; font-size: 15px; }
.training-feature-text span { color: var(--text-secondary); font-size: 13px; }
.training-visual {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(102, 126, 234, 0.1));
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px; position: relative; overflow: hidden;
}
.training-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}
.training-cards-preview { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 320px; }
.training-preview-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 20px; transition: all 0.3s;
    animation: cardFloat 4s ease-in-out infinite;
}
.training-preview-card:nth-child(2) { animation-delay: -1.5s; }
.training-preview-card:hover { transform: translateY(-4px) scale(1.02); border-color: var(--success); }
@keyframes cardFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.preview-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.preview-card-title { display: flex; align-items: center; gap: 10px; }
.preview-card-icon {
    width: 36px; height: 36px; background: var(--gradient);
    border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.preview-card-title h4 { font-size: 14px; font-weight: 600; }
.preview-card-badge {
    background: rgba(16, 185, 129, 0.1); color: var(--success);
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.preview-card-desc { color: var(--text-secondary); font-size: 12px; margin-bottom: 12px; line-height: 1.5; }
.preview-card-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.preview-tag {
    background: var(--bg-lighter); padding: 4px 10px; border-radius: 6px;
    font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
}

/* Developer Section */
.developer-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; }
.developer-content { display: grid; grid-template-columns: 1fr 1fr; }
.developer-text { padding: 48px; }
.developer-text h2 { font-size: 2rem; margin-bottom: 16px; }
.developer-text > p { color: var(--text-secondary); margin-bottom: 28px; }
.developer-steps { list-style: none; margin-bottom: 24px; }
.developer-steps li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.developer-steps li:last-child { border-bottom: none; }
.dev-step-num { 
    width: 32px; height: 32px; background: var(--gradient); color: white; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    font-weight: 700; font-size: 14px; flex-shrink: 0; 
}
.dev-step-text strong { display: block; margin-bottom: 4px; }
.dev-step-text span { color: var(--text-secondary); font-size: 13px; }
.code-block { background: #0d0d15; display: flex; flex-direction: column; }
.code-header { 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 14px 20px; background: rgba(255, 255, 255, 0.02); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
}
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 12px; height: 12px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27ca40; }
.code-title { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #a0aec0; }
.code-copy { 
    background: none; border: none; color: #a0aec0; cursor: pointer; 
    padding: 6px 10px; border-radius: 6px; font-size: 12px; 
    font-family: 'Inter', sans-serif; transition: all 0.2s; 
}
.code-copy:hover { background: rgba(255, 255, 255, 0.1); color: white; }
.code-content { padding: 24px; overflow-x: auto; flex: 1; }
.code-content pre { font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.7; color: #e5e7eb; }
.comment { color: #6b7280; }
.keyword { color: #c084fc; }
.string { color: #86efac; }
.function { color: #60a5fa; }
.property { color: #fbbf24; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.faq-item:hover { border-color: var(--primary); }
.faq-item h4 { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 12px; }
.faq-q { 
    width: 24px; height: 24px; background: var(--gradient); color: white; 
    border-radius: 6px; display: flex; align-items: center; justify-content: center; 
    font-size: 12px; font-weight: 700; flex-shrink: 0; 
}
.faq-item p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; padding-left: 36px; }

/* CTA Final */
.cta-final { padding: 100px 0; }
.cta-card { 
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05)); 
    border: 1px solid rgba(102, 126, 234, 0.3); border-radius: 24px; 
    padding: 60px; text-align: center; 
}
.cta-card h2 { font-size: 2.5rem; margin-bottom: 16px; }
.cta-card p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Footer */
footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 60px 0 30px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--text-secondary); font-size: 14px; margin-top: 16px; max-width: 280px; }
.footer-links h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; color: var(--text-muted); }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; border-top: 1px solid var(--border); }
.footer-bottom p { color: var(--text-muted); font-size: 13px; }
.social-links { display: flex; gap: 10px; }
.social-links a { 
    width: 38px; height: 38px; background: var(--bg-lighter); 
    border: 1px solid var(--border); border-radius: 10px; 
    display: flex; align-items: center; justify-content: center; 
    color: var(--text-secondary); text-decoration: none; font-size: 14px; 
}
.social-links a:hover { background: var(--gradient); border-color: transparent; color: white; }

/* Animations */
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-buttons { justify-content: center; }
    .hero-visual { max-width: 450px; margin: 40px auto 0; justify-content: center; }
    .floating-badge { display: none; }
    .steps-grid, .features-grid { grid-template-columns: repeat(2, 1fr); }
    .role-tab { padding: 20px 32px; }
    .developer-content { grid-template-columns: 1fr; }
    .training-content { grid-template-columns: 1fr; }
    .training-visual { min-height: 300px; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .section-header h2 { font-size: 2rem; }
    .steps-grid, .features-grid, .why-grid, .usecases-grid, .faq-grid { grid-template-columns: 1fr; }
    .role-selector { flex-direction: column; }
    .role-tab { width: 100%; padding: 16px 20px; flex-direction: row; justify-content: flex-start; gap: 16px; }
    .dev-note { flex-direction: column; text-align: center; }
    .cta-card { padding: 40px 24px; }
    .footer-content { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    .training-text { padding: 32px; }
    .training-visual { padding: 32px; }
}

.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }
@media (max-width: 768px) { .mobile-menu-btn { display: block; } }

/* ==========================================
   Code Downloads Section
   ========================================== */
.downloads-section {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.02), transparent, rgba(118, 75, 162, 0.02));
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.download-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2);
}

.download-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-lighter);
}

.download-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-card:hover .download-card-image img {
    transform: scale(1.08) rotate(2deg);
}

.download-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
}

.download-card:hover .download-card-overlay {
    opacity: 1;
}

.download-card-overlay-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.download-card-content {
    padding: 24px;
}

.download-card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.download-tag {
    background: var(--bg-lighter);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.download-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-card-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.download-card-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.download-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.download-card-info {
    display: flex;
    gap: 16px;
}

.download-card-info span {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.download-card-arrow {
    width: 36px;
    height: 36px;
    background: var(--bg-lighter);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.download-card:hover .download-card-arrow {
    background: var(--gradient);
    color: white;
    transform: translateX(4px);
}

/* Download Modal/Popup */
.download-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.download-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.download-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.download-modal-overlay.active .download-modal {
    transform: scale(1) translateY(0);
}

.download-modal-header {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.download-modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.download-modal-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, var(--bg-card) 100%);
}

.download-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.download-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.download-modal-badge {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    z-index: 10;
}

.download-modal-badge .download-tag {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    color: white;
}

.download-modal-content {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.download-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.download-modal-title-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.download-modal-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 28px;
}

.download-modal-section {
    margin-bottom: 28px;
}

.download-modal-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-modal-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.download-modal-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-lighter);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.download-modal-feature-check {
    color: var(--success);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.download-modal-tech {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-modal-tech-tag {
    background: var(--gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.download-modal-meta {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: var(--bg-lighter);
    border-radius: 14px;
    margin-bottom: 28px;
}

.download-modal-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.download-modal-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.download-modal-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.download-modal-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.download-modal-actions .btn {
    flex: 1;
    min-width: 180px;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .downloads-grid {
        grid-template-columns: 1fr;
    }
    
    .download-modal-header {
        height: 200px;
    }
    
    .download-modal-features {
        grid-template-columns: 1fr;
    }
    
    .download-modal-meta {
        flex-direction: column;
        gap: 16px;
    }
    
    .download-modal-actions {
        flex-direction: column;
    }
    
    .download-modal-actions .btn {
        width: 100%;
    }
}