/* ===== ОСНОВНЫЕ ПЕРЕМЕННЫЕ И СТИЛИ ===== */
:root {
    --primary-color: #4e54c8;
    --secondary-color: #8f94fb;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-light: linear-gradient(135deg, rgba(78, 84, 200, 0.8), rgba(143, 148, 251, 0.6));
}

/* ===== ОБЩИЕ СТИЛИ ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(0, 0, 0, 0.9) !important;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

    .navbar-dark .navbar-nav .nav-link:hover {
        color: var(--primary-color) !important;
        background: rgba(78, 84, 200, 0.1);
    }

/* ===== ГЕРОЙ СЕКЦИЯ С ФОНОМ ===== */
.hero-section {
    position: relative;
    color: white;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

    /* Основной фон с изображением и градиентами */
    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background:
        /* Фоновое изображение */
        url('/images/fon.jpg') no-repeat center center,
        /* Темный оверлей для контраста */
        linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)),
        /* Градиенты для создания глубины */
        radial-gradient(circle at 20% 50%, rgba(78, 84, 200, 0.6) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(143, 148, 251, 0.5) 0%, transparent 50%);
        background-size: cover;
        background-attachment: fixed;
        background-blend-mode: overlay, normal, normal;
        z-index: -1;
        animation: gradientShift 15s ease infinite alternate;
    }

    /* Если фон не загрузился - fallback */
    .hero-section.bg-failed::before {
        background: var(--gradient);
        animation: none;
    }

/* Анимация плавного смещения фона */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%, 0% 0%, 0% 0%, 0% 0%;
    }

    100% {
        background-position: 100% 50%, 0% 0%, 100% 0%, 100% 0%;
    }
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .hero-section::before {
        background-attachment: scroll;
        animation: none;
        background: url('/images/fon.jpg') no-repeat center center, linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
        background-size: cover;
    }
}

/* Заголовок героя */
.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

    .hero-title .text-primary {
        color: #8f94fb !important;
        text-shadow: 0 2px 10px rgba(143, 148, 251, 0.5);
    }

/* Подзаголовок */
.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    display: inline-block;
    padding: 15px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Кнопки в герое */
.hero-buttons .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.8rem 2rem;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

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

.hero-buttons .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 0.8rem 2rem;
    font-weight: 600;
}

    .hero-buttons .btn-outline-light:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.8);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

/* Иконка в герое */
.hero-icon {
    font-size: 15rem;
    opacity: 0.9;
    animation: float 3s ease-in-out infinite;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Волны внизу героя */
.hero-waves {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 0;
}

    .hero-waves svg {
        position: relative;
        display: block;
        width: calc(100% + 1.3px);
        height: 100px;
        transform: rotate(180deg);
    }

    .hero-waves .shape-fill {
        fill: #ffffff;
    }

/* ===== СЕКЦИИ ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 3rem;
}

/* Карточки возможностей */
.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

    .feature-icon i {
        font-size: 2rem;
        color: white;
    }

.feature-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* Примеры */
.examples-section.bg-light {
    background-color: #f8f9fa !important;
}

.example-card {
    text-align: center;
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

    .example-card:hover {
        transform: translateY(-5px);
    }

.example-image {
    width: 100px;
    height: 100px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.example-card:hover .example-image {
    transform: scale(1.1);
}

.example-image i {
    font-size: 2.5rem;
    color: white;
}

.example-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* Шаги "Как это работает" */
.step-card {
    position: relative;
    padding: 2rem 1rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.step-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* CTA секция */
.cta-section {
    background: var(--gradient) !important;
    color: white;
}

    .cta-section h3 {
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .cta-section .btn-light {
        background: white;
        color: var(--primary-color);
        font-weight: 600;
        padding: 0.8rem 2rem;
        transition: all 0.3s ease;
    }

        .cta-section .btn-light:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }

/* ===== ФУТЕР ===== */
.footer {
    background: #2c3e50 !important;
}

    .footer h5, .footer h6 {
        color: white;
        font-weight: 600;
        margin-bottom: 1.5rem;
    }

    .footer a.text-muted {
        transition: color 0.3s ease;
    }

        .footer a.text-muted:hover {
            color: var(--secondary-color) !important;
            text-decoration: none;
        }

.social-links a {
    font-size: 1.5rem;
    transition: color 0.3s ease;
    display: inline-block;
    margin-right: 1rem;
}

    .social-links a:hover {
        color: var(--secondary-color) !important;
        transform: translateY(-3px);
    }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-icon {
        font-size: 10rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 10px 15px;
    }

    .hero-icon {
        font-size: 8rem;
        margin-top: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }

    .hero-buttons .btn-primary {
        margin-right: 0;
    }

    .cta-section .text-lg-end {
        text-align: center !important;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .feature-card,
    .example-card,
    .step-card {
        margin-bottom: 1.5rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ===== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Улучшенный контраст для текста на темном фоне */
.bg-dark,
.bg-primary,
.hero-section {
    color: white;
}

/* Убираем подчеркивание у ссылок в футере */
.footer a {
    text-decoration: none;
}

/* Поля для форм */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(78, 84, 200, 0.25);
}

/* Прогресс бар */
.progress-bar {
    background: var(--gradient);
}

/* ===== СТИЛИ ДЛЯ ГЕНЕРАТОРА ВИДЕО ===== */
.loading-spinner {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 1rem;
}

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

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

/* Drag and drop zone */
.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    cursor: pointer;
    position: relative;
}

    .drop-zone:hover {
        border-color: var(--primary-color);
        background-color: #e9f5ff;
    }

    .drop-zone.drag-over {
        border-color: var(--primary-color);
        background-color: #d1ecff;
    }

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary-color);
}

/* Image preview */
.image-preview {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

/* Generated video */
.generated-video {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--primary-color);
}

/* Form improvements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-actions {
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* Template card */
.template-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
}

    .template-card:hover {
        transform: translateY(-5px);
        border-color: var(--primary-color);
        box-shadow: 0 4px 15px rgba(78, 84, 200, 0.2);
    }

/* Вспомогательные классы */
.mt-6 {
    margin-top: 4rem;
}

.mb-6 {
    margin-bottom: 4rem;
}

.pb-6 {
    padding-bottom: 4rem;
}

.pt-6 {
    padding-top: 4rem;
}

/* Стили для Blazor */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Loading progress */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--primary-color);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Загрузка...");
    }

/* ===== СТИЛИ ИЗ APP.CSS (ВИДЕО ГЕНЕРАТОР) ===== */

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f6;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 1rem;
}

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

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

/* Drag and drop zone */
.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    cursor: pointer;
    position: relative;
}

    .drop-zone:hover {
        border-color: var(--primary-color);
        background-color: #e9f5ff;
    }

    .drop-zone.drag-over {
        border-color: var(--primary-color);
        background-color: #d1ecff;
    }

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary-color);
}

.file-types {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Image preview */
.image-preview {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.preview-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.preview-container:hover .preview-overlay {
    opacity: 1;
}

.preview-overlay button {
    margin: 0 0.25rem;
}

/* Modal and cropper */
.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1050;
}

.cropper-container {
    max-height: 60vh;
    overflow: auto;
    text-align: center;
}

.cropper-image {
    max-width: 100%;
    max-height: 50vh;
}

.crop-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Generated video */
.generated-video {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--primary-color);
}

/* Form improvements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-actions {
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .drop-zone {
        padding: 1.5rem;
    }

    .upload-icon {
        font-size: 2rem;
    }
}

/* Template card */
.template-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
}

    .template-card:hover {
        transform: translateY(-5px);
        border-color: var(--primary-color);
        box-shadow: 0 4px 15px rgba(78, 84, 200, 0.2);
    }

.template-stats {
    line-height: 1.4;
}

.template-fields {
    margin-top: 10px;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/fon.jpg') no-repeat center center / cover, linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    z-index: -1;
}


/* site.css - добавьте */
.example-card {
    transition: all 0.3s ease;
    border-radius: 15px !important;
    overflow: hidden;
}

    .example-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
    }

.card-img-wrapper {
    transition: transform 0.3s ease;
}

.example-card:hover .card-img-wrapper {
    transform: scale(1.05);
}

/* Анимация для кнопки воспроизведения */
.btn-play {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.example-card:hover .btn-play {
    opacity: 1;
    transform: scale(1);
}