/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ 404 ===== */
/* В стилях сохранена цветовая гамма и стилистика основного сайта */

.error-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ec 100%);
    margin-top: 0;
}

.error-container {
    max-width: 900px;
    width: 100%;
    text-align: center;
    background: white;
    padding: 3rem 2rem;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s ease-out;
}

/* Анимированная цифра 404 */
.error-code {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    animation: glitch 3s infinite;
}

.zero {
    display: inline-block;
    animation: spin 8s linear infinite;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glitch {
    0%, 100% { transform: skew(0deg, 0deg); opacity: 1; }
    95% { transform: skew(2deg, 1deg); opacity: 0.9; }
    96% { transform: skew(-2deg, -1deg); }
    97% { transform: skew(0deg, 0deg); }
}

/* Иллюстрация с танцующим человечком */
.error-illustration {
    margin: 2rem 0;
    padding: 1rem;
}

.error-svg {
    max-width: 300px;
    width: 100%;
    height: auto;
    animation: bounce 3s ease-in-out infinite;
}

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

.error-svg circle,
.error-svg line {
    animation: dance 4s ease-in-out infinite;
}

@keyframes dance {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* Заголовок */
.error-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: #2c3e50;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.error-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Текстовое сообщение */
.error-message {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
    text-align: center;
}

.error-message p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1rem;
}

.error-message p:last-child {
    margin-bottom: 0;
}

.error-hint {
    font-style: italic;
    color: #666;
    font-size: 1rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Кнопки действий */
.error-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2.5rem 0;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 1rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    cursor: pointer;
    text-decoration: none;
    min-width: 220px;
    position: relative;
    overflow: hidden;
}

.error-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.3);
}

.error-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transition: left 0.4s ease;
    z-index: 1;
}

.error-btn-primary:hover::before {
    left: 0;
}

.error-btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.error-btn-primary:active {
    transform: translateY(-2px) scale(1.02);
}

.error-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.error-btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-5px) scale(1.05);
    border-color: #764ba2;
    color: #764ba2;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
}

.error-btn-secondary:active {
    transform: translateY(-2px) scale(1.02);
}

.error-btn .btn-icon {
    font-size: 1.3rem;
    position: relative;
    z-index: 2;
}

.error-btn .btn-text {
    position: relative;
    z-index: 2;
}

/* Блок рекомендаций */
.error-suggestions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed #e9ecef;
}

.error-suggestions p {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.suggestion-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.suggestion-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.suggestion-link:hover {
    transform: translateY(-3px);
    background: white;
    border-color: #667eea;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.suggestion-link:active {
    transform: translateY(-1px);
}

.suggestion-link .link-icon {
    font-size: 1.1rem;
}

/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .error-section {
        padding: 6rem 1.5rem 3rem;
        min-height: calc(100vh - 150px);
    }
    
    .error-container {
        padding: 2rem 1.5rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .error-btn {
        width: 100%;
        max-width: 300px;
        min-width: auto;
    }
    
    .error-message p {
        font-size: 1rem;
    }
    
    .suggestion-links {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-link {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .error-section {
        padding: 5rem 1rem 2rem;
    }
    
    .error-container {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }
    
    .error-code {
        font-size: 5rem;
    }
    
    .error-title {
        font-size: 1.8rem;
    }
    
    .error-message {
        padding: 1rem;
    }
    
    .error-hint {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .error-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Для устройств с высоким разрешением */
@media (min-width: 1400px) {
    .error-container {
        max-width: 1000px;
        padding: 4rem 3rem;
    }
}

/* Поддержка темной темы (если пользователь включил) */
@media (prefers-color-scheme: dark) {
    .error-container {
        background: #1a1f2c;
        box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    }
    
    .error-title {
        color: #e4e7ec;
    }
    
    .error-message {
        background: #2d3548;
    }
    
    .error-message p {
        color: #cbd5e0;
    }
    
    .error-hint {
        background: #1a1f2c;
        color: #a0aec0;
    }
    
    .error-suggestions {
        border-top-color: #2d3548;
    }
    
    .error-suggestions p {
        color: #e4e7ec;
    }
    
    .suggestion-link {
        background: #2d3548;
        color: #e4e7ec;
    }
    
    .suggestion-link:hover {
        background: #1a1f2c;
        color: #a0aec0;
        border-color: #667eea;
    }
    
    .error-btn-secondary {
        background: #2d3548;
        color: #a0aec0;
        border-color: #667eea;
    }
    
    .error-btn-secondary:hover {
        background: #1a1f2c;
        color: white;
    }
}