/* --- БАЗОВЫЕ НАСТРОЙКИ --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Segoe UI', Tahoma, sans-serif; 
    background: #070716; color: white; 
    overflow-x: hidden; width: 100%;
}

/* Фон со звездами */
body::before {
    content: ""; position: fixed; width: 200%; height: 200%;
    background: url("https://www.transparenttextures.com/patterns/stardust.png");
    animation: stars 150s linear infinite; opacity: 0.4; z-index: -2;
}
@keyframes stars { from { transform: translate(0, 0) } to { transform: translate(-1000px, -500px) } }

/* Мистическая темная Луна */
.moon {
    position: fixed;
    top: 60px;
    right: 80px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    z-index: -1;

    /* Глубокий темный градиент с "пепельной" текстурой */
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 70% 60%, rgba(0, 0, 0, 0.3) 0%, transparent 30%),
        #1a1a2e; /* Темный сине-черный базовый цвет */

    /* Внутреннее свечение только по краю, создающее эффект затмения */
    box-shadow: 
        inset -10px -10px 30px rgba(0, 0, 0, 0.8), 
        inset 5px 5px 15px rgba(145, 71, 255, 0.3),
        0 0 20px rgba(145, 71, 255, 0.4), 
        0 0 50px rgba(145, 71, 255, 0.2);

    /* Плавная анимация левитации */
    animation: moon-dark-float 15s ease-in-out infinite;
    will-change: transform;
    filter: blur(0.5px); /* Легкое размытие для мягкости */
}

/* Эффект неонового гало позади луны */
.moon::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%;
    background: #9147ff;
    filter: blur(40px);
    opacity: 0.2;
    z-index: -2;
}

@keyframes moon-dark-float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        box-shadow: 0 0 30px rgba(145, 71, 255, 0.3);
    }
    50% {
        transform: translate(-10px, -20px) rotate(3deg);
        box-shadow: 0 0 50px rgba(145, 71, 255, 0.5);
    }
}

/* --- КОМПАКТНЫЙ HEADER --- */
.main-nav {
    background: rgba(10, 10, 30, 0.95);
    padding: 10px 5px;
    border-bottom: 2px solid #9147ff;
    position: sticky; top: 0; z-index: 1000;
    backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    flex-wrap: wrap; gap: 8px;
}

.nav-link {
    color: white; text-decoration: none;
    padding: 6px 12px; font-size: 14px; font-weight: 600;
    transition: 0.2s; border-radius: 6px; white-space: nowrap;
}

.nav-link:hover, .nav-link.active { 
    color: #ff4dff; background: rgba(145, 71, 255, 0.15);
}

/* Кнопка "Назад" */
.main-nav .button {
    padding: 6px 12px; font-size: 13px; margin: 0;
    background: #9147ff; min-width: auto;
}

/* --- КОНТЕНТ --- */
.container {
    max-width: 1000px; margin: 20px auto; padding: 0 15px;
}

.title {
    text-align: center;
    font-size: clamp(1.5em, 8vw, 2.5em);
    margin: 20px 0; text-transform: uppercase;
    background: linear-gradient(to right, #9147ff, #ff4dff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.card {
    background: rgba(20, 20, 40, 0.7); border-radius: 15px;
    padding: 20px; margin-bottom: 20px; border: 1px solid rgba(145, 71, 255, 0.1);
}

.button, .button_right {
    display: inline-block; padding: 10px 20px;
    background: linear-gradient(45deg, #9147ff, #ff4dff);
    color: white; text-decoration: none; border-radius: 8px;
    font-weight: bold; text-align: center; transition: 0.3s;
}
.button_right { float: right; }

/* --- ФУТЕР (ВОЗВРАЩАЕМ) --- */
footer {
    text-align: center; padding: 40px; opacity: 0.6;
    font-size: 0.9em; letter-spacing: 2px;
}

/* --- МОБИЛЬНЫЕ ПРАВКИ --- */
@media (max-width: 768px) {
    .main-nav { gap: 5px; }
    .nav-link { font-size: 13px; padding: 5px 8px; }
    .button_right { float: none; display: block; width: 100%; margin-top: 10px; }
    .moon { width: 60px; height: 60px; top: 5%; } /* Уменьшаем луну */
}

@media (max-width: 480px) {
    .nav-link { font-size: 12px; padding: 4px 6px; flex: 1 1 30%; text-align: center; }
    .container { padding: 0 10px; }
    /* Чтобы луна не перекрывала текст на очень узких экранах */
    .moon { opacity: 0.3; } 
}