/* --- ОБЩИE СТИЛИ И ПЕРЕМЕННЫЕ --- */
:root {
    --bg-color: #0d1117;
    --secondary-bg-color: #161b22;
    --card-bg-color: rgba(22, 27, 34, 0.6);
    --border-color: rgba(48, 54, 61, 0.8);
    --text-color: #c9d1d9;
    --text-color-darker: #8b949e;
    --accent-color: #58a6ff;
    --accent-gradient: linear-gradient(135deg, #58a6ff, #3b82f6);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --glow-color-1: rgba(88, 166, 255, 0.15);
    --glow-color-2: rgba(43, 93, 228, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- ЭФФЕКТЫ ФОНА --- */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.glow-circle-1, .glow-circle-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    will-change: transform;
    animation: pulse 20s infinite alternate;
}

.glow-circle-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -200px;
    background-color: var(--glow-color-1);
}

.glow-circle-2 {
    width: 500px;
    height: 500px;
    bottom: -250px;
    right: -250px;
    background-color: var(--glow-color-2);
    animation-delay: -10s;
}

@keyframes pulse {
    0% { transform: scale(0.8) rotate(0deg); }
    100% { transform: scale(1.2) rotate(20deg); }
}

/* --- СТИЛИ КОМПОНЕНТОВ --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(88, 166, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 7px 25px rgba(88, 166, 255, 0.35);
}

.btn-secondary {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 14px;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 24px;
    color: white;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
    color: var(--text-color-darker);
    font-size: 1.1rem;
}

/* --- HEADER --- */
.header {
    background-color: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
}

.header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.logo-img {
    height: 28px;
    width: auto;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    background-color: var(--secondary-bg-color);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--text-color-darker);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background-color: var(--accent-color);
    color: white;
}

.btn-header {
    padding: 8px 18px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
}
.btn-header:hover {
    background-color: #3b82f6;
}

/* --- HERO SECTION --- */
.hero {
    padding-top: 180px;
    position: relative;
    margin-bottom: -200px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 550px) 1fr;
    align-items: start;
    gap: 60px;
}

.hero-content {
    text-align: left;
    max-width: 100%;
    margin: 0;
    padding-top: 10px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    background-color: rgba(88, 166, 255, 0.1);
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff, #c9d1d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    letter-spacing: -2.5px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-color-darker);
    max-width: 500px;
    margin: 0 0 40px 0;
}

.hero-gift-text {
    margin-top: 20px;
    color: var(--text-color-darker);
}

/* --- НОВЫЕ СТИЛИ ДЛЯ КНОПОК --- */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap; /* Позволяет кнопкам переноситься на новую строку на маленьких экранах */
    margin-bottom: 16px;
}

.cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
/* ------------------------------- */

.hero-phone-wrapper {
    position: relative;
    width: 420px;
    height: 854px;
    justify-self: center;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.phone-frame {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;
}

.phone-screen {
    position: absolute;
    top: 1.8%;
    left: 4.5%;
    width: 91%;
    height: 96.4%;
    border-radius: 5%;
    object-fit: cover;
    z-index: 1;
    background-color: #000;
}

/* --- ОБЩИЕ СТИЛИ ДЛЯ СЕКЦИЙ --- */
.how-it-works, .features, .referral, .cta-section {
    position: relative;
}

/* --- HOW IT WORKS SECTION --- */
.how-it-works {
    padding-top: 250px;
    padding-bottom: 100px;
    background: var(--card-bg-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    z-index: 2;
}

.how-it-works::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.steps-grid, .features-grid, .referral-cards {
    display: grid;
    gap: 30px;
}

.steps-grid {
    grid-template-columns: repeat(3, 1fr);
}

.step-card, .feature-card, .ref-card {
    background: var(--card-bg-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover, .feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(88, 166, 255, 0.5);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.step-card {
    text-align: center;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    border: 4px solid var(--secondary-bg-color);
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: white;
}

.step-card p {
    color: var(--text-color-darker);
}

/* --- FEATURES SECTION --- */
.features {
    padding: 100px 0;
}

.features-grid {
    grid-template-columns: repeat(3, 1fr);
}

.feature-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    color: var(--accent-color);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: white;
}

.feature-card p {
    color: var(--text-color-darker);
}

/* --- REFERRAL SECTION --- */
.referral {
    background-color: var(--secondary-bg-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 100px 0;
    padding-bottom: 330px;
}

.referral-content {
    text-align: center;
}

.referral-cards {
    grid-template-columns: 1fr 1fr;
}

.ref-card {
    padding: 30px;
    text-align: left;
}

.ref-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.ref-card p {
    color: var(--text-color-darker);
}

/* --- CTA Section --- */
.cta-section {
    padding: 120px 0;
    text-align: center;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}


.cta-title {
    font-size: 3.5rem;
    margin-bottom: 40px;
}

.cta-logo-peek {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%) translateY(30%) rotate(10deg);
    z-index: 0;
    pointer-events: none;
    transition: none !important;
}

.cta-logo-peek img {
    width: 300px;
    height: auto;
    filter: drop-shadow(0 0 30px var(--accent-color));
    transition: none !important;
}

/* --- FOOTER --- */
.footer {
    padding: 40px 0;
    background: var(--secondary-bg-color);
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.footer-copy {
    color: var(--text-color-darker);
    font-size: 0.9rem;
}

.footer-links-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-link {
    text-decoration: none;
    color: var(--text-color-darker);
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.footer-link:hover {
    color: white;
    border-color: var(--accent-color);
    background-color: rgba(88, 166, 255, 0.1);
    transform: translateY(-2px);
}

/* --- АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ --- */

@media (max-width: 992px) {
    .hero {
        margin-bottom: -150px;
    }
    .how-it-works {
        padding-top: 250px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 64px;
        justify-items: center;
    }
    .hero-content {
        text-align: center;
    }
    .hero-actions, .cta-buttons { /* Центрируем кнопки на мобильных */
        justify-content: center;
    }
    .hero-subtitle {
        margin: 0 auto 40px;
    }
    .hero-title {
        font-size: 3.5rem;
    }
    .section-title {
        font-size: 2.4rem;
    }
    .cta-title {
        font-size: 2.8rem;
    }
    .steps-grid, .features-grid, .referral-cards {
        grid-template-columns: 1fr;
    }
    .referral {
        padding-bottom: 200px;
    }
    .cta-logo-peek img {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 160px;
        margin-bottom: -120px;
    }
    .how-it-works {
        padding-top: 220px;
    }
    .hero-phone-wrapper {
        width: 280px;
        height: 570px;
    }
    .hero-title {
        font-size: 2.8rem;
        letter-spacing: -1.5px;
    }
    .cta-title {
        font-size: 2.4rem;
    }
    .referral {
        padding-bottom: 180px;
    }
    .cta-logo-peek img {
        width: 200px;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .footer-info {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none;
    }
    .hero-title {
        font-size: 2.4rem;
        letter-spacing: -1px;
    }
    .btn-header {
        display: none;
    }
    .referral {
        padding-bottom: 150px;
    }
    .cta-logo-peek img {
        width: 180px;
    }
}

/* Дополнительная адаптация для кнопок на самых узких экранах */
@media (max-width: 520px) {
    .hero-actions,
    .cta-buttons {
        flex-direction: column; /* Ставим кнопки в столбик */
        align-items: stretch;   /* Растягиваем их на всю ширину */
    }
}