* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: #070716; color: white; overflow-x: hidden; }

/* Анимированный фон со звездами */
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.5; z-index: -2;
    animation-delay: var(--stars-delay, 0s);
}
@keyframes stars { from { transform: translate(0, 0) } to { transform: translate(-1000px, -500px) } }

/* Падающие звезды */
.star-fall {
    position: fixed; width: 2px; height: 2px; background: white;
    box-shadow: 0 0 10px white; border-radius: 50%; opacity: 0;
    animation: falling 4s linear infinite; z-index: -1;
}
@keyframes falling {
    0% { transform: translateY(-10vh) translateX(0); opacity: 1; }
    100% { transform: translateY(110vh) translateX(200px); opacity: 0; }
}

/* Мистическая темная Луна */
.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;
    animation-delay: var(--moon-delay, 0s);
    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);
    }
}
.member-avatar { 
    width: 180px; 
    height: 180px; 
    border-radius: 50%;    /* Делает картинку круглой */
    object-fit: cover;     /* Чтобы лицо не сплющивалось */
    display: block; 
    margin: 0 auto 20px; 
}

/* Цвета обводок и свечения */
.ava-gold { border: 4px solid #ffd700; box-shadow: 0 0 20px #ffd700; }
.ava-vip { border: 4px solid #00f2ff; box-shadow: 0 0 15px #00f2ff; }
.ava-l { border: 3px solid #ffffff; box-shadow: 0 0 10px rgba(255,255,255,0.5); }
.ava-m { border: 4px solid #00ff00; box-shadow: 0 0 15px #00ff00; }
/* Единый стандарт навигации — ЖЕСТКАЯ ФИКСАЦИЯ */
.main-nav {
    display: flex; 
    align-items: center; 
    justify-content: center; /* Центрирует всё по умолчанию */
    height: 70px;    
    gap: 20px;
    padding: 0 30px;
    position: sticky; 
    top: 0; 
    z-index: 1000;
    background: rgba(7, 7, 22, 0.9); 
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(145, 71, 255, 0.3);
    box-sizing: border-box;
}

/* Эта настройка сработает ТОЛЬКО на странице с кнопкой */
.main-nav .button_right {
    position: absolute; /* Кнопка "выходит" из потока и не мешает центру */
    right: 30px;        /* Прижимаем к правому краю навигации */
}

.main-nav .nav-back {
    position: absolute;
    left: 30px;
}

/* Обычные ссылки всегда будут по центру экрана */
.nav-link {
    text-decoration: none; 
    color: rgba(255, 255, 255, 0.7); 
    font-weight: bold; 
    padding: 8px 18px; 
    border-radius: 10px; 
    border: 1px solid rgba(145, 71, 255, 0.2); 
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    height: 40px;
}

.nav-link {
    text-decoration: none; 
    color: rgba(255, 255, 255, 0.7); 
    font-weight: bold; 
    padding: 8px 18px; 
    border-radius: 10px; 
    border: 1px solid rgba(145, 71, 255, 0.2); 
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    height: 40px; /* Кнопки тоже одной высоты */
}
/* Сетка для главной */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 800px) {
    .main-grid { grid-template-columns: 1fr; }
}

/* Стили подзаголовка */
.subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

/* Расписание */
.schedule-list {
    list-style: none;
    margin-top: 15px;
    text-align: left;
}

.schedule-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(145, 71, 255, 0.1);
}

.schedule-list span {
    color: #ff4dff;
    font-weight: bold;
    margin-right: 10px;
}

/* Теги (интересы) */
.tags-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tag {
    background: rgba(145, 71, 255, 0.2);
    border: 1px solid #9147ff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.tag:hover {
    background: #9147ff;
    box-shadow: 0 0 10px #9147ff;
}

/* Анимация карточек при загрузке */
.card {
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Задержка для второй карточки, чтобы они появлялись по очереди */
.card:nth-child(2) {
    animation-delay: 0.2s;
}

body.no-entry-anim .card {
    animation: none;
}

body.no-entry-anim .nav-link,
body.no-entry-anim .button,
body.no-entry-anim .button_right {
    transition: none;
}
/* Активная вкладка */
.nav-link.active { 
    color: white;
    background: #9147ff; 
    box-shadow: 0 0 15px rgba(145, 71, 255, 0.5); 
    border-color: #ff4dff;
    transform: scale(1.1); /* Легкое увеличение */
}

/* Контейнеры и Карточки */
.container { max-width: 850px; margin: auto; padding: 10px 10px; }
.title {
    text-align: center; font-size: clamp(40px, 8vw, 70px); margin-bottom: 5px;
    background: linear-gradient(45deg, #9147ff, #ff4dff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    transition: 0.5s;
}
.card {
    background: rgba(20, 20, 50, 0.6); 
    backdrop-filter: blur(10px);
    border-radius: 20px; 
    padding: 20px;        /* Уменьшили с 30 до 20 */
    margin-bottom: 15px;  /* Уменьшили с 30 до 15 */
    border: 1px solid rgba(145, 71, 255, 0.2); 
    transition: 0.3s;
}
.card:hover { border-color: #9147ff; box-shadow: 0 0 30px rgba(145, 71, 255, 0.3); }

/* Кнопки */
.button {
    display: inline-block; padding: 12px 24px; margin: 8px 4px;
    background: linear-gradient(45deg, #9147ff, #ff4dff);
    color: white; text-decoration: none; border-radius: 10px;
    font-weight: bold; transition: 0.3s; border: none; cursor: pointer;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 0 20px #ff4dff; }

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.social-link {
    min-width: 92px;
    padding: 10px 10px 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.12)), var(--social-bg, #2a2a3a);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease, background 0.25s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 255, 255, 0.12);
}

.social-link svg,
.social-link img {
    width: 34px;
    height: 34px;
    display: block;
    overflow: visible;
}

.social-link svg {
    fill: currentColor;
}

.social-link img {
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.25));
}

.social-label {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.social-link--twitch { --social-bg: #9146ff; }
.social-link--telegram { --social-bg: #229ed9; }
.social-link--youtube { --social-bg: #ff0000; }
.social-link--tiktok { --social-bg: #111113; }
.social-link--steam { --social-bg: #1b2838; }
.social-link--discord { --social-bg: #5865f2; }

.social-link--tiktok:hover {
    box-shadow: 0 0 18px rgba(37, 244, 238, 0.22), 0 0 18px rgba(254, 44, 85, 0.18);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Твоя копия для правой стороны */
.button_right {
    display: inline-block; padding: 12px 24px; margin: 8px 4px;
    background: linear-gradient(45deg, #9147ff, #ff4dff);
    color: white; text-decoration: none; border-radius: 10px;
    font-weight: bold; transition: 0.3s; border: none; cursor: pointer;
    float: right; /* Это заставит кнопку улететь в правый край */
}

/* Не забываем добавить ховер и для правой кнопки */
.button_right:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 0 20px #ff4dff; 
}
/* Twitch */
.twitch-container {
    width: 100%; aspect-ratio: 16 / 9; border-radius: 15px;
    overflow: hidden; border: 2px solid #9147ff; margin: 25px 0;
    box-shadow: 0 0 20px rgba(145, 71, 255, 0.5);
}


/* Табы */
.tab-content { display: none; padding: 20px; animation: fadeIn 0.5s; border-top: 1px solid rgba(255,255,255,0.1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

footer { text-align: center; padding: 40px; opacity: 0.5; font-size: 0.9em; }

@media (max-width: 600px) {
    .main-nav {
        height: auto;
        padding: 10px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .main-nav .nav-back {
        position: static;
        flex: 0 0 100%;
        margin: 6px 0 0;
        text-align: center;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
        height: 38px;
    }

    .button {
        padding: 10px 18px;
    }

    .container {
        padding: 12px 12px;
    }

    .member-avatar {
        width: 140px;
        height: 140px;
    }

    .moon {
        top: 10px;
        right: 10px;
        width: 90px;
        height: 90px;
    }
}
