:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-color: #667eea;
}

/* Динамический анимированный фон */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 6px),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 6px);
    pointer-events: none;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 10px); }
}

/* Анимированные круги на фоне */
body::after {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255,255,255,0.03) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Навбар */
.navbar {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.navbar-brand {
    font-weight: bold;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-toggler {
    border: none;
    background: var(--primary-gradient);
    color: white;
    transition: all 0.3s;
}

.navbar-toggler:hover {
    transform: rotate(90deg);
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* Кнопки с анимацией */
.btn-gradient {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    color: white;
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

.btn-gradient:active {
    transform: translateY(0);
}

.btn-outline-gradient {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline-gradient:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.3);
}

/* Карточки */
.hero-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 60px 40px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease;
}

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

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.feature-icon {
    font-size: 3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* API секция */
.api-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
}

.code-block {
    background: #0f0f1a;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: #00ff9d;
    font-family: "Courier New", monospace;
}

.copy-btn {
    background: rgba(102,126,234,0.2);
    border: 1px solid #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #667eea;
    transform: scale(1.05);
}

/* Адаптивные карточки */
@media (max-width: 768px) {
    .hero-section {
        padding: 30px 20px;
    }
    
    .feature-card {
        margin-bottom: 20px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-gradient, .btn-outline-gradient {
        padding: 8px 20px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 20px 15px;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
}

.auth-card {
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 450px;
    margin: 50px auto;
    animation: fadeInUp 0.6s ease;
}

.form-control {
    border-radius: 25px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.25);
    transform: translateX(5px);
}

.btn-auth {
    background: var(--primary-gradient);
    border: none;
    border-radius: 25px;
    padding: 12px;
    color: white;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.footer {
    background: rgba(255,255,255,0.95);
    margin-top: 50px;
    padding: 30px 0;
}

/* Исправления для форм */
.auth-card {
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 450px;
    margin: 120px auto 50px auto;
    animation: fadeInUp 0.6s ease;
}

@media (max-width: 768px) {
    .auth-card {
        margin: 100px 20px 30px 20px;
        padding: 30px 20px;
    }
}

.container {
    position: relative;
    z-index: 1;
}

.navbar {
    z-index: 1000;
}

/* Адаптивные кнопки для мобильных устройств */
@media (max-width: 768px) {
    .hero-section .text-center .mt-4 {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        justify-content: center;
    }
    
    .hero-section .text-center .mt-4 .btn-gradient,
    .hero-section .text-center .mt-4 .btn-outline-gradient {
        display: inline-block;
        width: auto;
        min-width: 200px;
        margin: 0 !important;
        text-align: center;
    }
    
    .btn-gradient, .btn-outline-gradient {
        padding: 10px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-section .text-center .mt-4 .btn-gradient,
    .hero-section .text-center .mt-4 .btn-outline-gradient {
        min-width: 180px;
        width: 80%;
    }
}
