/* ==================== BOOTSTRAP COMPATIBILITY ==================== */

/* Обеспечиваем корректную работу Bootstrap Grid */
.container,
.container-fluid,
.row,
[class*="col-"] {
    /* Сохраняем Bootstrap поведение */
    box-sizing: border-box;
}

/* Исправляем возможные конфликты с col-* классами */
.col,
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,
.col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6,
.col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12,
.col-xxl, .col-xxl-1, .col-xxl-2, .col-xxl-3, .col-xxl-4, .col-xxl-5, .col-xxl-6,
.col-xxl-7, .col-xxl-8, .col-xxl-9, .col-xxl-10, .col-xxl-11, .col-xxl-12 {
    /* Не переопределяем Bootstrap стили */
    position: relative !important;
    width: auto !important;
    padding-right: calc(var(--bs-gutter-x) * 0.5) !important;
    padding-left: calc(var(--bs-gutter-x) * 0.5) !important;
    margin-top: var(--bs-gutter-y) !important;
    flex: 1 0 0% !important;
    max-width: none !important;
}

/* Специально для col-12 */
.col-12 {
    flex: 0 0 auto !important;
    width: 100% !important;
}

/* Убираем конфликтующие стили из универсального селектора */
* {
    box-sizing: border-box;
}

/* НЕ применяем глобальные стили к Bootstrap компонентам */
.container *,
.container-fluid *,
.row *,
[class*="col-"] * {
    /* Сохраняем Bootstrap стили */
}

/* Исправляем возможные проблемы с отступами Bootstrap */
.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-0.5 * var(--bs-gutter-x));
    margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}


/* ==================== ОСНОВНЫЕ СТИЛИ ==================== */

:root {
    /* Государственная цветовая схема */
    --primary-color: #2c5aa0;
    --primary-light: #4a7bc8;
    --primary-dark: #1e3d6f;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    /* Нейтральные цвета */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    /* Темная тема */
    --dark-bg-primary: #1a1d23;
    --dark-bg-secondary: #25282e;
    --dark-bg-tertiary: #2f3349;
    --dark-text-primary: #ffffff;
    --dark-text-secondary: #adb5bd;
    
    /* Тени и эффекты */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.20);
    
    /* Радиусы скругления */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Переходы */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --success-color: #28a745;
    --danger-color: #dc3545;
    --primary-color: #007bff;
    --text-primary: #212529;

    /* Системные шрифты (без внешних CDN, в т.ч. Google Fonts) */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
}

/* Более специфичный сброс стилей вместо * */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, ul, li, nav, main, footer, section, article {
    box-sizing: border-box;
}

/* Исключаем Bootstrap компоненты из глобального сброса */
body:not(.container):not(.container-fluid):not(.row):not([class*="col-"]) {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--bg-primary) 0%, #e3f2fd 100%);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--bg-primary) 0%, #e3f2fd 100%);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== ТЕМНАЯ ТЕМА ==================== */

body[data-theme="dark"] {
    background: linear-gradient(135deg, var(--dark-bg-primary) 0%, #0d1421 100%);
    color: var(--dark-text-primary);
}

body[data-theme="dark"] .navbar-custom {
    background: rgba(26, 29, 35, 0.95) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .breadcrumb-section {
    background: rgba(37, 40, 46, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .alert-modern {
    background: rgba(37, 40, 46, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--dark-text-primary);
}

/* ==================== НАВИГАЦИЯ ==================== */

.navbar-custom {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(44, 90, 160, 0.1);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    min-height: 70px;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
    color: var(--text-primary) !important;
}

body[data-theme="dark"] .navbar-custom .navbar-brand,
body[data-theme="dark"] .navbar-custom .nav-link {
    color: var(--dark-text-primary) !important;
}

/* Логотип */
.logo-container {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
    z-index: 2;
    position: relative;
    transition: all var(--transition-normal);
}

.navbar-brand:hover .logo-icon {
    color: white;
    transform: scale(1.05);
}

.logo-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background: radial-gradient(circle, rgba(44, 90, 160, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: logosPulse 3s ease-in-out infinite;
}

@keyframes logosPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(0.8); 
        opacity: 0.7; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2); 
        opacity: 0.3; 
    }
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: -2px;
}

/* Кастомный toggler */
.custom-toggler {
    padding: 6px 10px;
    border-radius: var(--radius-md);
    background: rgba(44, 90, 160, 0.1);
    transition: all var(--transition-fast);
}

.custom-toggler:hover {
    background: rgba(44, 90, 160, 0.2);
}

.custom-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 90, 160, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Навигационные ссылки */
.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    font-weight: 500;
    background: transparent;
}

.nav-link-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 90, 160, 0.1), transparent);
    transition: left var(--transition-slow);
}

.nav-link-custom:hover::before {
    left: 100%;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.1) 0%, rgba(74, 123, 200, 0.1) 100%);
    color: var(--primary-color) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.nav-link-custom.active {
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.15) 0%, rgba(74, 123, 200, 0.15) 100%);
    box-shadow: inset 0 2px 4px rgba(44, 90, 160, 0.1);
}

.nav-icon-wrapper {
    width: 20px;
    margin-right: 0.75rem;
    display: flex;
    justify-content: center;
}

.nav-icon {
    transition: transform var(--transition-normal);
    font-size: 0.95rem;
}

.nav-link-custom:hover .nav-icon {
    transform: scale(1.1);
    color: var(--primary-color);
}

.nav-link-about {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.nav-link-about:hover {
    color: var(--primary-color) !important;
    background: rgba(44, 90, 160, 0.08);
}

/* Переключатель темы */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.1) 0%, rgba(74, 123, 200, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.theme-toggle:hover {
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.2) 0%, rgba(74, 123, 200, 0.2) 100%);
    border-color: rgba(44, 90, 160, 0.2);
    transform: scale(1.05);
}

.theme-icon {
    position: absolute;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    color: var(--primary-color);
}

body[data-theme="light"] .fa-moon {
    opacity: 0;
    transform: rotate(180deg) scale(0.8);
}

body[data-theme="dark"] .fa-sun {
    opacity: 0;
    transform: rotate(-180deg) scale(0.8);
}

body[data-theme="dark"] .theme-icon {
    color: #ffd700;
}

/* ==================== ИНДИКАТОР ЗАГРУЗКИ ==================== */

.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    z-index: 9999;
    transition: transform var(--transition-normal);
}

.loading-bar.active {
    transform: scaleX(1);
    animation: loadingProgress 1.5s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { transform: scaleX(0) translateX(0); }
    40% { transform: scaleX(0.4) translateX(25%); }
    80% { transform: scaleX(0.8) translateX(50%); }
    100% { transform: scaleX(1) translateX(0); }
}

/* ==================== BREADCRUMB ==================== */

.breadcrumb-section {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(44, 90, 160, 0.08);
    padding: 1rem 0;
    position: relative;
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    font-weight: 500;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-weight: 600;
    color: var(--text-muted);
}

/* ==================== КОНТЕНТ ==================== */

.content-wrapper {
    padding: 2.5rem 0;
    min-height: 60vh;
    position: relative;
}

/* ==================== ALERTS ==================== */

.alert-modern {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
    animation: alertSlideIn 0.3s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(40, 167, 69, 0.1) !important;
    border-left-color: var(--accent-color);
    color: #155724 !important;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1) !important;
    border-left-color: var(--danger-color);
    color: #721c24 !important;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1) !important;
    border-left-color: var(--info-color);
    color: #0c5460 !important;
}

.alert-content {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.alert-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    opacity: 0.8;
}

.btn-close-custom {
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.btn-close-custom:hover {
    opacity: 1;
}

/* ==================== ФУТЕР ==================== */

.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #1a365d 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(74, 123, 200, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(26, 54, 160, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    padding: 2.5rem 0;
    position: relative;
    z-index: 2;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-logo .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.footer-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.stat-item {
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.footer-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.footer-version,
.footer-security {
    font-weight: 500;
    opacity: 0.9;
}

.footer-version i,
.footer-security i {
    opacity: 0.8;
}

/* ==================== КНОПКА "НАВЕРХ" ==================== */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all var(--transition-normal);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

.scroll-to-top:active {
    transform: translateY(-1px) scale(0.98);
}

.scroll-to-top i {
    font-size: 1.1rem;
    transition: transform var(--transition-fast);
}

.scroll-to-top:hover i {
    transform: translateY(-1px);
}

/* ==================== АНИМАЦИИ ==================== */

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

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

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-width: 991.98px) {
    .navbar-custom {
        min-height: 60px;
    }
    
    .brand-name {
        font-size: 1.25rem;
    }
    
    .nav-link-custom {
        padding: 0.6rem 1rem !important;
        margin: 0.1rem 0;
        border-radius: var(--radius-md);
    }
    
    .footer-actions {
        align-items: flex-start;
        margin-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .brand-tagline {
        display: none !important;
    }
    
    .footer-stats {
        justify-content: center;
    }
    
    .footer-actions {
        text-align: center !important;
        align-items: center;
    }
    
    .content-wrapper {
        padding: 1.5rem 0;
    }
    
    .scroll-to-top {
        width: 48px;
        height: 48px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .nav-link-custom span {
    /*    display: none; */
    }
    
    .nav-icon-wrapper {
        margin-right: 0;
    }
    
    .stat-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    .footer-logo {
        font-size: 1.2rem;
        justify-content: center;
    }
}

/* ==================== УТИЛИТАРНЫЕ КЛАССЫ ==================== */

.text-government {
    color: var(--primary-color) !important;
}

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

.border-government {
    border-color: var(--primary-color) !important;
}

.shadow-government {
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.15) !important;
}

/* ==================== ДОСТУПНОСТЬ ==================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Высокий контраст для читаемости */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #1a365d;
        --text-primary: #000000;
        --text-secondary: #333333;
    }
}

/* Поддержка печати */
@media print {
    .navbar-custom,
    .footer,
    .scroll-to-top,
    .theme-toggle {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ==================== СТРАНИЦА "О ПРОГРАММЕ" ==================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #1a365d 100%);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.hero-content {
    z-index: 2;
}

.hero-icon-wrapper {
    position: relative;
    display: inline-block;
}

.hero-icon {
    font-size: 4rem;
    color: #ffd700;
    position: relative;
    z-index: 2;
    animation: heroIconFloat 3s ease-in-out infinite;
}

@keyframes heroIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-icon-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroIconPulse 2s ease-in-out infinite;
}

@keyframes heroIconPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.3; }
}

.hero-title {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: heroTitleGlow 4s ease-in-out infinite alternate;
}

@keyframes heroTitleGlow {
    from { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)); }
    to { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6)); }
}

.hero-subtitle {
    opacity: 0.9;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-stats {
    margin-top: 2rem;
}

.stat-item {
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
    height: 100%;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
    margin-bottom: 0.5rem;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-label {
    opacity: 0.9;
    font-weight: 500;
}

/* Section Headers */
.section-header {
    position: relative;
    padding-bottom: 1rem;
}

.section-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

body[data-theme="dark"] .section-title {
    color: var(--dark-text-primary);
}

/* Feature Cards */
.feature-card {
    transition: all var(--transition-normal);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 90, 160, 0.05), transparent);
    transition: left var(--transition-slow);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl) !important;
    border-left-color: var(--primary-color);
}

.feature-icon-bg {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, rgba(44, 90, 160, 0.08), rgba(74, 123, 200, 0.03));
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon-bg {
    transform: scale(1.1);
    background: linear-gradient(45deg, rgba(44, 90, 160, 0.12), rgba(74, 123, 200, 0.06));
}

.feature-content {
    z-index: 2;
}

.feature-icon i {
    transition: all var(--transition-normal);
}

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

.feature-title {
    color: var(--text-primary);
    font-size: 1.4rem;
}

.feature-item {
    font-weight: 500;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.feature-item:hover {
    color: var(--primary-color);
}

body[data-theme="dark"] .feature-card {
    background: var(--dark-bg-secondary) !important;
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .feature-title,
body[data-theme="dark"] .feature-item {
    color: var(--dark-text-primary);
}

/* Technology Section */
.tech-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.tech-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(44, 90, 160, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 123, 200, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

body[data-theme="dark"] .tech-section {
    background: linear-gradient(135deg, var(--dark-bg-tertiary) 0%, var(--dark-bg-secondary) 100%);
}

.tech-card {
    transition: all var(--transition-normal);
    border-top: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.tech-card:hover::before {
    transform: scaleX(1);
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tech-icon i {
    transition: all var(--transition-normal);
}

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

.tech-title {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.tech-description {
    font-size: 0.95rem;
    line-height: 1.5;
}

body[data-theme="dark"] .tech-card {
    background: var(--dark-bg-secondary) !important;
}

body[data-theme="dark"] .tech-title {
    color: var(--dark-text-primary);
}

/* Algorithm Cards */
.algorithm-card {
    position: relative;
    overflow: hidden;
}

.algorithm-compress {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.algorithm-detect {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.algorithm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.algorithm-title {
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
}

.algorithm-steps,
.sensitivity-levels {
    position: relative;
    z-index: 2;
}

.algorithm-step,
.sensitivity-level {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.step-number {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 1rem;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition-normal);
}

.algorithm-step:hover .step-number {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.step-content {
    flex: 1;
}

.step-description {
    opacity: 0.85;
    line-height: 1.4;
    margin-top: 0.25rem;
}

.level-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-normal);
}

.level-low {
    background: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.level-medium {
    background: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

.level-high {
    background: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

.sensitivity-level:hover .level-indicator {
    transform: scale(1.1);
}

.level-content {
    flex: 1;
}

.level-description {
    opacity: 0.85;
    line-height: 1.4;
    margin-top: 0.25rem;
}

/* Security Section */
.security-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a365d 50%, #2c5aa0 100%);
    position: relative;
    overflow: hidden;
}

.security-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(74, 123, 200, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(26, 54, 160, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.security-title {
    position: relative;
    z-index: 2;
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.security-description {
    position: relative;
    z-index: 2;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.security-feature {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
    height: 100%;
    position: relative;
    z-index: 2;
}

.security-feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.security-feature i {
    transition: all var(--transition-normal);
    display: block;
}

.security-feature:hover i {
    transform: scale(1.1);
}

.security-feature-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.security-feature-description {
    opacity: 0.9;
    line-height: 1.4;
}

/* Team Section */
.team-card {
    transition: all var(--transition-normal);
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.team-card:hover::before {
    transform: scaleX(1);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.team-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, rgba(44, 90, 160, 0.08), transparent);
    border-radius: 0 var(--radius-lg) 0 0;
    transition: all var(--transition-normal);
}

.team-card:hover .team-bg {
    background: linear-gradient(45deg, rgba(44, 90, 160, 0.12), transparent);
    transform: scale(1.1);
}

.team-content {
    z-index: 2;
}

.team-avatar i {
    transition: all var(--transition-normal);
}

.team-card:hover .team-avatar i {
    transform: scale(1.1) rotate(5deg);
}

.team-name {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.team-role {
    font-size: 1rem;
    font-weight: 500;
}

.team-skills .badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
}

body[data-theme="dark"] .team-card {
    background: var(--dark-bg-secondary) !important;
}

body[data-theme="dark"] .team-name {
    color: var(--dark-text-primary);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.cta-title {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.cta-description {
    position: relative;
    z-index: 2;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.cta-buttons {
    position: relative;
    z-index: 2;
}

.cta-button {
    transition: all var(--transition-normal);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-button:active {
    transform: translateY(-1px);
}

/* ==================== АДАПТИВНОСТЬ ДЛЯ СТРАНИЦЫ "О ПРОГРАММЕ" ==================== */

@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: 350px;
        padding: 3rem 1rem !important;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-icon {
        font-size: 3.5rem;
    }
    
    .stat-item {
        padding: 1.25rem 0.75rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-title {
        font-size: 1.25rem;
    }
    
    .algorithm-title {
        font-size: 1.3rem;
    }
    
    .security-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 300px;
        padding: 2rem 1rem !important;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-icon {
        font-size: 3rem;
    }
    
    .hero-icon-pulse {
        width: 60px;
        height: 60px;
    }
    
    .section-icon {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .stat-item {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .feature-card,
    .tech-card,
    .team-card {
        margin-bottom: 1rem;
    }
    
    .algorithm-card {
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .level-indicator {
        width: 20px;
        height: 20px;
    }
    
    .security-feature {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-button {
        display: block;
        margin-bottom: 1rem;
        margin-right: 0 !important;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .section-title::after {
        width: 40px;
        height: 2px;
    }
    
    .feature-title {
        font-size: 1.1rem;
    }
    
    .algorithm-title {
        font-size: 1.2rem;
    }
    
    .security-title {
        font-size: 1.6rem;
    }
    
    .team-name {
        font-size: 1.1rem;
    }
    
    .team-skills .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .cta-title {
        font-size: 1.6rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
}

/* ==================== АНИМАЦИИ ДЛЯ СТРАНИЦЫ "О ПРОГРАММЕ" ==================== */

/* Анимация появления карточек */
.feature-card,
.tech-card,
.algorithm-card,
.team-card {
    opacity: 0;
    transform: translateY(30px);
    animation: cardFadeInUp 0.6s ease-out forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }

.tech-card:nth-child(1) { animation-delay: 0.1s; }
.tech-card:nth-child(2) { animation-delay: 0.2s; }
.tech-card:nth-child(3) { animation-delay: 0.3s; }
.tech-card:nth-child(4) { animation-delay: 0.4s; }

.team-card:nth-child(1) { animation-delay: 0.1s; }
.team-card:nth-child(2) { animation-delay: 0.2s; }
.team-card:nth-child(3) { animation-delay: 0.3s; }
.team-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация счетчиков */
.stat-number {
    opacity: 0;
    animation: counterFadeIn 1s ease-out 0.5s forwards;
}

@keyframes counterFadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Анимация секций */
.section-header {
    opacity: 0;
    transform: translateY(20px);
    animation: sectionHeaderFadeIn 0.8s ease-out forwards;
}

@keyframes sectionHeaderFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Пульсация иконок безопасности */
.security-feature i {
    animation: securityIconPulse 3s ease-in-out infinite;
}

.security-feature:nth-child(1) i { animation-delay: 0s; }
.security-feature:nth-child(2) i { animation-delay: 1s; }
.security-feature:nth-child(3) i { animation-delay: 2s; }

@keyframes securityIconPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.05); 
        opacity: 0.8; 
    }
}

/* Отключение анимаций для пользователей с ограниченной подвижностью */
@media (prefers-reduced-motion: reduce) {
    .hero-icon,
    .hero-icon-pulse,
    .hero-title,
    .stat-number,
    .feature-card,
    .tech-card,
    .algorithm-card,
    .team-card,
    .section-header,
    .security-feature i {
        animation: none !important;
    }
    
    .feature-card,
    .tech-card,
    .algorithm-card,
    .team-card,
    .section-header {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==================== ДОПОЛНИТЕЛЬНЫЕ BOOTSTRAP ИСПРАВЛЕНИЯ ==================== */

/* Bootstrap Alerts */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

/* Bootstrap Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Bootstrap Navbar */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand {
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    margin-right: 1rem;
    font-size: 1.25rem;
    text-decoration: none;
    white-space: nowrap;
}

/* Убираем возможные конфликты с нашими анимациями */
.container *,
.container-fluid *,
.row *,
[class*="col-"] * {
    animation-delay: initial !important;
}

/* Исправляем z-index проблемы */
.navbar {
    z-index: 1030;
}

.modal {
    z-index: 1055;
}

.popover {
    z-index: 1070;
}

.tooltip {
    z-index: 1080;
}

/* ==================== ГЛАВНАЯ СТРАНИЦА СЖАТИЯ PDF (ГОСУДАРСТВЕННЫЙ СТИЛЬ) ==================== */

/* Hero Section */
.compress-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 50%, var(--accent-color) 100%);
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.compress-hero .hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.08) 2px, transparent 2px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    pointer-events: none;
}

.compress-hero .hero-icon i {
    animation: compress-pulse 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes compress-pulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1;
    }
    25% { 
        transform: scale(1.1) rotate(-2deg); 
        opacity: 0.9;
    }
    50% { 
        transform: scale(0.95) rotate(0deg); 
        opacity: 1;
    }
    75% { 
        transform: scale(1.05) rotate(2deg); 
        opacity: 0.9;
    }
}

/* Общие стили секций */
.section {
    margin-bottom: 3rem;
    animation: sectionFadeIn 0.8s ease-out forwards;
}

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

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* ==================== КАРТОЧКИ СЕКЦИЙ ==================== */

.upload-card,
.analysis-card,
.progress-card,
.result-card,
.error-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.upload-card::before,
.analysis-card::before,
.progress-card::before,
.result-card::before,
.error-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.upload-card:hover,
.analysis-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.08);
}

/* ==================== НАЧАЛЬНАЯ СЕКЦИЯ (ЗАГРУЗКА) ==================== */

.drop-zone {
    border: 3px dashed var(--primary-color);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.03), rgba(13, 110, 253, 0.08));
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 48%, rgba(13, 110, 253, 0.05) 50%, transparent 52%);
    background-size: 25px 25px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
    opacity: 1;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(255, 193, 7, 0.08));
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(13, 110, 253, 0.2);
}

.drop-zone.file-selected {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.08), rgba(40, 167, 69, 0.12));
}

body[data-theme="dark"] .drop-zone {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(13, 110, 253, 0.12));
}

/* Upload Icon */
.upload-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.upload-icon {
    font-size: 5rem;
    color: var(--primary-color);
    transition: all var(--transition-normal);
}

.drop-zone:hover .upload-icon {
    transform: scale(1.1);
    color: var(--accent-color);
}

.upload-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 3px solid rgba(13, 110, 253, 0.3);
    border-radius: 50%;
    animation: upload-pulse 2.5s infinite;
}

@keyframes upload-pulse {
    0% { 
        transform: translate(-50%, -50%) scale(0.8); 
        opacity: 1; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.8); 
        opacity: 0; 
    }
}

.drop-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.drop-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.file-requirements {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.requirement {
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-weight: 600;
    border: 2px solid rgba(13, 110, 253, 0.2);
    transition: all var(--transition-normal);
}

.requirement:hover {
    background: rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.2);
}

.file-name {
    font-weight: 600;
    color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid rgba(40, 167, 69, 0.2);
    margin-top: 1rem;
    display: none;
}

/* Form Actions */
.form-actions {
    text-align: center;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 12px;
    border-width: 2px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-width: 250px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0056b3, var(--primary-color));
    border-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.4);
}

.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==================== СЕКЦИЯ АНАЛИЗА ==================== */

.analysis-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.08), rgba(23, 162, 184, 0.12));
    border: 2px solid rgba(23, 162, 184, 0.2);
    border-left: 6px solid #17a2b8;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

body[data-theme="dark"] .analysis-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.12), rgba(23, 162, 184, 0.18));
}

.compression-levels {
    text-align: center;
}

.levels-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.compression-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.compression-btn-wrapper {
    position: relative;
}

.compression-btn {
    width: 100%;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    text-align: left;
}

.compression-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.1), transparent);
    transition: left var(--transition-slow);
}

.compression-btn:hover::before {
    left: 100%;
}

.compression-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(13, 110, 253, 0.2);
}

.compression-btn.recommended {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(255, 193, 7, 0.1));
}

.compression-btn.recommended::before {
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.1), transparent);
}

.compression-btn.recommended:hover {
    border-color: #e0a800;
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.3);
}

.btn-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #e0a800);
    color: #000;
    padding: 0.4rem 1rem;
    border-radius: 0 0 16px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    z-index: 2;
}

.btn-icon {
    width: 80px;
    height: 80px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.btn-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.compression-btn:hover .btn-icon {
    transform: scale(1.1);
    background: rgba(13, 110, 253, 0.15);
}

.compression-btn.recommended .btn-icon {
    background: rgba(255, 193, 7, 0.15);
}

.compression-btn.recommended .btn-icon i {
    color: var(--accent-color);
}

.btn-content {
    flex: 1;
}

.btn-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.btn-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
    font-size: 1rem;
}

.btn-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(13, 110, 253, 0.1);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.compression-btn.recommended .stat-item {
    background: rgba(255, 193, 7, 0.15);
    color: var(--accent-color);
}

.btn-arrow {
    margin-left: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: transform var(--transition-normal);
    flex-shrink: 0;
}

.compression-btn:hover .btn-arrow {
    transform: translateX(8px);
}

/* ==================== СЕКЦИЯ ПРОГРЕССА ==================== */

.progress-container {
    text-align: center;
    padding: 2rem 0;
}

.progress-visualization {
    margin-bottom: 2rem;
}

.progress-circle {
    position: relative;
    display: inline-block;
}

.progress-ring {
    transform: rotate(-90deg);
    margin-bottom: 1rem;
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.progress-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar-container {
    margin-bottom: 2rem;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 6px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    text-align: center;
}

.current-stage {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.progress-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.detail-item {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.progress-actions {
    margin-top: 2rem;
}

/* ==================== СЕКЦИЯ РЕЗУЛЬТАТА ==================== */

.success-icon,
.error-icon {
    font-size: 4rem;
}

.result-info {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.08), rgba(40, 167, 69, 0.12));
    border: 2px solid rgba(40, 167, 69, 0.2);
    border-left: 6px solid var(--success-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #218838);
    border-color: var(--success-color);
    color: white !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #218838, var(--success-color));
    border-color: #1e7e34;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
}

/* ==================== СЕКЦИЯ ОШИБОК ==================== */

.error-message {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08), rgba(220, 53, 69, 0.12));
    border: 2px solid rgba(220, 53, 69, 0.2);
    border-left: 6px solid var(--danger-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.error-actions {
    text-align: center;
}

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-width: 991.98px) {
    .compress-hero {
        min-height: 160px;
        padding: 2rem 1rem;
    }
    
    .compress-hero h1 {
        font-size: 1.75rem;
    }
    
    .upload-card,
    .analysis-card,
    .progress-card,
    .result-card,
    .error-card {
        padding: 2rem;
    }
    
    .drop-zone {
        padding: 3rem 1.5rem;
    }
    
    .compression-buttons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .compress-hero {
        min-height: 140px;
        padding: 1.5rem;
    }
    
    .compress-hero h1 {
        font-size: 1.5rem;
    }
    
    .compress-hero .hero-icon i {
        font-size: 2.5rem;
    }
    
    .upload-card,
    .analysis-card,
    .progress-card,
    .result-card,
    .error-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .drop-title {
        font-size: 1.5rem;
    }
    
    .upload-icon {
        font-size: 3.5rem;
    }
    
    .file-requirements {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .compression-btn {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .btn-icon {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 70px;
        height: 70px;
    }
    
    .btn-icon i {
        font-size: 1.75rem;
    }
    
    .btn-title {
        font-size: 1.25rem;
    }
    
    .btn-stats {
        justify-content: center;
    }
    
    .btn-arrow {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .compression-btn:hover .btn-arrow {
        transform: translateY(5px);
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .progress-details {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 575.98px) {
    .compress-hero h1 {
        font-size: 1.25rem;
    }
    
    .compress-hero .lead {
        font-size: 1rem;
    }
    
    .upload-card,
    .analysis-card,
    .progress-card,
    .result-card,
    .error-card {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .drop-zone {
        padding: 1.5rem 0.75rem;
    }
    
    .drop-title {
        font-size: 1.25rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .btn-lg {
        min-width: auto;
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .compression-btn {
        padding: 1.25rem;
    }
    
    .btn-icon {
        width: 60px;
        height: 60px;
    }
    
    .btn-icon i {
        font-size: 1.5rem;
    }
    
    .btn-title {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .progress-text {
        font-size: 1.5rem;
    }
    
    .success-icon,
    .error-icon {
        font-size: 3rem;
    }
}

/* Темная тема */
body[data-theme="dark"] .upload-card,
body[data-theme="dark"] .analysis-card,
body[data-theme="dark"] .progress-card,
body[data-theme="dark"] .result-card,
body[data-theme="dark"] .error-card {
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 2px 10px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .compression-btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .compression-btn:hover {
    box-shadow: 0 15px 35px rgba(13, 110, 253, 0.3);
}

/* Анимации */
.upload-card {
    animation: slideInUp 0.8s ease-out;
}

.analysis-card {
    animation: slideInLeft 0.8s ease-out;
}

.progress-card {
    animation: fadeIn 0.8s ease-out;
}

.result-card {
    animation: bounceIn 0.8s ease-out;
}

.error-card {
    animation: shakeIn 0.8s ease-out;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes shakeIn {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    60% {
        opacity: 1;
        transform: translateX(30px);
    }
    80% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}

/* Отключение анимаций при необходимости */
@media (prefers-reduced-motion: reduce) {
    .compress-hero .hero-icon i,
    .upload-pulse,
    .progress-bar::after,
    .upload-card,
    .analysis-card,
    .progress-card,
    .result-card,
    .error-card {
        animation: none !important;
    }
    
    .compression-btn::before {
        display: none !important;
    }
}

/* Доступность */
.compression-btn:focus,
.btn:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.drop-zone:focus-within {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Печать */
@media print {
    .upload-card,
    .analysis-card,
    .progress-card,
    .result-card,
    .error-card {
        box-shadow: none;
        border: 2px solid #000;
        break-inside: avoid;
    }
    
    .compress-hero {
        background: white !important;
        color: #000 !important;
        border: 2px solid #000;
    }
    
    .btn {
        background: white !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
}




/* Состояние загрузки для кнопок */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Секция советов */
.mt-4 h5 {
    color: var(--text-primary);
    font-weight: 700;  
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--border-color);
    position: relative;
}

.mt-4 h5::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.mt-4 h5 .fas.fa-lightbulb {
    color: var(--accent-color);
    animation: lightbulb-glow 2s ease-in-out infinite alternate;
}

@keyframes lightbulb-glow {
    from { 
        opacity: 0.8; 
        filter: brightness(1);
    }
    to { 
        opacity: 1; 
        filter: brightness(1.3);
    }
}

.mt-4 ul {
    list-style: none;
    padding-left: 0;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

body[data-theme="dark"] .mt-4 ul {
    background: rgba(52, 58, 64, 0.3);
}

.mt-4 ul li {
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
    font-size: 0.95rem;
}

.mt-4 ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
    top: 0;
    width: 20px;
    height: 20px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mt-4 ul li strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Адаптивность */
@media (max-width: 767.98px) {
    .card-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .card-title::after {
        width: 40px;
    }
    
    .form-label {
        font-size: 1rem;
    }
    
    .form-label::before {
        width: 4px;
        height: 16px;
        margin-right: 0.5rem;
    }
    
    .mb-3:has(.form-control[type="file"]),
    .mb-3:has(.form-select) {
        padding: 1.25rem;
    }
    
    .form-control[type="file"] {
        padding: 1.5rem 1rem;
        min-height: 80px;
    }
    
    .form-control[type="file"]::before {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    .row.g-2 > .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .mt-4 ul {
        padding: 1.25rem;
    }
    
    .mt-4 ul li {
        padding-left: 1.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .card.shadow {
        margin: 0 0.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .alert.alert-info {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .mb-3:has(.form-control[type="file"]),
    .mb-3:has(.form-select) {
        padding: 1rem;
    }
    
    .form-control[type="file"] {
        padding: 1.25rem 0.75rem;
        min-height: 70px;
        font-size: 0.9rem;
    }
    
    .form-select {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1rem;
        font-size: 0.95rem;
    }
    
    .mt-4 ul {
        padding: 1rem;
    }
    
    .mt-4 ul li {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
        padding-left: 1.5rem;
    }
}

/* Темная тема - дополнительные улучшения */
body[data-theme="dark"] .card.shadow {
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 2px 10px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .card.shadow:hover {
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.25);
}

/* Анимации появления */
.card.shadow {
    animation: cardSlideUp 0.6s ease-out;
}

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

.alert.alert-info {
    animation: fadeInLeft 0.8s ease-out 0.2s both;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group,
.mb-3 {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--item-index, 0) * 0.15s);
}

.mb-3:nth-child(1) { --item-index: 1; }
.mb-3:nth-child(2) { --item-index: 2; }
.mb-3:nth-child(3) { --item-index: 3; }
.row.g-2 { --item-index: 4; }
.mt-4 { --item-index: 5; }

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

/* Доступность */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Отключение анимаций при необходимости */
@media (prefers-reduced-motion: reduce) {
    .card-title .fas.fa-eraser,
    .alert.alert-info .fas.fa-info-circle,
    .mt-4 h5 .fas.fa-lightbulb,
    .btn .fas,
    .card.shadow,
    .alert.alert-info,
    .mb-3,
    .form-control[type="file"]::before,
    .mb-3:has(.form-select)::after {
        animation: none !important;
    }
    
    .btn-lg::before {
        display: none !important;
    }
}

/* Печать */
@media print {
    .card.shadow {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .alert.alert-info {
        background: white !important;
        border: 1px solid #000;
    }
    
    .btn {
        background: white !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
    
    .mb-3:has(.form-control[type="file"]),
    .mb-3:has(.form-select) {
        background: white !important;
        border: 1px solid #000;
    }
}
.navbar-custom {
            padding: 0.75rem 0;
            box-shadow: 0 2px 15px rgba(0,0,0,0.05);
            background-color: #fff;
        }

        body[data-theme="dark"] .navbar-custom {
            background-color: #111827;
            box-shadow: 0 2px 15px rgba(0,0,0,0.15);
        }

        /* Логотип */
        .brand-logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo-icon-wrapper {
            position: relative;
            width: 38px;
            height: 38px;
            background-color: #dc2626;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 3px 10px rgba(220, 38, 38, 0.2);
        }

        .logo-icon {
            color: white;
            font-size: 1.2rem;
        }

        .brand-text {
            display: flex;
            flex-direction: column;
        }

        .brand-name {
            font-weight: 700;
            font-size: 1.1rem;
            line-height: 1.1;
            color: #111;
        }

        body[data-theme="dark"] .brand-name {
            color: #f3f4f6;
        }

        .brand-tagline {
            font-size: 0.65rem;
            color: #6b7280;
            letter-spacing: 0.05em;
        }

        body[data-theme="dark"] .brand-tagline {
            color: #9ca3af;
        }

        /* Кнопка мобильного меню */
        .navbar-toggler {
            border: none;
            padding: 0.5rem;
            color: #111;
            border-radius: 8px;
            background-color: rgba(0,0,0,0.03);
        }

        body[data-theme="dark"] .navbar-toggler {
            color: #f3f4f6;
            background-color: rgba(255,255,255,0.05);
        }

        .navbar-toggler:focus {
            box-shadow: none;
            outline: 2px solid rgba(220, 38, 38, 0.25);
        }

        /* Навигационное меню */
        .navbar-nav {
            gap: 6px;
        }

        .nav-item {
            position: relative;
        }

        .nav-link {
            color: #4b5563;
            font-size: 0.95rem;
            font-weight: 500;
            padding: 0.6rem 1rem;
            border-radius: 8px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
        }

        body[data-theme="dark"] .nav-link {
            color: #d1d5db;
        }

        .nav-link:hover {
            color: #dc2626;
            background-color: rgba(220, 38, 38, 0.06);
        }

        .nav-link.active {
            color: #dc2626;
            background-color: rgba(220, 38, 38, 0.1);
            font-weight: 600;
        }

        body[data-theme="dark"] .nav-link:hover {
            background-color: rgba(220, 38, 38, 0.1);
        }

        body[data-theme="dark"] .nav-link.active {
            background-color: rgba(220, 38, 38, 0.15);
        }

        /* Иконки в меню */
        .nav-link i {
            font-size: 0.9rem;
            color: #dc2626;
            opacity: 0.9;
            width: 20px;
            text-align: center;
            transition: transform 0.2s ease;
        }

        .nav-link:hover i {
            transform: translateY(-1px);
        }

        /* Индикатор активного элемента */
        .nav-link.active::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 4px;
            height: 60%;
            background-color: #dc2626;
            border-radius: 0 4px 4px 0;
            transform: translateY(-50%);
            top: 50%;
        }

        /* Выпадающее меню */
        .dropdown-menu {
            margin-top: 8px;
            border: none;
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            padding: 0.5rem;
            min-width: 230px;
            border: 1px solid rgba(0,0,0,0.03);
        }

        body[data-theme="dark"] .dropdown-menu {
            background-color: #1f2937;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
            border-color: rgba(255,255,255,0.05);
        }

        .dropdown-item {
            padding: 0.6rem 0.8rem;
            color: #4b5563;
            font-size: 0.9rem;
            border-radius: 8px;
            margin-bottom: 2px;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.15s ease;
        }

        body[data-theme="dark"] .dropdown-item {
            color: #d1d5db;
        }

        .dropdown-item:last-child {
            margin-bottom: 0;
        }

        .dropdown-item i {
            font-size: 0.85rem;
            color: #dc2626;
            opacity: 0.9;
            width: 20px;
            text-align: center;
        }

        .dropdown-item:hover,
        .dropdown-item:focus {
            color: #dc2626;
            background-color: rgba(220, 38, 38, 0.06);
        }

        body[data-theme="dark"] .dropdown-item:hover,
        body[data-theme="dark"] .dropdown-item:focus {
            background-color: rgba(220, 38, 38, 0.1);
        }

        .dropdown-item.active {
            color: #dc2626;
            background-color: rgba(220, 38, 38, 0.1);
            font-weight: 600;
        }

        body[data-theme="dark"] .dropdown-item.active {
            background-color: rgba(220, 38, 38, 0.15);
        }

        /* Заголовки категорий в выпадающем меню */
        .dropdown-header {
            color: #9ca3af;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 0.5rem 1rem 0.3rem;
        }

        body[data-theme="dark"] .dropdown-header {
            color: #6b7280;
        }

        /* Адаптация для мобильных устройств */
        @media (max-width: 991.98px) {
            .navbar-collapse {
                background-color: #fff;
                border-radius: 12px;
                margin-top: 1rem;
                padding: 1rem;
                box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            }

            body[data-theme="dark"] .navbar-collapse {
                background-color: #1f2937;
                box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            }

            .dropdown-menu {
                box-shadow: none;
                border: none;
                background-color: rgba(0,0,0,0.02);
                margin-top: 0.5rem;
                margin-bottom: 0.5rem;
                padding: 0.5rem;
            }

            body[data-theme="dark"] .dropdown-menu {
                background-color: rgba(255,255,255,0.03);
            }

            .nav-link.active::after {
                display: none;
            }

            /* Плиточное меню для мобильных */
            .mobile-tools-grid {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                margin: 0.5rem 0;
            }

            .mobile-tools-grid .dropdown-item {
                text-align: center;
                flex-direction: column;
                padding: 1rem 0.5rem;
            }

            .mobile-tools-grid .dropdown-item i {
                font-size: 1.1rem;
                margin-bottom: 0.5rem;
                width: auto;
            }
        }

        /* Футер и другие стили из вашего оригинального кода */
        .footer-contacts {
            font-size: 0.9rem;
            opacity: 0.85;
        }

        .footer-links a {
            transition: opacity 0.2s;
        }

        .footer-links a:hover {
            opacity: 0.8;
            text-decoration: none !important;
        }

        /* Адаптивность для футера */
        @media (max-width: 767.98px) {
            .footer-actions {
                text-align: left !important;
                margin-top: 1rem;
            }

            .footer-links small {
                margin-bottom: 0.5rem;
            }
        }
/* Уведомления */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.notification-toast {
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .notification-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* ==================== PDF COMPRESSOR PAGE STYLES ==================== */
/* Стили для страницы сжатия PDF (вынесены из index.html) */

/* Утилиты для скрытия элементов */
.hidden {
    display: none !important;
}

.section-hidden {
    display: none;
}

/* Простой заголовок страницы */
.page-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

body[data-theme="dark"] .page-title {
    color: #ffffff;
}

.page-subtitle {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Упрощенные карточки */
.upload-card,
.analysis-card,
.progress-card,
.result-card,
.error-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

body[data-theme="dark"] .upload-card,
body[data-theme="dark"] .analysis-card,
body[data-theme="dark"] .progress-card,
body[data-theme="dark"] .result-card,
body[data-theme="dark"] .error-card {
    background: #1a1a2e;
    border-color: #2d2d44;
}

/* Упрощенная зона загрузки */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.03);
}

.drop-zone.file-selected {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.03);
}

body[data-theme="dark"] .drop-zone {
    background: #0d1117;
    border-color: #30363d;
}

.upload-icon-wrapper {
    margin-bottom: 1.5rem;
}

.upload-icon {
    font-size: 3rem;
    color: #007bff;
}

.drop-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

body[data-theme="dark"] .drop-title {
    color: #ffffff;
}

.drop-text {
    color: #666;
    margin-bottom: 1rem;
}

body[data-theme="dark"] .drop-text {
    color: #cccccc;
}

.file-requirements {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.requirement {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.file-name {
    margin-top: 1rem;
    font-weight: 600;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: none;
}

.file-name:not(:empty) {
    display: block;
}

/* Упрощенные кнопки сжатия */
.compression-buttons {
    display: grid;
    gap: 0.8rem;
}

.compression-btn {
    width: 100%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    text-align: left;
    transition: all 0.2s ease;
}

body[data-theme="dark"] .compression-btn {
    background: #0d1117;
    border-color: #30363d;
}

.compression-btn:hover {
    background: rgba(0, 123, 255, 0.03);
    border-color: #007bff;
    transform: translateY(-1px);
}

.compression-btn.recommended {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.03);
}

.compression-btn.recommended:hover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.btn-badge {
    position: absolute;
    top: -4px;
    right: 1rem;
    background: #28a745;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.btn-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.compression-btn.recommended .btn-icon {
    background: rgba(40, 167, 69, 0.1);
}

.compression-btn.recommended .btn-icon i {
    color: #28a745;
}

.btn-icon i {
    font-size: 1.2rem;
    color: #007bff;
}

.btn-content {
    flex: 1;
}

.btn-title {
    font-size: 1.1rem;
    color: #333;
    display: block;
    margin-bottom: 0.2rem;
}

body[data-theme="dark"] .btn-title {
    color: #ffffff;
}

.btn-description {
    color: #666;
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

body[data-theme="dark"] .btn-description {
    color: #cccccc;
}

.btn-stats {
    display: flex;
    gap: 0.8rem;
}

.stat-item {
    background: rgba(0, 123, 255, 0.08);
    color: #007bff;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.compression-btn.recommended .stat-item {
    background: rgba(40, 167, 69, 0.08);
    color: #28a745;
}

.btn-arrow {
    margin-left: 1rem;
    color: #007bff;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.compression-btn.recommended .btn-arrow {
    color: #28a745;
}

.compression-btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* Секции */
.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

.form-actions {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-lg {
    padding: 0.7rem 1.8rem;
    font-size: 1.1rem;
    border-radius: 25px;
    position: relative;
}

.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.btn-spinner.show {
    display: block;
}

/* Прогресс */
.progress-container {
    text-align: center;
}

.progress-visualization {
    margin-bottom: 1.5rem;
}

.progress-circle {
    position: relative;
    display: inline-block;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(0, 123, 255, 0.1);
    stroke-width: 6;
}

.progress-ring-fill {
    fill: none;
    stroke: #007bff;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.3s ease;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.progress-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #007bff;
}

.progress-bar-container {
    margin-bottom: 1.5rem;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #007bff;
    border-radius: 3px;
    width: 0;
    transition: width 0.3s ease;
}

.current-stage {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

body[data-theme="dark"] .current-stage {
    color: #ffffff;
}

.progress-details {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.detail-item {
    color: #666;
    font-size: 0.85rem;
}

body[data-theme="dark"] .detail-item {
    color: #cccccc;
}

.progress-actions {
    margin-top: 1.5rem;
}

/* Иконки результатов */
.success-icon i,
.error-icon i {
    font-size: 3rem;
}

/* Кнопки результатов */
.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.result-actions .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 180px;
}

.result-actions .btn:hover {
    transform: translateY(-1px);
}

.error-actions {
    text-align: center;
    margin-top: 1.5rem;
}

/* Исправляем стили для кнопки скачивания */
.result-actions .btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.result-actions .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: #ffffff;
}

.result-actions .btn-success:focus,
.result-actions .btn-success:active {
    background-color: #1e7e34;
    border-color: #1c7430;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Для темной темы */
body[data-theme="dark"] .result-actions .btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

body[data-theme="dark"] .result-actions .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: #ffffff;
}

/* Дополнительно исправляем все кнопки в секции результатов */
.result-actions .btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background-color: transparent;
}

.result-actions .btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

body[data-theme="dark"] .result-actions .btn-outline-primary {
    color: #4dabf7;
    border-color: #4dabf7;
}

body[data-theme="dark"] .result-actions .btn-outline-primary:hover {
    background-color: #4dabf7;
    border-color: #4dabf7;
    color: #000000;
}

/* Адаптивность для страницы сжатия PDF */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.6rem;
    }
    
    .file-requirements {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .compression-btn {
        padding: 1rem;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.8rem;
    }
    
    .btn-stats {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .progress-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-actions .btn {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .upload-card,
    .analysis-card,
    .progress-card,
    .result-card,
    .error-card {
        padding: 1.5rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .drop-title {
        font-size: 1.2rem;
    }
}
