/* CSS переменные */
:root {
    --primary-color: #0088cc;
    --secondary-color: #005580;
    --dark-bg: #1e1e2d;
    --card-bg: #2b2b3d;
    --text-light: #ffffff;
    --text-gray: #a0a0a0;
    --success-color: #26c15f;
    --danger-color: #F44336;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Основные стили */
body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2a2a3a 100%);
    color: var(--text-light);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden; /* скрываем горизонтальный скролл */
}

/* Анимированный фон */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 136, 204, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 85, 128, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(38, 193, 95, 0.08) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
    width: 100%;
    height: 100%;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Контейнер ошибки */
.error-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Левая часть с контентом */
.error-content {
    max-width: 600px;
    padding-right: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    animation: slideInLeft 1s ease-out;
    position: relative;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Номер ошибки с синим свечением */
.error-number {
    display: inline-block; /* важно для gradient + text-shadow */
    font-size: 180px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
    padding-bottom: 15px;
    text-shadow: 0 0 20px rgba(0, 136, 204, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
    animation-fill-mode: both;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(0, 136, 204, 0.5); }
    to { text-shadow: 0 0 40px rgba(0, 136, 204, 0.8); }
}

/* Сообщение об ошибке */
.error-message {
    font-size: 32px;
    color: var(--text-light);
    margin-bottom: 30px;
    font-weight: 300;
    line-height: 1.3;
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Кнопка "На главную" с эффектом свечения */
.home-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 18px 36px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.3);
    animation: fadeInUp 1s ease-out 0.6s both;
    position: relative;
    overflow: hidden;
}

.home-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.home-button:hover::before { left: 100%; }
.home-button:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(0,136,204,0.4); }
.home-button:active { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,136,204,0.3); }
.home-button i { font-size: 20px; transition: transform 0.3s ease; }
.home-button:hover i { transform: scale(1.1); }

/* Правая часть с изображением */
.error-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 1s ease-out 0.3s both;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.error-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
    border: none;
}

@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.error-image img:hover { transform: scale(1.05) translateY(-10px); }

/* Адаптивность */
@media (max-width: 1200px) {
    .error-container { flex-direction: column; text-align: center; padding: 20px 10px; padding-top: 120px; }
    .error-content { padding-right: 0; margin-bottom: 20px; align-items: center; text-align: center; }
    .error-number { font-size: 120px; }
    .error-message { font-size: 24px; }
    .error-image img { width: 400px; height: auto; }
}

@media (max-width: 768px) {
    .error-container { padding-top: 100px; }
    .error-number { font-size: 80px; }
    .error-message { font-size: 20px; }
    .home-button { padding: 15px 30px; font-size: 16px; }
    .error-image img { width: 300px; height: auto; }

    /* отключаем сложные фоновые анимации на мобилках */
    body::before,
    .error-content::before,
    .error-container::after { display: none; }
}

@media (max-width: 480px) {
    .error-container { padding-top: 80px; }
    .error-number { font-size: 60px; }
    .error-message { font-size: 18px; }
    .error-image img { width: 250px; height: auto; }
}
