/* ===== 404.CSS - ПОЛНЫЙ АВТОНОМНЫЙ ФАЙЛ ===== */

/* ===== ПЕРЕМЕННЫЕ ЦВЕТОВ ===== */
:root {
    /* Основные цвета */
    --primary: #ff6b00;
    --primary-dark: #e55a00;
    --dark: #121212;
    --dark-light: #1e1e1e;
    --gray: #333333;
    --text: #ffffff;
    --text-secondary: #cccccc;
    --error: #ff4444;
    
    /* Цвета операторов */
    --activ: #ff4757;
    --beeline: #ffd700;
    --tele2: #00a8ff;
    
    /* Соцсети */
    --telegram: #0088cc;
    --whatsapp: #25d366;
    
    /* Тени и эффекты */
    --shadow-light: rgba(255, 107, 0, 0.1);
    --shadow-medium: rgba(255, 107, 0, 0.3);
    --shadow-dark: rgba(255, 107, 0, 0.5);
}

/* ===== СБРОС СТИЛЕЙ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
body {
    font-family: 'Montserrat', sans-serif;
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ctext x='16' y='22' font-family='Arial' font-size='24' text-anchor='middle' fill='%23ff6b00'%3E🃏%3C/text%3E%3C/svg%3E") 16 16, auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ===== ШАПКА ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-icon {
    font-size: 3rem;
    margin-bottom: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1) rotate(15deg);
}

.logo h1 {
    font-family: 'Russo One', sans-serif;
    font-size: 2.5rem;
    color: var(--text);
}

.logo .highlight {
    color: var(--primary);
}

.tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

/* ===== ЯЗЫКОВОЙ ПЕРЕКЛЮЧАТЕЛЬ ===== */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 5px;
    background: rgba(255, 107, 0, 0.2);
    padding: 5px;
    border-radius: 20px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-btn.active {
    background: var(--primary);
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::after {
    left: 100%;
}

.btn-primary {
    background: var(--primary);
    color: var(--text);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(255, 107, 0, 0.1);
    transform: translateY(-2px);
}

.btn-telegram {
    background: var(--telegram);
    color: var(--text);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: var(--text);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 35px;
    min-width: 250px;
}

/* ===== ГЕРОЙ СЕКЦИЯ ===== */
.hero {
    padding: 60px 20px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.hero h2 .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 404 АНИМАЦИЯ ===== */
.error-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    font-family: 'Russo One', sans-serif;
}

.error-digit {
    font-size: 6rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.4);
    animation: pulse404 2s infinite ease-in-out;
}

.error-joker {
    font-size: 5rem;
    animation: rotateJoker 4s infinite linear;
    filter: drop-shadow(0 0 15px rgba(255, 107, 0, 0.6));
    color: var(--primary);
}

@keyframes pulse404 {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 107, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(255, 107, 0, 0.6);
    }
}

@keyframes rotateJoker {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(90deg) scale(1.1);
    }
    50% {
        transform: rotate(180deg) scale(1);
    }
    75% {
        transform: rotate(270deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* ===== КАРТЫ НА ФОНЕ ===== */
.background-joker-cards {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.background-joker-card {
    position: absolute;
    font-size: 1rem;
    opacity: 0.2;
    filter: blur(0.3px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    user-select: none;
    z-index: -1;
    color: var(--primary);
    animation: floatBackground 25s infinite ease-in-out;
}

@keyframes floatBackground {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -20px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 30px) rotate(240deg);
    }
}

/* ===== КАРТЫ ПРИ КЛИКАХ ===== */
#jokerCardsContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.joker-card {
    position: absolute;
    font-size: 1rem;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    user-select: none;
    filter: drop-shadow(0 0 4px rgba(255, 107, 0, 0.6));
    animation: floatCard 1.5s ease-out forwards;
    color: var(--primary);
}

@keyframes floatCard {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.4) rotate(0deg);
    }
    10% {
        opacity: 1;
        transform: translate(var(--tx), var(--ty)) scale(0.7) rotate(var(--rot));
    }
    90% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx2), var(--ty2)) scale(0.5) rotate(var(--rot2));
    }
}

/* ===== СЕКЦИИ ===== */
.section {
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text);
}

.section-title i {
    color: var(--primary);
}

/* ===== ПОМОЩЬ НА СТРАНИЦЕ ОШИБКИ ===== */
.error-help {
    margin-top: 40px;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.help-card {
    background: var(--dark-light);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.help-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.help-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    background: rgba(255, 107, 0, 0.2);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.help-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--text);
}

.help-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 60px;
    line-height: 1.5;
}

.btn-help {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--text);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-help:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

/* ===== ПОДДЕРЖКА ===== */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.support-card {
    background: var(--dark-light);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.support-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.support-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.support-icon.telegram {
    background: rgba(0, 136, 204, 0.2);
    color: var(--telegram);
    border: 2px solid var(--telegram);
}

.support-icon.whatsapp {
    background: rgba(37, 211, 102, 0.2);
    color: var(--whatsapp);
    border: 2px solid var(--whatsapp);
}

.support-icon.channel {
    background: rgba(255, 107, 0, 0.2);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.support-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.support-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 60px;
}

.btn-support {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--text);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-support:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== ФУТЕР ===== */
.footer {
    background: var(--dark-light);
    border-radius: 20px;
    padding: 40px;
    margin-top: 60px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    text-align: left;
}

.footer-logo .logo-icon {
    font-size: 2.5rem;
}

.footer-logo div {
    font-family: 'Russo One', sans-serif;
    font-size: 1.8rem;
    color: var(--text);
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contacts p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray);
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.error-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 10px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.error-note::before {
    content: '⚠️';
    font-size: 1rem;
}

/* ===== КНОПКА НАВЕРХ ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ===== ПРЕЛОАДЕР ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

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

.preloader-text {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--primary);
    font-weight: 600;
}

.loader {
    border: 4px solid rgba(255, 107, 0, 0.3);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .language-switcher {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 20px;
        justify-content: center;
    }
    
    .error-404 {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .error-digit {
        font-size: 4rem;
    }
    
    .error-joker {
        font-size: 3.5rem;
    }
    
    .btn-large {
        min-width: 280px;
        width: 100%;
        max-width: 300px;
        padding: 14px 30px;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .help-card {
        padding: 25px;
    }
    
    .help-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .footer {
        padding: 30px 20px;
    }
    
    .background-joker-card {
        opacity: 0.15;
        font-size: 0.9rem;
    }
    
    .joker-card {
        font-size: 0.9rem;
    }
    
    /* Упрощенные анимации для мобильных */
    .error-digit {
        animation: pulse404Mobile 2s infinite ease-in-out;
    }
    
    .error-joker {
        animation: rotateJokerMobile 6s infinite linear;
    }
    
    @keyframes pulse404Mobile {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.03);
        }
    }
    
    @keyframes rotateJokerMobile {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .error-404 {
        flex-direction: column;
        gap: 5px;
    }
    
    .error-digit {
        font-size: 3.5rem;
    }
    
    .error-joker {
        font-size: 3rem;
        margin: 10px 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .help-card {
        padding: 20px;
    }
    
    .help-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .btn-help {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer-logo {
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    /* Отключаем некоторые эффекты на очень маленьких экранах */
    @media (max-width: 320px) {
        .error-digit {
            animation: none;
        }
        
        .background-joker-card {
            display: none;
        }
        
        .joker-card {
            font-size: 0.8rem;
        }
    }
}

/* ПЛАВНОЕ ПОЯВЛЕНИЕ ЭЛЕМЕНТОВ */
@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-404 {
    animation: fadeInError 0.8s ease;
}

.hero h2 {
    animation: fadeInError 0.8s ease 0.2s both;
}

.hero-subtitle {
    animation: fadeInError 0.8s ease 0.4s both;
}

.cta-buttons {
    animation: fadeInError 0.8s ease 0.6s both;
}

/* СКРОЛЛБАР */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ОПТИМИЗАЦИЯ ДЛЯ МОБИЛЬНЫХ */
@media (prefers-reduced-motion: reduce) {
    .error-digit,
    .error-joker,
    .background-joker-card,
    .joker-card,
    .logo-icon:hover,
    .btn:hover,
    .help-card:hover,
    .support-card:hover {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
