/* ============================================================================
   RUSVPN WEBSITE STYLES
   ============================================================================
   
   TABLE OF CONTENTS:
   1. Reset & Base
   2. Scrollbar Configuration (GLOBAL)
   3. CSS Variables
   4. Typography
   5. Layout & Containers
   6. Navigation
   7. Buttons & Forms
   8. Components
   9. Sections
   10. Utilities
   11. Responsive
   
   ============================================================================ */

/* ============================================================================
   1. RESET & BASE
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================================
   2. SCROLLBAR CONFIGURATION (GLOBAL)
   ============================================================================
   All scrollbar hiding rules are centralized here for easy management.
   To show scrollbars again, comment out or remove this entire section.
   ============================================================================ */

/* Hide ALL scrollbars globally - including browser scrollbars */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Hide scrollbars for all other elements */
* {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
    width: 0 !important;
    height: 0 !important;
}

/* ============================================================================
   3. CSS VARIABLES
   ============================================================================ */
:root {
    /* Dark Theme Colors */
    --primary: #00D97E;
    --primary-dark: #00B368;
    --primary-light: #00FF94;
    --secondary: #3B82F6;
    --accent: #00d97e;
    
    /* Background Colors */
    --bg-primary: #0F1419;
    --bg-secondary: #1A1F2E;
    --bg-tertiary: #252B3B;
    --bg-hover: #2D3548;
    
    /* Text Colors */
    --text-primary: #E5E7EB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    /* Border & Divider */
    --border: rgba(140, 140, 140, 0.30);
    --border-light: rgba(160, 160, 160, 0.20);
    
    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 217, 126, 0.3);
    
    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    /* Typography */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-zh: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
}

body.lang-zh {
    font-family: var(--font-zh);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* === Header === */
.site-header {
    background: rgba(26, 31, 46, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    gap: var(--spacing-md);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo img {
    height: 48px !important;
    width: auto;
    max-height: 48px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.main-nav a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 217, 126, 0.5);
}

/* Active Navigation Link - Green Glow Badge */
.main-nav a.active {
    position: relative;
    color: #00D97E;
    font-weight: 500;
}

.main-nav a.active::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 16px);
    height: 3px;
    background: linear-gradient(90deg, transparent, #00D97E, transparent);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(0, 217, 126, 0.6), 0 0 30px rgba(0, 217, 126, 0.3);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: rgba(0, 217, 126, 0.08);
    border-radius: 8px;
    z-index: -1;
}

/* === Language Switcher === */
.language-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-tertiary);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.lang-current:hover {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 217, 126, 0.2);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    display: none;
}

.language-switcher:hover .lang-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.lang-option:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.lang-option.active {
    background: var(--bg-hover);
    color: var(--primary);
    font-weight: 600;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

@keyframes btn-shine {
    0%   { left: -150%; }
    100% { left: 250%; }
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -150%;
    width: 40px;
    height: 400%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: skewX(-25deg);
    animation: btn-shine 3s var(--shine-delay, 0s) infinite;
    pointer-events: none;
    z-index: 2;
}

/* Текст кнопки поверх блика */
.btn-primary > *,
.btn-primary span {
    position: relative;
    z-index: 3;
}


.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-download {
    background: var(--secondary);
    color: white;
}

.btn-download:hover {
    background: #2563EB;
    transform: translateY(-2px);
}

/* === Header Auth Buttons === */
.header-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-auth .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* === Mobile Menu === */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* === Footer === */
.site-footer {
    background: #1A1F2E;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-col h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-col a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 217, 126, 0.5);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 217, 126, 0.4);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--spacing-md);
    text-align: center;
    color: var(--text-muted);
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* === Main Content === */
main {
    min-height: 60vh;
    padding: 0;
    background: var(--bg-primary);
}

.page-header {
    background: var(--bg-secondary);
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-intro {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 800px;
}

.page-content {
    padding: 0;
}

.content-wrapper {
    padding: 0;
}

/* === Feature Content === */
.feature-hero {
    text-align: center;
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    margin-bottom: 0;
}

.feature-hero .emoji {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

.feature-image {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.feature-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.feature-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 3rem;
    max-width: 900px;
    margin: 2rem auto;
    box-shadow: var(--shadow-lg);
}

.feature-content h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.feature-content h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.feature-content h3 {
    color: var(--primary-light);
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.feature-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.feature-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.feature-content li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.feature-content li::before {
    content: "▸";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.feature-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.feature-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

.feature-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
}

.feature-content th,
.feature-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.feature-content th {
    background: var(--bg-hover);
    color: var(--primary);
    font-weight: 600;
}

.feature-content td {
    color: var(--text-secondary);
}

/* === Utility Classes === */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* ========================================
   Language-Specific Text Display
   ======================================== */

/* Hide all language spans by default */
.header-auth .lang-zh,
.header-auth .lang-ru,
.header-auth .lang-en,
.header-cta .lang-zh,
.header-cta .lang-ru,
.header-cta .lang-en {
    display: none;
}

/* Show appropriate language based on body class */
body.lang-zh .lang-zh,
body.zh .lang-zh {
    display: inline !important;
}

body.lang-ru .lang-ru,
body.ru .lang-ru {
    display: inline !important;
}

body.lang-en .lang-en,
body.en .lang-en {
    display: inline !important;
}

/* Fallback: show English if no language detected */
body:not([class*="lang"]):not([class*="zh"]):not([class*="ru"]) .lang-en {
    display: inline !important;
}

/* Green glow on header login button - all pages */
.header-auth .btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 217, 126, 0.3);
    box-shadow: 0 0 15px rgba(0, 217, 126, 0.15), inset 0 0 15px rgba(0, 217, 126, 0.05);
}
.header-auth .btn-secondary:hover {
    border-color: rgba(0, 217, 126, 0.6);
    box-shadow: 0 0 25px rgba(0, 217, 126, 0.3), inset 0 0 20px rgba(0, 217, 126, 0.1);
    color: var(--primary);
    background: var(--bg-hover);
}


