/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563EB;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --background-color: #F8FAFC;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
    --gradient-secondary: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--background-color);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--background-color) 0%, #EEF2FF 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-illustration {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.api-keys-demo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-key {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.api-key i {
    color: var(--primary-color);
}

.status.secure {
    background: var(--gradient-secondary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Problem Section */
.problem {
    padding: 6rem 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.problem-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.problem-card:hover {
    transform: translateY(-4px);
}

.problem-icon {
    width: 4rem;
    height: 4rem;
    background: #FEF2F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.problem-icon i {
    color: #EF4444;
    font-size: 1.5rem;
}

/* Solution Section */
.solution {
    padding: 6rem 0;
    background: var(--background-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    color: var(--white);
    font-size: 1.5rem;
}

/* How It Works */
.how-it-works {
    padding: 6rem 0;
    background: var(--white);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: var(--background-color);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-visual i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Integrations */
.integrations {
    padding: 6rem 0;
    background: var(--background-color);
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.integration-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.integration-card:hover {
    transform: translateY(-2px);
}

.integration-logo {
    width: 3rem;
    height: 3rem;
    background: var(--background-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.integration-logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Pricing */
.pricing {
    padding: 6rem 0;
    background: var(--white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.pricing-header {
    margin-bottom: 2rem;
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.currency {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.period {
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.pricing-features i {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* FAQ */
.faq {
    padding: 6rem 0;
    background: var(--background-color);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background: var(--background-color);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: var(--gradient-primary);
    color: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--white);
    opacity: 0.9;
}

/* Form Styles */
.signup-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-note {
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 1rem;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #94A3B8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: #94A3B8;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-legal a:hover {
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .step {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pricing-card.featured {
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

/* Video Modal Styles - Адаптивные для всех размеров экранов */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
    
    /* Центрирование для всех размеров экранов */
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.video-modal.show {
    display: flex !important;
}

.video-modal-content {
    position: relative;
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
    
    /* Адаптивные размеры */
    width: 90vw;
    max-width: 800px;
    max-height: 90vh;
    
    /* Центрирование контента */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 10001;
}

.video-modal-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.video-modal video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    outline: none;
    
    /* Адаптивные размеры видео */
    max-width: 100%;
    max-height: 70vh;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Адаптивность для разных размеров экранов */

/* Большие экраны (4K и выше) */
@media (min-width: 2560px) {
    .video-modal-content {
        max-width: 1200px;
        padding: 30px;
    }
    
    .video-modal video {
        max-height: 60vh;
    }
    
    .video-modal-close {
        width: 50px;
        height: 50px;
        font-size: 22px;
        top: -15px;
        right: -15px;
    }
}

/* Десктоп (1920px и выше) */
@media (min-width: 1920px) and (max-width: 2559px) {
    .video-modal-content {
        max-width: 1000px;
        padding: 25px;
    }
    
    .video-modal video {
        max-height: 65vh;
    }
}

/* Стандартный десктоп (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .video-modal-content {
        max-width: 800px;
        width: 80vw;
    }
    
    .video-modal video {
        max-height: 70vh;
    }
}

/* Планшеты (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .video-modal-content {
        width: 85vw;
        max-width: 600px;
        padding: 20px;
    }
    
    .video-modal video {
        max-height: 60vh;
    }
    
    .video-modal-close {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* Мобильные устройства (до 767px) */
@media (max-width: 767px) {
    .video-modal {
        padding: 10px;
    }
    
    .video-modal-content {
        width: 95vw;
        max-width: none;
        padding: 15px;
        border-radius: 8px;
    }
    
    .video-modal video {
        max-height: 50vh;
        border-radius: 6px;
    }
    
    .video-modal-close {
        width: 32px;
        height: 32px;
        font-size: 14px;
        top: -8px;
        right: -8px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .video-modal {
        padding: 5px;
    }
    
    .video-modal-content {
        width: 98vw;
        padding: 10px;
    }
    
    .video-modal video {
        max-height: 45vh;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 767px) and (orientation: landscape) {
    .video-modal video {
        max-height: 70vh;
    }
    
    .video-modal-content {
        max-height: 85vh;
    }
}

/* Адаптивные стили для кнопки в хедере */
@media (max-width: 768px) {
    .nav-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        font-weight: 500;
        border-radius: 6px;
        min-width: auto;
        white-space: nowrap;
    }
    
    .nav {
        padding: 0.75rem 1rem;
    }
    
    .nav-brand .logo {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .nav-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 5px;
    }
    
    .nav {
        padding: 0.5rem 0.75rem;
    }
    
    .nav-brand .logo {
        font-size: 1.1rem;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 360px) {
    .nav-actions .btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
        border-radius: 4px;
    }
    
    .nav {
        padding: 0.4rem 0.5rem;
    }
}
