@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Цвета НЕ меняем, только прозрачность */
    --bg-glass: rgba(15, 20, 30, 0.7);
    --bg-card: rgba(25, 32, 45, 0.7);
    --bg-card-hover: rgba(35, 45, 60, 0.75);
    --border: rgba(100, 130, 180, 0.12);
    --border-hover: rgba(100, 150, 220, 0.28);
    --text-primary: #e8eef5;
    --text-secondary: #9aa8b8;
    --text-muted: #6a7a8a;
    --accent: #6ba3d6;
    --accent-light: #8bbde8;
    --accent-glow: rgba(107, 163, 214, 0.18);
    --accent-glow-strong: rgba(107, 163, 214, 0.4);
    --success: #5cb87a;
    --glass-blur: 40px;
}

html {
    scroll-behavior: smooth;
}

/* Hide scrollbar */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -ms-overflow-style: none;
    scrollbar-width: none;
    background: #0a0f18;
}

body::-webkit-scrollbar {
    display: none;
}

/* Fixed Background */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.bg-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.1);
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(8, 12, 20, 0.25) 0%,
        rgba(12, 18, 28, 0.15) 30%,
        rgba(10, 15, 25, 0.8) 70%,
        rgba(8, 12, 20, 0.9) 100%
    );
}

/* Свечение для фона */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: 
        radial-gradient(circle at 20% 20%, rgba(107, 163, 214, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(91, 143, 185, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(70, 130, 180, 0.08) 0%, transparent 50%);
    opacity: 0.6;
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Enhanced Glass Effect */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* Navigation */
nav {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
}

.logo img {
    height: 28px;
    width: auto;
}

.logo-text {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-btn {
    background: var(--accent);
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
}

.hero-card {
    text-align: center;
    padding: 48px 50px;
    max-width: 560px;
}

.hero-logo {
    height: 72px;
    width: auto;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -1px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUp 0.5s ease 0.1s forwards;
}

.hero-subtitle {
    font-size: 15px;
    color: var(--accent-light);
    margin-bottom: 10px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUp 0.5s ease 0.15s forwards;
}

.hero-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUp 0.5s ease 0.2s forwards;
}

.hero-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.5s ease 0.25s forwards;
}

.badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(107, 163, 214, 0.08);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 11px;
    color: var(--text-secondary);
}

.badge i {
    color: var(--accent);
    font-size: 10px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    animation: fadeUp 0.5s ease 0.3s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow-strong);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow-strong);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--border-hover);
}

/* Disabled button style */
.btn-disabled {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    pointer-events: none !important;
    opacity: 0.85;
    position: relative;
}

/* Стиль для in-dev текста */
.in-dev-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 2;
}

/* Sections */
.section {
    padding: 40px 20px;
}

.section-card {
    padding: 32px;
}

.section-title {
    text-align: center;
    margin-bottom: 24px;
}

.section-title h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 13px;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    transition: all 0.15s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    background: rgba(107, 163, 214, 0.06);
    transform: translateY(-2px);
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(107, 163, 214, 0.06) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 14px;
}

.feature-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Screenshots */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.screenshot {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 16/10;
    cursor: pointer;
    transition: all 0.15s ease;
}

.screenshot:hover {
    transform: scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.screenshot:hover img {
    transform: scale(1.05);
}

/* Download Section */
.download-section {
    padding: 36px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-logo {
    height: 56px;
    width: auto;
    margin-bottom: 16px;
    position: relative;
}

.download-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.download-section > p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
    position: relative;
}

/* Контейнер для двух кнопок */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
}

.version-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

@media (max-width: 768px) {
    .version-buttons {
        flex-direction: column;
    }
}

.version-btn-wrapper {
    position: relative;
    display: inline-block;
}

.version-btn {
    padding: 12px 24px;
    min-width: 160px;
    font-size: 14px;
    position: relative;
}

/* FIX: Правильные стили для спиннера */
.download-btn {
    padding: 12px 28px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.4s ease;
}

.download-btn:hover::before {
    left: 100%;
}

.version-btn .btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: opacity 0.2s ease;
}

/* FIX: Спиннер всегда скрыт по умолчанию */
.version-btn .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.version-btn.loading .btn-content {
    opacity: 0;
}

.version-btn.loading .spinner {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.download-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
}

.download-info span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
}

.download-info .fa-shield-alt { color: var(--success); }
.download-info .fa-file-archive { color: var(--accent); }

/* Installation */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.step {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    transition: all 0.15s ease;
}

.step:hover {
    border-color: var(--accent);
    background: rgba(107, 163, 214, 0.05);
}

.step-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    font-size: 12px;
}

.step h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
}

.step p {
    font-size: 11px;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 24px 20px;
}

.footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.footer-links {
    display: flex;
    gap: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
}

.footer-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.footer-copy {
    font-size: 11px;
    color: var(--text-muted);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--success);
    font-size: 14px;
}

.toast span {
    font-size: 12px;
    font-weight: 500;
}

/* Scroll Animations */
.animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.05s; }
.animate-delay-2 { transition-delay: 0.1s; }
.animate-delay-3 { transition-delay: 0.15s; }
.animate-delay-4 { transition-delay: 0.2s; }

/* Responsive */
@media (max-width: 768px) {
    nav {
        width: calc(100% - 24px);
        padding: 8px 14px;
        gap: 12px;
        justify-content: space-between;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-card {
        padding: 28px 20px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .features-grid,
    .screenshots-grid,
    .steps {
        grid-template-columns: 1fr;
    }
    
    .section-card {
        padding: 24px 16px;
    }
    
    .footer-card {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .version-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .version-btn {
        min-width: 100%;
    }
}