/* ===================================
   Hiddify Store - SEO Optimized Styles
   Фирменные цвета: #5B4EF5, #00D9FF
   =================================== */

:root {
    --primary-color: #5B4EF5;
    --secondary-color: #00D9FF;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --card-bg: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #2a2a3e;
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff4444;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-dark: linear-gradient(180deg, var(--darker-bg), var(--dark-bg));
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-small: 0 2px 10px rgba(91, 78, 245, 0.1);
    --shadow-medium: 0 8px 30px rgba(91, 78, 245, 0.2);
    --shadow-large: 0 20px 60px rgba(91, 78, 245, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .nav-content {
        gap: 10px;
    }
    
    .nav-content > .btn {
        display: none; /* Hide CTA button on very small screens in nav */
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

.logo:hover {
    transform: translateY(-2px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===================================
   Buttons - Mobile Optimized
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-primary);
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
    min-height: 44px; /* iOS touch target */
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-small);
}

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

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(91, 78, 245, 0.1);
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    min-height: 50px;
}

.btn-platform {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
}

/* Mobile button adjustments */
@media (max-width: 480px) {
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        gap: 6px;
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn i {
        font-size: 16px;
    }
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: var(--gradient-dark);
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 56px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease;
}

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

.hero-description {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 900;
    font-family: var(--font-heading);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===================================
   Popular Sections (SEO Block)
   =================================== */

.popular-sections {
    padding: 80px 0;
    background: var(--darker-bg);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.popular-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.popular-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.popular-card:hover::before {
    opacity: 0.1;
}

.popular-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.popular-card i {
    font-size: 48px;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.popular-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.popular-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    background: rgba(91, 78, 245, 0.2);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ===================================
   Features Section
   =================================== */

.features {
    padding: 80px 0;
    background: var(--dark-bg);
}

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

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    transition: var(--transition);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 36px;
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

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

/* ===================================
   Download Section
   =================================== */

.download {
    padding: 80px 0;
    background: var(--darker-bg);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.platform-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

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

.platform-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 48px;
}

.platform-card h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.platform-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.platform-card small {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.popular-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--warning-color);
    color: var(--darker-bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* ===================================
   How It Works
   =================================== */

.how-it-works {
    padding: 80px 0;
    background: var(--dark-bg);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.step-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    font-family: var(--font-heading);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: rgba(91, 78, 245, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 24px;
    font-size: 36px;
    color: var(--primary-color);
}

.step-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.step-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.step-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.step-link:hover {
    gap: 12px;
}

/* ===================================
   Quick FAQ
   =================================== */

.quick-faq {
    padding: 80px 0;
    background: var(--darker-bg);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-small);
}

.faq-question {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.faq-question i {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 4px;
}

.faq-question h3 {
    font-size: 18px;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.faq-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.faq-link:hover {
    color: var(--secondary-color);
}

.cta-center {
    text-align: center;
}

/* ===================================
   CTA Section
   =================================== */

.cta-section {
    padding: 100px 0;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-content h2 {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-section .btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-section .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

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

.footer-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* ===================================
   Animations
   =================================== */

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ===================================
   Responsive Design - Enhanced Mobile
   =================================== */

/* Large tablets and small desktops */
@media (max-width: 968px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 38px;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 17px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .popular-grid,
    .features-grid,
    .platforms-grid,
    .steps-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content h2 {
        font-size: 32px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

/* Tablets and larger phones */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 15px;
    }
    
    .feature-card,
    .platform-card,
    .step-card {
        padding: 30px 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Mobile phones */
@media (max-width: 640px) {
    .hero-title {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .section-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    .navbar {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo i {
        font-size: 24px;
    }
}

/* Small phones (320px-480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero {
        padding: 90px 0 50px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .hero-description {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .hero-buttons {
        gap: 12px;
        margin-bottom: 40px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .section-subtitle {
        font-size: 13px;
        margin-bottom: 30px;
    }
    
    .popular-card,
    .feature-card,
    .platform-card {
        padding: 20px 16px;
    }
    
    .feature-icon,
    .platform-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .popular-card i {
        font-size: 36px;
        margin-bottom: 16px;
    }
    
    .popular-card h3 {
        font-size: 18px;
    }
    
    .feature-card h3,
    .platform-card h3 {
        font-size: 20px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .cta-content p {
        font-size: 15px;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-section h3 {
        font-size: 18px;
    }
    
    .footer-section h4 {
        font-size: 16px;
    }
}

/* Extra small phones (320px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 22px;
    }
    
    .btn {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .btn-large {
        font-size: 14px;
        padding: 12px 18px;
    }
    
    .section-title {
        font-size: 20px;
    }
}

/* ===================================
   Utility Classes
   =================================== */

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

.mt-4 {
    margin-top: 40px;
}

.mb-4 {
    margin-bottom: 40px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* ===================================
   Mobile-specific optimizations
   =================================== */

/* Prevent text overflow in buttons */
.btn,
.btn-primary,
.btn-secondary,
.btn-large {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Better touch targets on mobile */
@media (max-width: 768px) {
    a, button, .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Improve readability on small screens */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    p {
        line-height: 1.6;
    }
    
    h1, h2, h3 {
        line-height: 1.3;
    }
}

/* Fix horizontal scrolling issues */
* {
    max-width: 100%;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Improve spacing on mobile */
@media (max-width: 640px) {
    section {
        padding: 60px 0 !important;
    }
    
    .hero {
        padding: 90px 0 50px !important;
    }
}

/* Better button wrapping */
@media (max-width: 480px) {
    .hero-buttons,
    .cta-buttons {
        width: 100%;
        padding: 0 10px;
    }
    
    .hero-buttons .btn,
    .cta-buttons .btn {
        max-width: 100%;
        font-size: 13px;
        padding: 12px 16px;
        white-space: normal;
        text-align: center;
        line-height: 1.4;
        height: auto;
        min-height: 44px;
    }
}

/* Popular sections grid improvements */
@media (max-width: 480px) {
    .popular-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .popular-card {
        padding: 20px 16px;
    }
}

/* Fix navbar on small screens */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 0;
    }
    
    .nav-content {
        position: relative;
    }
}

/* Improve footer on mobile */
@media (max-width: 480px) {
    .footer-content {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}