:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #2ecc71;
    --text: #333;
    --text-light: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--secondary);
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: var(--primary);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo span {
    color: var(--secondary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: white;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Мобильные стили */
@media (max-width: 768px) {
    .header-content {
        justify-content: flex-start;
        padding-right: 50px; /* Место для кнопки меню */
    }

    .mobile-menu-btn {
        display: block;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary);
        flex-direction: column;
        text-align: center;
        gap: 0;
        padding: 1rem 0;
        box-shadow: var(--shadow);
        z-index: 1000;
    }

    nav ul.show {
        display: flex;
    }

    nav li {
        width: 100%;
    }

    nav a {
        display: block;
        padding: 1rem;
        width: 100%;
        border-radius: 0;
    }

    nav a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--light);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Instructions Section */
.instructions {
    padding: 3rem 0;
    background-color: #f5f7fa;
}

.platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.platform-card {
    display: block;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    border: 1px solid #e9ecef;
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: inherit;
    border-color: var(--secondary);
}

.platform-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.platform-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.platform-header h3 {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.platform-info {
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.platform-info p {
    color: var(--text-light);
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 400;
}

.protocol-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary) 0%, #2980b9 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .platforms {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .platform-header {
        padding: 1.2rem 1rem;
    }
    
    .platform-icon {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }
    
    .platform-header h3 {
        font-size: 1.1rem;
    }
    
    .platform-info {
        padding: 1.2rem;
    }
    
    .platform-info p {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .protocol-badge {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .platforms {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .platform-card {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* FAQ Section */
/* FAQ Section */
.faq {
    padding: 5rem 0;
    background-color: white;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-question {
    background-color: var(--primary);
    color: white;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.faq-question:hover {
    background-color: #34495e;
}

.faq-question::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: normal;
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    background-color: var(--light);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
}

.faq-answer.active {
    padding: 1.5rem;
    max-height: 1000px;
}

/* Мобильные стили для аккордеона */
@media (max-width: 768px) {
    .faq-question {
        padding: 1.2rem;
        font-size: 0.95rem;
        align-items: flex-start;
        text-align: left;
    }
    
    .faq-question::after {
        margin-left: 0.5rem;
        align-self: center;
    }
    
    .faq-answer.active {
        padding: 1.2rem;
    }
    
    /* Убедимся, что текст занимает доступное пространство */
    .faq-question span:first-child {
        flex: 1;
        margin-right: 1rem;
    }
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    color: #bdc3c7;
}

.footer-column a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Content Pages */
.content-page {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.page-header {
    background-color: var(--primary);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #bdc3c7;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb span {
    color: #bdc3c7;
}

.page-content {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.page-content h2 {
    color: var(--primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content h3 {
    color: var(--secondary);
    margin: 1.5rem 0 0.8rem;
}

.page-content p {
    margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
    margin: 1rem 0 1rem 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-button:hover {
    background-color: var(--secondary);
    color: white;
}

/* Instruction Page Styles */
.step {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    font-weight: bold;
}

.step h3 {
    display: inline;
    font-size: 1.3rem;
    color: var(--primary);
}

.step-content {
    margin-top: 1rem;
    padding-left: 40px;
}

.step-image {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.code-block {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
}

.note {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.warning {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .step-content {
        padding-left: 0;
    }
}

/* Instructions Section */
.instructions {
    padding: 3rem 0;
    background-color: #f5f7fa;
}

.platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
   
    justify-items: center;
}

.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 120px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    box-shadow: var(--shadow);
    padding: 1rem;
    text-align: center;
}

.platform-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--text);
}

.platform-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    display: block;
}

.platform-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

/* Протокол badge */
.platform-btn::after {
    content: 'Vless';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .platforms {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 0.8rem;
    }
    
    .platform-btn {
        width: 120px;
        height: 100px;
        padding: 0.8rem;
    }
    
    .platform-icon {
        font-size: 1.7rem;
        margin-bottom: 0.6rem;
    }
    
    .platform-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .platforms {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
    
    .platform-btn {
        width: 110px;
        height: 90px;
        padding: 0.6rem;
    }
    
    .platform-icon {
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
    }
    
    .platform-name {
        font-size: 0.85rem;
    }
}

/* Плавный скролл к якорям */
html {
    scroll-behavior: smooth;
}

/* Отступ для якорей, чтобы заголовок не скрывался под фиксированным хедером */
.page-content h2[id] {
    scroll-margin-top: 100px;
    padding-top: 20px;
}

/* Дополнительный отступ для первого элемента после навигации */
.platforms {
    margin-bottom: 2rem;
}

.page-content {
    margin-top: 2rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.download-btn {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.download-btn.play-store {
    background: linear-gradient(135deg, #4285F4, #34A853);
}

.download-btn.github {
    background: linear-gradient(135deg, #6e5494, #4078c0);
}

.btn-icon {
    font-size: 24px;
    margin-right: 12px;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-text strong {
    font-size: 16px;
}

.btn-text small {
    font-size: 12px;
    opacity: 0.9;
}

/* Стили для уменьшенных изображений */
.step-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 15px 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .download-buttons {
        flex-direction: column;
    }
    
    .download-btn {
        padding: 10px 12px;
    }
    
    .step-image {
        max-width: 300px;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .step-image {
        max-width: 250px;
    }
    
    .btn-text strong {
        font-size: 14px;
    }
    
    .btn-text small {
        font-size: 11px;
    }
}