:root {
    --primary: #4361ee;
    --primary-light: #eef2ff;
    --secondary: #3f37c9;
    --dark: #1e1e24;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #4895ef;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
    border: 3px solid #f1f1f1;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}
html {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.btn {
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-gradient-cta {
    background: linear-gradient(135deg, #4361ee, #4cc9f0);
    box-shadow: 0 6px 18px rgba(67, 97, 238, 0.35);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.btn-gradient-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(67, 97, 238, 0.45);
}

.btn-gradient-cta .arrow-right {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn-gradient-cta:hover .arrow-right {
    transform: translateX(-6px);
}

.content-container {
    transition: opacity 0.3s ease;
}

.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    box-shadow: none;
    z-index: 1030;
}

.header.scrolled {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.78);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.navbar-brand span {
    color: var(--primary);
}

.nav-link {
    font-weight: 500;
    color: var(--dark);
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.hero {
    padding: 80px 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* Horizontal Features */
.features-horizontal-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    cursor: grab;
    user-select: none;
    touch-action: none;
    mask: linear-gradient(90deg,
    transparent 0%,
    white 10%,
    white 90%,
    transparent 100%
    );
}

.features-horizontal-container::-webkit-scrollbar {
    display: none;
}

.features-horizontal {
    display: flex;
    gap: 20px;
    will-change: transform;
    width: max-content;
}

.features-horizontal-container:hover .features-horizontal {
    animation-play-state: paused;
    cursor: grabbing;
}

@keyframes autoScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100% + 100vw)); }
}

.auto-scroll-enabled {
    transition: transform 0.1s linear;
    will-change: transform;
}

.manual-drag {
    animation: none;
    transition: transform 0.3s cubic-bezier(0.17, 0.67, 0.21, 0.99);
}

.feature-card-horizontal {
    flex: 0 0 280px;
    min-height: 320px;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    scroll-snap-align: start;
    margin-bottom: 30px;
}

.feature-icon-horizontal {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--info));
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 2px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(67, 97, 238, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--info));
}

.steps-container {
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--success));
    opacity: 0.2;
}

.step-card {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.1);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(67, 97, 238, 0.1);
}

.pricing-card.popular::before {
    content: 'Популярный';
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 0.25rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-bottom-left-radius: 12px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

.pricing-period {
    font-size: 1rem;
    color: var(--gray);
}

.pricing-feature {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.pricing-feature i {
    color: var(--success);
    margin-right: 0.5rem;
}

.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.cta-section {
    padding: 3rem 0;
}

.cta-container {
    background-color: #366AF3;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(54, 106, 243, 0.3);
}

.cta-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
}

.footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-logo span {
    color: var(--primary);
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.1rem;
}

.footer-link {
    margin-bottom: 0.75rem;
}

.footer-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-link a:hover {
    color: white;
    padding-left: 5px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    transition: all 0.3s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
}

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

.floating {
    animation: float 6s ease-in-out infinite;
}

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

.text-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#authModal .modal-content {
    max-width: 400px;
    margin: 0 auto;
    border-radius: 12px;
}

#authModal .modal-header {
    padding: 1.5rem 1.5rem 0;
}

#authModal .modal-body {
    padding: 0 1.5rem 1.5rem;
}

#authModal .otp-input {
    border: 2px solid #e9ecef;
    font-weight: 600;
    caret-color: transparent;
    width: 50px;
    height: 60px;
    font-size: 1.5rem;
}

#authModal .otp-input:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
}

#authModal .btn-primary {
    background-color: #4361ee;
    border: none;
    padding: 0.625rem;
}

#authModal .btn-primary:hover {
    background-color: #3a56d4;
}

#authModal #resendCode,
#authModal #sendEmailCodeBtn {
    color: #4361ee;
    text-decoration: none;
    font-weight: 500;
}

#authModal #resendCode:hover,
#authModal #sendEmailCodeBtn:hover {
    text-decoration: underline;
}

#termsModal .modal-content {
    border-radius: 12px;
    border: none;
}

#termsModal .nav-tabs {
    border-bottom: 2px solid #f0f0f0;
}

#termsModal .nav-link {
    color: var(--gray);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

#termsModal .nav-link.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: transparent;
}

#termsModal h6 {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

#termsModal p {
    color: var(--gray);
    margin-bottom: 0.75rem;
}

@keyframes arrow-pulse {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(-5px); opacity: 0.8; }
}

.arrow-right {
    display: inline-block;
    margin-left: 8px;
    animation: arrow-pulse 1.5s infinite ease-in-out;
    transition: all 0.3s ease;
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .steps-container::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 3rem;
        text-align: center;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .section-title {
        text-align: center;
    }
    .section-title::after {
        left: 25%;
        width: 50%;
    }
    .feature-card-horizontal {
        flex: 0 0 220px;
        min-height: 280px;
        padding: 1.2rem;
    }
    .feature-icon-horizontal {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    .feature-card-horizontal h4 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    .feature-card-horizontal p {
        font-size: 0.85rem;
    }
    .cta-title {
        font-size: 2rem;
    }
    .cta-container {
        padding: 2.5rem 3rem !important;
    }
}

@media (min-width: 768px) {
    .container-narrow {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    .pricing-card {
        padding: 1.5rem;
    }
    #authModal .modal-content {
        border-radius: 0;
        margin: 0;
    }
    #authModal .modal-body {
        padding: 0 1rem 1rem;
    }
    #authModal .otp-input {
        width: 45px !important;
        height: 55px !important;
    }
}

@media (min-width: 992px) {
    .cta-title {
        font-size: 2.2rem;
    }
}
