/* ===== BASE STYLES ===== */
:root {
    --primary: #3182ce;
    --primary-dark: #2c5282;
    --secondary: #00b5d8;
    --secondary-dark: #00a3c4;
    --dark: #0a0e17;
    --dark-light: #1a202c;
    --light: #e2e8f0;
    --light-gray: #a0aec0;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--dark-light);
    color: var(--light);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--light);
}

.btn-outline:hover {
    background-color: var(--light);
    color: var(--dark);
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

/* ===== NAVBAR ===== */
.navbar {
    background-color: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
}

.nav-brand i {
    color: var(--primary);
    font-size: 28px;
}

.brand-accent {
    color: var(--secondary);
}

.version {
    font-size: 12px;
    background: var(--gradient);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--light-gray);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.telegram-link {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
}

.telegram-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    background: radial-gradient(circle at 20% 50%, rgba(49, 130, 206, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 181, 216, 0.1) 0%, transparent 50%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.2rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

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

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.phone-mockup {
    position: relative;
    perspective: 1000px;
}

.phone-screen {
    background: var(--dark-light);
    border-radius: 30px;
    padding: 30px 20px;
    width: 300px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: var(--transition);
}

.phone-mockup:hover .phone-screen {
    transform: rotateY(0) rotateX(0);
}

.app-interface {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-radius: 20px;
    padding: 20px;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.app-header {
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    color: var(--secondary);
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.app-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.app-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.app-feature.active {
    background: rgba(49, 130, 206, 0.15);
    border-left-color: var(--primary);
}

.app-feature i {
    font-size: 24px;
    color: var(--primary);
    width: 30px;
}

.app-feature span {
    font-weight: 500;
}

/* ===== SECTIONS COMMON ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.version-badge {
    font-size: 1rem;
    background: var(--gradient);
    padding: 5px 15px;
    border-radius: 20px;
    margin-left: 10px;
    vertical-align: middle;
}

.section-subtitle {
    color: var(--light-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== FEATURES ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--primary);
}

.feature-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-title .badge {
    background: rgba(56, 161, 105, 0.2);
    color: var(--success);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.feature-description {
    color: var(--light-gray);
    margin-bottom: 20px;
}

.feature-details {
    list-style: none;
}

.feature-details li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--light);
}

.feature-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* ===== ROADMAP ===== */
.roadmap-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.roadmap-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient);
}

.roadmap-item {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
}

.roadmap-icon {
    width: 60px;
    height: 60px;
    background: var(--dark-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    flex-shrink: 0;
    z-index: 1;
    border: 3px solid var(--dark);
}

.roadmap-content {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    padding: 25px;
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.roadmap-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.status.planned {
    background: rgba(214, 158, 46, 0.2);
    color: var(--warning);
}

.status.in-progress {
    background: rgba(49, 130, 206, 0.2);
    color: var(--primary);
}

.status.completed {
    background: rgba(56, 161, 105, 0.2);
    color: var(--success);
}

.roadmap-description {
    color: var(--light-gray);
}

/* ===== DOWNLOAD ===== */
.download-card {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    padding: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.download-text {
    color: var(--light-gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.requirements {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}

.requirements h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.requirements ul {
    list-style: none;
    padding-left: 20px;
}

.requirements li {
    padding: 5px 0;
    position: relative;
}

.requirements li::before {
    content: '•';
    color: var(--primary);
    font-size: 20px;
    position: absolute;
    left: -15px;
}

.download-actions {
    text-align: center;
}

.file-size {
    margin-top: 10px;
    color: var(--light-gray);
    font-size: 14px;
}

.additional-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(49, 130, 206, 0.1);
    transform: translateX(5px);
}

.social-link i {
    color: var(--primary);
    font-size: 20px;
}

/* ===== КОМПАКТНЫЙ ПОДВАЛ ===== */
.footer {
    background: var(--dark-light);
    padding: 30px 0 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-brand .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-brand .brand i {
    font-size: 22px;
}

.footer-text {
    color: var(--light-gray);
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.copyright {
    color: var(--light-gray);
    font-size: 12px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-section h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section a {
    display: block;
    color: var(--light-gray);
    padding: 5px 0;
    font-size: 14px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-gray);
    font-size: 12px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .footer {
        padding: 25px 0 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-brand .brand {
        justify-content: center;
    }
}

/* Светлая тема */
body.light-theme .footer {
    background: white;
    border-top: 1px solid #e2e8f0;
}

body.light-theme .footer-section h4 {
    color: #1a202c;
}

body.light-theme .footer-section a {
    color: #4a5568;
}

body.light-theme .footer-bottom {
    border-top-color: #e2e8f0;
    color: #718096;
}

/* История версий */
.versions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.version-card {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.version-card.current {
    border: 2px solid var(--primary);
    background: rgba(49, 130, 206, 0.05);
}

.version-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.version-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.version-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-badge {
    background: var(--gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.version-meta {
    display: flex;
    gap: 20px;
    color: var(--light-gray);
    font-size: 14px;
}

.version-meta i {
    margin-right: 5px;
}

.version-changes h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--light);
}

.version-changes ul {
    list-style: none;
    padding-left: 0;
}

.version-changes li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    color: var(--light-gray);
}

.version-changes li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
}

.version-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.versions-note {
    background: rgba(49, 130, 206, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    border-radius: 8px;
    color: var(--light);
}

.versions-note i {
    color: var(--primary);
    margin-right: 10px;
}

body.light-theme .version-card {
    background: white;
    border-color: #e2e8f0;
}

body.light-theme .version-card.current {
    background: #ebf8ff;
    border-color: var(--primary);
}

body.light-theme .version-header {
    border-bottom-color: #e2e8f0;
}

body.light-theme .version-changes li {
    color: #4a5568;
}

body.light-theme .versions-note {
    background: #ebf8ff;
    border-left-color: var(--primary);
    color: #2d3748;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        max-width: 100%;
    }
    
    .download-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .phone-screen {
        width: 250px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 60px 0;
    }
    
    .hero {
        padding-top: 120px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* ===== СВЕТЛАЯ ТЕМА ===== */
body.light-theme {
    --dark: #ffffff;
    --dark-light: #f8fafc;
    --light: #1a202c;
    --light-gray: #4a5568;
    background-color: #f7fafc;
}

body.light-theme .navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
}

body.light-theme .feature-card,
body.light-theme .roadmap-content,
body.light-theme .download-card,
body.light-theme .footer,
body.light-theme .phone-screen,
body.light-theme .app-interface,
body.light-theme .stat-card,
body.light-theme .instruction-card,
body.light-theme .editable-item,
body.light-theme .version-card {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.light-theme .nav-link {
    color: #4a5568;
}

body.light-theme .nav-link:hover {
    color: #1a202c;
}

body.light-theme .hero {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

body.light-theme .section-subtitle,
body.light-theme .feature-description,
body.light-theme .roadmap-description,
body.light-theme .download-text,
body.light-theme .footer-text {
    color: #4a5568;
}

body.light-theme .feature-details li,
body.light-theme .requirements li,
body.light-theme .version-changes li {
    color: #4a5568;
}

body.light-theme .hero-subtitle {
    color: #4a5568;
}

body.light-theme .app-header {
    color: var(--primary);
    border-bottom-color: #e2e8f0;
}

body.light-theme .app-feature {
    background: rgba(0, 0, 0, 0.02);
    border-left-color: #e2e8f0;
}

body.light-theme .app-feature.active {
    background: rgba(49, 130, 206, 0.08);
    border-left-color: var(--primary);
}

body.light-theme .requirements {
    background: #f8fafc;
}

body.light-theme .social-link {
    background: #f8fafc;
}

body.light-theme .social-link:hover {
    background: rgba(49, 130, 206, 0.1);
}

body.light-theme .footer-section a {
    color: #4a5568;
}

body.light-theme .footer-section a:hover {
    color: var(--primary);
}

body.light-theme .footer-bottom {
    border-top-color: #e2e8f0;
    color: #718096;
}

/* Переключатель темы */
.theme-switch {
    margin-left: 20px;
}

.theme-checkbox {
    display: none;
}

.theme-label {
    display: block;
    width: 60px;
    height: 30px;
    background: var(--dark-light);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.theme-label i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: var(--transition);
}

.theme-label .fa-sun {
    left: 8px;
    color: #f6ad55;
}

.theme-label .fa-moon {
    right: 8px;
    color: #a0aec0;
}

.theme-ball {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.theme-checkbox:checked + .theme-label .theme-ball {
    transform: translateX(30px);
}

.theme-checkbox:checked + .theme-label {
    background: #1a202c;
}

body.light-theme .theme-label {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

body.light-theme .theme-checkbox:checked + .theme-label {
    background: #2d3748;
}

/* Кнопки в карточках для светлой темы */
body.light-theme .feature-actions {
    border-top-color: #e2e8f0;
}

body.light-theme .btn-action {
    background: #f7fafc;
    border-color: #e2e8f0;
    color: #4a5568;
}

body.light-theme .btn-action:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* История версий для светлой темы */
body.light-theme .version-header {
    border-bottom-color: #e2e8f0;
}

body.light-theme .version-card.current {
    background: #ebf8ff;
}

body.light-theme .versions-note {
    background: #ebf8ff;
    color: #2d3748;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}