/* --- 1. ШРИФТИ ТА ЗМІННІ --- */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@500;600;700;800&family=Press+Start+2P&display=swap&subset=cyrillic');

:root {
    --primary: #b026ff;       /* Основний фіолетовий */
    --accent: #00d2ff;        /* Неоновий блакитний */
    --gold: #ffd700;          /* Золотий для VIP */
    --bg-dark: #050508;       /* Чорний фон */
    --glass: rgba(20, 20, 30, 0.7);   /* Ефект скла */
    --border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes animStar { from { transform: translateY(0); } to { transform: translateY(-100vh); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 50% { transform: translateX(10px); } 75% { transform: translateX(-10px); } }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    /* Глибокий космічний градієнт */
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    color: white;
    font-family: 'Exo 2', sans-serif;
    min-height: 100vh;
    display: flex; flex-direction: column;
    overflow-x: hidden; /* Щоб зірки не створювали скрол */
    padding-top: 100px;
}

/* --- 2. КОСМІЧНИЙ ФОН (ЗІРКИ) --- */
#stars-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; overflow: hidden;
    perspective: 1000px;
}

/* Цей клас дозволяє JS рухати шари за мишкою */
.star-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    transition: transform 0.1s ease-out; /* Плавність руху від курсора */
}

/* Генерація зірок через тіні */
#stars-small {
    width: 1px; height: 1px; background: transparent;
    box-shadow: 
        10vw 10vh #fff, 20vw 80vh #fff, 30vw 30vh #fff, 40vw 50vh #fff, 50vw 10vh #fff,
        60vw 90vh #fff, 70vw 40vh #fff, 80vw 20vh #fff, 90vw 70vh #fff, 15vw 60vh #fff,
        25vw 20vh #fff, 35vw 90vh #fff, 45vw 40vh #fff, 55vw 80vh #fff, 65vw 10vh #fff,
        5vw 5vh #fff, 95vw 5vh #fff, 12vw 12vh #fff, 88vw 88vh #fff;
    animation: animStar 100s linear infinite;
}

#stars-medium {
    width: 2px; height: 2px; background: transparent;
    box-shadow: 
        12vw 15vh #ccc, 35vw 45vh #ccc, 68vw 85vh #ccc, 82vw 25vh #ccc, 45vw 75vh #ccc,
        90vw 10vh #ccc, 20vw 90vh #ccc, 55vw 30vh #ccc, 10vw 50vh #ccc;
    animation: animStar 70s linear infinite;
}

#stars-large {
    width: 3px; height: 3px; background: transparent;
    box-shadow: 
        5vw 80vh #aaa, 25vw 10vh #aaa, 50vw 50vh #aaa, 75vw 90vh #aaa;
    animation: animStar 40s linear infinite;
}

#stars-small::after, #stars-medium::after, #stars-large::after {
    content: " "; position: absolute; top: 100vh; width: 100%; height: 100%; 
    background: transparent; box-shadow: inherit;
}


/* --- 3. НАВІГАЦІЯ --- */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; /* Відступи з боків */
    height: 80px;    /* Фіксована висота шапки */
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1; /* Займає вільне місце зліва */
    font-family: 'Press Start 2P', cursive;
    font-size: 18px;
    cursor: pointer;
    white-space: nowrap; /* Щоб текст не переносився */
}

.logo-img {
    height: 40px; 
    width: auto; 
    filter: drop-shadow(0 0 5px rgba(176, 38, 255, 0.5));
    transition: 0.3s;
}

/* --- ЕФЕКТИ ПРИ НАВЕДЕННІ (HOVER) --- */

/* 1. Картинка крутиться і світиться */
.nav-logo:hover .logo-img { 
    transform: rotate(-10deg) scale(1.1);
    filter: drop-shadow(0 0 15px var(--accent));
}

/* 2. Текст теж починає світитися */
.nav-logo:hover { 
    color: white; /* Тримаємо білим */
    text-shadow: 0 0 15px var(--primary), 0 0 30px var(--accent); /* Магічне світіння тексту */
}

.menu {
    display: flex;
    align-items: center;
    justify-content: center; /* Центруємо кнопки всередині */
    gap: 20px;
    position: relative; 
    transform: none;
    left: auto;
}

.menu-btn {
    background: none;
    border: none;
    color: #8892b0; /* Сірий колір за замовчуванням */
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    position: relative; /* Для позиціювання лінії */
    padding: 10px 5px;
    transition: color 0.3s;
}

.menu-btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0; /* Спочатку смужки немає */
    height: 2px;
    background-color: #00d2ff; /* Неон */
    box-shadow: 0 0 10px #00d2ff;
    transition: width 0.3s ease; /* Плавна анімація */
}

.menu-btn:hover { color: white; }
.menu-btn:hover::after { width: 100%; }
.menu-btn.active { color: white !important; }
.menu-btn.active::after { width: 100% !important; }

/* Ефект при наведенні */
.login-nav-btn:hover {
    background: var(--primary); /* Заливка фіолетовим */
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.6); /* Сильне світіння */
    transform: translateY(-2px); /* Підскакує */
    text-shadow: 0 0 5px white;
}

/* Контейнер для правої частини шапки */
nav > div:last-child {
   display: flex;
   align-items: center;
   justify-content: flex-end; /* Притискаємо до правого краю */
   gap: 15px;
   flex: 1; /* Займає вільне місце справа (так само як і лого зліва) */
}

/* --- 4. ОСНОВНІ БЛОКИ (SECTIONS) --- */
.page-section {
    display: none; padding: 60px 20px; max-width: 1200px; margin: 0 auto; width: 100%;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-section.active { display: block; }


/* --- 5. ГОЛОВНА (HERO) --- */
.hero { text-align: center; margin-bottom: 80px; position: relative; z-index: 2; }

.hero-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 50px; margin-bottom: 20px; color: white;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(176, 38, 255, 0.5), 4px 4px 0 #000;
}
.hero-title2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px; 
    color: white;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(176, 38, 255, 0.5), 4px 4px 0 #000;
    
    /* ВАЖЛИВО: Прибираємо зайві відступи, які піднімали текст */
    margin: 0; 
    line-height: 1; /* Робить висоту рядка компактною */
}
.outline-text {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    text-shadow: 0 0 25px rgba(0, 210, 255, 0.3);
}
.subtitle { color: #8892b0; letter-spacing: 4px; font-size: 14px; margin-bottom: 50px; text-transform: uppercase; }


/* --- 6. БЛОКИ IP (СИМЕТРИЧНІ) --- */
.ip-container {
    display: flex; justify-content: center; gap: 30px;
    flex-wrap: wrap; margin-top: 30px;
}
.ip-box {
    flex: 1; min-width: 280px; max-width: 450px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: var(--border);
    padding: 25px; border-radius: 12px;
    cursor: pointer; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 20px;
    transition: 0.3s;
}
.ip-box:hover {
    border-color: var(--accent); transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.1);
    background: rgba(255,255,255,0.08);
}
.ip-icon { font-size: 32px; color: var(--gold); }
.ip-content { text-align: left; }
.ip-label { font-size: 10px; color: #888; letter-spacing: 1px; text-transform: uppercase; display: block; margin-bottom: 5px; }
.ip-addr { font-family: 'Press Start 2P'; font-size: 13px; color: white; line-height: 1.6; }
.ip-copy-hint { font-size: 10px; color: var(--accent); opacity: 0; transition: 0.3s; display: block; margin-top: 5px; }
.ip-box:hover .ip-copy-hint { opacity: 1; }


/* --- 7. КАРТКИ (GRID) --- */
.shop-grid, .guide-list {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px; margin-top: 30px;
}
.card {
    background: var(--glass); border: var(--border);
    padding: 20px; border-radius: 10px; position: relative;
    transition: 0.3s;
}
.card:hover { border-color: var(--primary); transform: translateY(-5px); background: rgba(30, 30, 45, 0.8); }
.card h3 { font-family: 'Press Start 2P'; font-size: 14px; margin-bottom: 15px; color: white; line-height: 1.5; }
.card p { color: #a8b2d1; font-size: 15px; line-height: 1.6; }


/* --- 8. ЛОГІН --- */
.login-box {
    max-width: 400px; margin: 40px auto; background: var(--glass);
    padding: 40px; border: 1px solid var(--primary);
    box-shadow: 0 0 30px rgba(176, 38, 255, 0.1); text-align: center;
}
.input-field {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid #444;
    padding: 15px; color: white; margin-bottom: 15px;
    font-family: 'Exo 2'; font-size: 18px; outline: none; transition: 0.3s;
}
.input-field:focus { border-color: var(--accent); }

.action-btn {
    width: 100%; background: var(--primary); border: none; padding: 15px;
    color: white; font-family: 'Press Start 2P'; font-size: 12px; cursor: pointer;
    transition: 0.3s; margin-top: 10px;
}
.action-btn:hover { background: #d06bff; box-shadow: 0 0 15px var(--primary); }


/* --- 9. ПРОФІЛЬ --- */
.profile-head { display: flex; align-items: center; gap: 30px; justify-content: center; margin-bottom: 40px; }
.p-avatar { 
    width: 120px; height: 120px; 
    border: 3px solid var(--accent); 
    box-shadow: 0 0 20px var(--accent); 
    border-radius: 10px; 
    background: transparent; /* Прозорий фон, щоб не перекривати канвас */
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-item { background: rgba(255,255,255,0.03); padding: 20px; border-left: 3px solid var(--primary); }
.stat-val { font-size: 24px; font-weight: 700; color: white; margin-top: 5px; }
.stat-lbl { font-size: 12px; color: #777; letter-spacing: 1px; text-transform: uppercase; }

/* АВАТАР З ПІДКАЗКОЮ */
.avatar-wrapper {
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}
.avatar-wrapper:hover .p-avatar {
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--primary);
}
.cust-hint {
    position: absolute;
    bottom: -10px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white;
    padding: 5px 10px; border-radius: 20px;
    font-size: 10px; font-family: 'Press Start 2P';
    opacity: 0; transition: 0.3s; pointer-events: none;
    white-space: nowrap;
}
.avatar-wrapper:hover .cust-hint { opacity: 1; bottom: 10px; }


/* --- 10. НОВИНИ --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}


.news-card {
    background: rgba(20, 20, 35, 0.9);
    border: 1px solid #444;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    padding: 0; /* Прибираємо внутрішні відступи, бо контент має свої */
}

.news-img {
    width: 100%;
    height: 160px;
    border-radius: 8px 8px 0 0;
    background-size: cover;
    background-position: center;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.news-img-preview {
    width: 100%;
    height: 180px;
    border-bottom: 1px solid #444;
    overflow: hidden;
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center;
    display: block;
}

.collage-item {
    background-size: cover;
    background-position: center;
    width: 100%; 
    height: 100%;
    transition: transform 0.3s;
}

.news-card:hover .collage-item { transform: scale(1.05); }

/* Сітка для 2 картинок */
.news-img-preview.collage-2 { display: flex; }
.news-img-preview.collage-2 .collage-item { width: 50%; border-right: 1px solid rgba(0,0,0,0.5); }

/* Сітка для 3 картинок */
.news-img-preview.collage-3 { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr; height: 100%; }
.news-img-preview.collage-3 .collage-item { width: 100%; height: 100%; }
.news-img-preview.collage-3 .collage-item:nth-child(1) { grid-row: 1 / span 2; border-right: 1px solid rgba(0,0,0,0.5); }
.news-img-preview.collage-3 .collage-item:nth-child(2) { border-bottom: 1px solid rgba(0,0,0,0.5); }

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title-preview {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-date {
    font-size: 10px;
    color: var(--accent);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* КНОПКА READ MORE */
.read-more-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    transition: 0.3s;
    text-transform: uppercase;
    align-self: flex-start;
}

.read-more-btn:hover {
    background: var(--accent);
    color: #000;
}

/* --- МОДАЛЬНЕ ВІКНО НОВИН/ВІКІ (POPUP) --- */
.modal-overlay {
    display: none; /* Приховано за замовчуванням */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Темний фон ззаду */
    z-index: 9999;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; /* Щоб можна було скролити довгий текст */
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid var(--accent);
    margin: 5% auto;
    width: 100%;
    max-width: 800px; /* Максимальна ширина вікна */
    border-radius: 15px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.3);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    line-height: 0.5;
}

.close-btn:hover { color: var(--accent); }

/* Контейнер картинок у модалці */
#modal-img-container img {
    width: 100%; max-height: 500px; object-fit: contain;
    display: block; margin-bottom: 5px;
    border-radius: 4px; border: 1px solid #333;
}

.modal-body {
    padding: 30px;
}

.news-text-full {
    font-size: 16px;
    line-height: 1.6;
    color: #ccc;
    white-space: pre-wrap; /* Зберігає відступи та абзаци */
}

.news-img {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    margin-bottom: 12px;
    border: 1px solid #444;
}

.discord-nav-btn {
    background-color: #5865F2 !important; /* Фіолетовий колір */
    color: white !important;
    border: 1px solid #5865F2 !important;
    display: inline-flex;
    align-items: center;
    gap: 5px; /* Відступ між іконкою і текстом */
}

.discord-nav-btn:hover {
    background-color: #4752c4 !important;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.6);
    transform: translateY(-2px);
}

/* --- 11. WIKI --- */

/* Стилі для контенту всередині модального вікна (Ворд файли) */
#modal-text img {
    max-width: 100%; /* Щоб картинки не вилазили */
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #444;
}

#modal-text h1, #modal-text h2, #modal-text h3 {
    color: var(--primary); /* Колір заголовків як на сайті */
    margin-top: 20px;
}

#modal-text ul, #modal-text ol {
    padding-left: 20px;
    margin-bottom: 10px;
}

.wiki-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 20px;
    width: 250px; /* Фіксована ширина картки */
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: white;
}

.wiki-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.wiki-card h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--accent);
}

.wiki-card p {
    font-size: 12px;
    color: #aaa;
}

/* --- 12. МАГАЗИН --- */
#shop-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    width: 100%;
    margin-top: 20px;
    padding: 10px;
}

/* --- КАРТКА ТОВАРУ --- */
.shop-card {
    background-color: rgba(18, 18, 24, 0.85); /* Темний фон */
    border: 1px solid #2a2a35; /* Ледь помітна рамка */
    border-radius: 15px; /* Заокруглені краї, як просили */
    padding: 25px;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Ефект при наведенні */
.shop-card:hover {
    transform: translateY(-5px);
    border-color: #00eaff; /* Рамка стає акцентною */
    box-shadow: 0 0 25px rgba(0, 234, 255, 0.15); /* Легке світіння навколо картки */
}

/* --- КАРТИНКА --- */
.shop-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
    opacity: 0.9;
}

/* --- ЗАГОЛОВОК (ТЕПЕР ЦЕ АКЦЕНТ!) --- */
.shop-card h3 {
    font-size: 1.5rem; /* Великий шрифт */
    color: #00eaff;    /* Неоновий блакитний колір */
    margin: 5px 0 10px 0;
    font-weight: 800;  /* Дуже жирний */
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(0, 234, 255, 0.4); /* Світіння тексту */
}

/* --- ЦІНА (ТЕПЕР СПОКІЙНА) --- */
.shop-card .price-tag {
    font-size: 1.1rem; /* Менший розмір */
    color: #e0e0e0;    /* Майже білий/світло-сірий (не акцентний) */
    font-weight: 500;  /* Звичайна жирність */
    margin-bottom: 15px;
    opacity: 0.9;      /* Трохи приглушена */
}

/* --- ОПИС --- */
.shop-card p {
    color: #888899; /* Темніший сірий для опису */
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* --- КНОПКА --- */
.shop-card button {
    background: transparent;
    border: 1px solid #00eaff; /* Тонка акцентна рамка */
    color: #ffffff;
    
    padding: 10px 0;
    width: 100%;
    
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.shop-card button:hover {
    background: rgba(0, 234, 255, 0.1); /* Легка підсвітка фону при наведенні */
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.3);
    text-shadow: 0 0 5px white;
}

/* --- 13. МОВА (LANG SWITCHER) --- */

/* Контейнер для випадаючого списку */
.lang-dropdown {
    position: relative !important; /* ЦЕ ТРИМАЄ МЕНЮ НА ПРИВ'ЯЗІ */
    display: flex;
    align-items: center;
}

/* Сама кнопка (Глобус + Мова) */
.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

/* Ефект при наведенні на кнопку */
.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #00d2ff;
    color: white;
}

/* Іконка глобуса */
.lang-btn i {
    font-size: 18px;
    color: var(--accent); /* Блакитна планета */
}

/* Випадаюче меню (Сховане) */
.lang-content {
    display: none; /* Сховано */
    position: absolute;
    
    /* ПОЗИЦІЯ: Рівно під кнопкою */
    top: 100%; 
    right: 0; /* Рівняємо по правому краю кнопки */
    
    margin-top: 10px; /* Відступ від кнопки */
    min-width: 180px; /* Ширина меню */
    
    background: #0c0c14;
    border: 1px solid rgba(138, 43, 226, 0.3); /* Фіолетова рамка */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 9999;
    overflow: hidden;
}

/* Цей клас додасть JS, щоб показати меню */
.show-lang {
    display: block !important;
    animation: fadeIn 0.2s ease;
}

/* Посилання в меню (UA, EN...) */
.lang-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Exo 2', sans-serif;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.lang-content a:last-child { border-bottom: none; }

.lang-content a:hover {
    background: rgba(138, 43, 226, 0.2); /* Підсвітка при наведенні */
    color: white;
    padding-left: 20px; /* Ефект зсуву */
}

/* Прапорці */
.lang-content img {
    width: 20px;
    border-radius: 2px;
}

/* --- КНОПКА LOGIN --- */
.login-nav-btn {
    background: rgba(138, 43, 226, 0.1);
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive; /* Піксельний шрифт */
    font-size: 12px;
    border: 1px solid rgba(138, 43, 226, 0.5);
    transition: 0.3s;
    white-space: nowrap;
}

.login-nav-btn:hover {
    background: #8a2be2;
    box-shadow: 0 0 15px #8a2be2;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Оновлені стилі для NAV */

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px; /* Відступи з боків */
    height: 80px;    /* Фіксована висота шапки */
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- 14. АДАПТИВНІСТЬ (MOBILE) --- */
@media (max-width: 900px) {
    nav {
        flex-direction: column; padding: 15px 10px; position: relative; height: auto;
    }

    /* --- 2. Меню (Кнопки навігації) --- */
    /* Робимо меню горизонтальним скролом (як в Instagram/YouTube) */
    .menu {
        position: static;
        transform: none;
        width: 100%;
        overflow-x: auto; /* Дозволяє гортати пальцем вбік */
        white-space: nowrap; /* Забороняє перенос кнопок */
        justify-content: flex-start; /* Вирівнювання зліва */
        padding-bottom: 5px; /* Місце для скролбару */
        gap: 10px;
        -webkit-overflow-scrolling: touch; /* Плавний скрол на айфонах */
    }

    /* Прибираємо скролбар (щоб було красиво), але скрол працює */
    .menu::-webkit-scrollbar {
        display: none; 
    }

    .subtitle {
        font-size: 14px;
        letter-spacing: 5px;
    }

    /* IP адреси стають одна під одною */
    .ip-container {
        flex-direction: column; gap: 15px; align-items: center;
    }
    .ip-box {
        width: 100%;
        max-width: 300px;
    }

    /* --- 4. Сітки (Новини та Магазин) --- */
    /* Замість 3 колонок робимо 1 колонку */
    .news-grid, 
    .shop-grid, 
    .stat-grid, .guide-list {
        grid-template-columns: 1fr !important; /* Примусово одна колонка */
        gap: 20px;
    }

    /* --- 5. Профіль --- */
    .profile-head {
        flex-direction: column;
        text-align: center;
    }

    .p-avatar { 
        margin-right: 0; margin-bottom: 15px; width: 100px; height: 100px;
    }

    /* --- 6. Модальне вікно (Новини) --- */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .desktop-only { display: none; }
}

/* --- 15. ПАНЕЛЬ КАСТОМІЗАЦІЇ (WARDROBE) --- */
.cust-panel {
    position: fixed;
    top: 0; right: 0;
    width: 100%; height: 100vh;
    background: rgba(5, 5, 8, 0.95); /* Дуже темний фон */
    backdrop-filter: blur(15px);
    z-index: 2000;

    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Приховано за замовчуванням */
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.cust-panel.open {
    opacity: 1; pointer-events: all;
}

/* Анімація розширення рамки */
.cust-layout {
    display: flex;
    width: 90%; max-width: 1000px;
    height: 80vh;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(20, 20, 30, 0.6);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    
    /* Початковий стан для анімації */
    transform: scale(0);
    transform-origin: var(--start-x, 50%) var(--start-y, 50%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s;
}

.cust-panel.open .cust-layout {
    transform: scale(1);
    opacity: 1;
}

/* ЛІВА КОЛОНКА */
.cust-sidebar {
    width: 400px;
    background: rgba(0,0,0,0.3);
    padding: 30px;
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex; flex-direction: column;
}

.cust-title {
    font-family: 'Press Start 2P';
    color: var(--accent);
    margin-bottom: 30px;
    font-size: 20px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

/* ВКЛАДКИ */
.cust-tabs {
    display: flex; gap: 10px; margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.cust-tab {
    background: none; border: none;
    color: #666; font-family: 'Exo 2'; font-weight: 700;
    font-size: 16px; cursor: pointer; transition: 0.3s;
}

.cust-tab.active {
    color: white;
    text-shadow: 0 0 10px white;
}

.cust-content { display: none; flex-grow: 1; overflow-y: auto; }
.cust-content.active { display: block; }

/* ЗАВАНТАЖЕННЯ СКІНА */
.upload-label {
    display: block; width: 100%;
    padding: 15px;
    border: 2px dashed rgba(255,255,255,0.2);
    text-align: center; color: #aaa;
    border-radius: 10px; cursor: pointer; transition: 0.3s;
    font-family: 'Press Start 2P'; font-size: 10px;
}
.upload-label:hover {
    border-color: var(--accent); color: var(--accent);
    background: rgba(0, 210, 255, 0.05);
}

/* ІСТОРІЯ СКІНІВ */
.cust-subtitle { margin: 20px 0 10px; color: #888; font-size: 12px; }

.skin-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.skin-slot {
    aspect-ratio: 1;
    background-color: #111;
    border: 2px solid #333; border-radius: 8px;
    background-size: 800%; /* Зум на лице */
    background-position: -64px -64px;
    cursor: pointer; transition: 0.2s;
    image-rendering: pixelated;
}
.skin-slot:hover { border-color: white; }
.skin-slot.selected { border-color: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* СПИСОК ПЛАЩІВ */
.capes-list { display: flex; flex-direction: column; gap: 10px; }
.cape-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.05); padding: 10px;
    border-radius: 8px; border: 1px solid transparent;
}

.wip-badge {
    background: #333; color: #888;
    padding: 20px; text-align: center;
    border: 1px dashed #555; border-radius: 10px;
    margin-top: 20px; font-family: 'Press Start 2P'; font-size: 10px;
}
.cape-item:hover { border-color: rgba(255,255,255,0.2); }
.cape-btn {
    padding: 5px 10px; border: none; border-radius: 4px;
    font-family: 'Press Start 2P'; font-size: 8px; cursor: pointer;
}
.btn-buy { background: var(--gold); color: black; }
.btn-equip { background: var(--accent); color: black; }
.btn-locked { background: #333; color: #666; cursor: not-allowed; }

/* ПРАВА КОЛОНКА */
.cust-preview {
    flex-grow: 1; position: relative;
    background: radial-gradient(circle at center, #2a2a35 0%, #000 100%);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
}

.cust-preview canvas {
    width: 100% !important; height: 100% !important; outline: none;
}
.close-cust-btn {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; color: white;
    font-size: 40px; cursor: pointer; z-index: 2001;
    line-height: 0.5;
}
.close-cust-btn:hover { color: var(--accent); }

.save-char-btn {
    background: var(--primary); color: white; border:none;
    padding: 15px 40px; font-family: 'Press Start 2P';
    cursor: pointer; margin-top: 20px; border-radius: 30px;
    transition: 0.3s;
    width: 100%;
}
.save-char-btn:hover { box-shadow: 0 0 20px var(--primary); transform: scale(1.05); }

/* Мобільна адаптація */
@media (max-width: 900px) {
    .cust-layout { flex-direction: column-reverse; height: 95vh; width: 95%; }
    .cust-sidebar { width: 100%; height: 50%; }
    .cust-preview { height: 50%; }
}

/* --- 16. IP БЛОКИ (REGION PANEL) --- */
.region-panel {
    width: 100%;
    max-width: 700px; /* Ширше, щоб вмістити дві колонки */
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 0 auto;
}

/* НИЖНЯ ЧАСТИНА (КОЛОНКИ) */
.ip-split {
    display: flex;
    gap: 20px;
}

.ip-block {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.ip-block:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.ip-icon {
    font-size: 24px;
    color: var(--accent);
    opacity: 0.8;
}

.ip-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ip-label {
    font-size: 10px;
    color: #888;
    font-weight: 700;
    margin-bottom: 4px;
}

.ip-address {
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    color: white;
}

.ip-address .port { color: var(--accent); }

.ip-action {
    color: #555;
    font-size: 14px;
    transition: 0.2s;
}

.ip-block:hover .ip-action {
    color: white;
}

/* АДАПТИВНІСТЬ ДЛЯ IP */
@media (max-width: 700px) {
    .ip-split {
        flex-direction: column;
        gap: 10px;
    }
}

/* TOAST NOTIFICATION (ПОВІДОМЛЕННЯ) */
#copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    padding: 10px 25px;
    border-radius: 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    box-shadow: 0 0 20px var(--accent);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#copy-toast.show {
    opacity: 1;
}
