/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* SCROLL SNAP (Магніт): Увімкнено для ПК */
    --scroll-snap-type: y mandatory;
    --scroll-snap-align: center;
    --scroll-behavior: smooth;

    --font-accent: 'Rajdhani', sans-serif;
    --font-text: 'Montserrat', sans-serif;
    
    --color-bg: #0b0e11;
    --color-text-main: #ffffff;
    --color-text-muted: #aebfd6;
    
    --grad-btn: linear-gradient(135deg, #FFAD33 0%, #D39231 100%);
    --grad-box: linear-gradient(135deg, rgba(20, 53, 108, 0.85) 0%, rgba(26, 43, 71, 0.9) 100%);
    
    --radius-btn: 15px;
    
    --z-background: 1;
    --z-character: 5;
    --z-particles: 10;
    --z-content: 50;
    
    /* Base Font Sizes */
    --size-h1: 3.75rem;
    --size-h3: 1.5rem;
    --size-p: 1rem;
}

/* --- ADAPTATION: 4K MONITORS (min-width: 2000px) --- */
@media (min-width: 2000px) {
    :root {
        --size-h1: 5.5rem;
        --size-h3: 2.2rem;
        --size-p: 1.2rem;
        --radius-btn: 20px;
    }
}

/* --- ADAPTATION: MOBILE / TABLETS (max-width: 991px) --- */
@media (max-width: 991px) {
    :root {
        /* ВАЖЛИВО: Вимикаємо магнітний скрол на телефонах */
        --scroll-snap-type: none; 
        --scroll-snap-align: none;
        --size-h1: 2.5rem; 
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-snap-type: var(--scroll-snap-type);
    scroll-behavior: var(--scroll-behavior);
    overflow-x: hidden;
}

body {
    font-family: var(--font-text);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

.container {
    width: 80%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: var(--z-content);
}


/* =========================================
   3. TYPOGRAPHY & BUTTONS
   ========================================= */
h1, h2, h3, h4 {
    font-family: var(--font-accent);
    color: white;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-transform: uppercase;
}

h1 {
    font-weight: 700;
    font-size: var(--size-h1);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

h3 {
    font-weight: 700;
    font-size: var(--size-h3);
    color: #FFAD33;
}

p {
    font-size: var(--size-p);
    font-weight: 400;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
     color: #ffffff;
}

/* Buttons */
.btn {
    display: inline-block;
    position: relative;
    z-index: 1;
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1;
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 18px 40px;
    border: none;
        cursor: pointer;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25);
}

.btn::before, {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
     background: linear-gradient(135deg, #FFAD33 0%, #ff8c00 100%);;
    transform: skewX(-15deg);
    border-radius: 10px;
    z-index: -1;
    box-shadow: 0 10px 20px rgba(255, 173, 51, 0.4);
    transition: all 0.3s ease;
}

.btn:hover::before, .btn-start-play:hover::before {
    filter: brightness(1.15);
    transform: skewX(-15deg) scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 173, 51, 0.6);
}

.btn-tiny {
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
    transform: skewX(-15deg);
    border-radius: var(--radius-btn);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}
.btn-tiny:hover { filter: brightness(1.2); }

.skew-badge {
    display: inline-block;
    border: 2px solid white;
    padding: 10px 25px;
    color: white;
    font-weight: 700;
    font-family: var(--font-accent);
    text-decoration: none;
    transform: skewX(-15deg) rotate(-3deg);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    margin-bottom: 20px;
}
.skew-badge span { display: block; transform: skewX(15deg); }
.skew-badge:hover {
    background: white; color: black; transform: skewX(0) rotate(0);
}
/* =========================================
   10. HEADER & NAV (FIXED VERSION)
   ========================================= */

.main-header {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    z-index: 1000;
    padding: 15px 0; 
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    transition: all 0.3s ease;
}

.header-container { 
    display: flex; 
    align-items: center;
    justify-content: space-between; 
}

/* --- LOGO --- */
.logo { display: flex; align-items: center; margin-right: 20px; }
.logo img { height: 45px; width: auto; transition: transform 0.3s ease; }
.logo:hover img { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5)); transform: scale(1.05); }

/* --- NAV MENU (Desktop) --- */
.nav-menu { margin-left: auto; margin-right: 30px; }
.nav-menu ul { display: flex; list-style: none; gap: 25px; margin: 0; padding: 0; align-items: center; }
.nav-menu a {
    font-family: var(--font-accent, 'Rajdhani', sans-serif); 
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none; font-weight: 600; font-size: 1rem; 
    text-transform: uppercase; transition: 0.3s; position: relative; letter-spacing: 1px;
}
.nav-menu a:hover, .nav-menu a.active { color: white; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
.nav-menu a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 2px;
    background: #FFAD33; transition: 0.3s;
}
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

/* --- PLAY BUTTON --- */
.btn-header-glass {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 30px; background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 17px rgba(0, 0, 0, 0.2); transform: skewX(-10deg);
    border-radius: 10px; text-decoration: none;
    font-family: var(--font-accent, 'Rajdhani', sans-serif);
    font-weight: 700; font-size: 0.9rem; color: #ffffff; 
    text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease;
}
.btn-header-glass span { display: block; transform: skewX(10deg); }
.btn-header-glass:hover {
    background: #FFAD33; color: #000; border-color: #FFAD33;
    box-shadow: 0 0 20px rgba(255, 173, 51, 0.4); transform: skewX(-10deg) translateY(-2px);
}

/* --- MOBILE TOGGLE (Hidden on Desktop) --- */
.mobile-toggle { display: none; }

/* =========================================
   MOBILE MENU (SIDEBAR SLIDE-IN ANIMATION)
   ========================================= */

/* 1. Обгортка (на весь екран, пропускає кліки, коли неактивна) */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 2000; pointer-events: none; transition: 0.3s;
    visibility: hidden; /* ДОДАТИ ЦЕ: меню повністю приховане для очей */
    opacity: 0;         /* ДОДАТИ ЦЕ: для плавності */
}
.mobile-menu-overlay.active { pointer-events: auto; }

/* 2. Затемнений фон */
.mobile-backdrop {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active .mobile-backdrop { opacity: 1; }

/* 3. Бокова панель (Виїжджає зліва) */
.mobile-sidebar-panel {
    position: absolute; top: 0; left: 0; height: 100%;
    width: 80%; max-width: 300px; /* Ширина шторки */
    background: rgba(11, 14, 17, 0.95); /* Темний фон */
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    display: flex; flex-direction: column; padding: 25px;
    
    /* АНІМАЦІЯ: Зсунуто вліво */
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
/* АНІМАЦІЯ: Повертаємо на місце */
.mobile-menu-overlay.active .mobile-sidebar-panel { transform: translateX(0); visibility: visible; /* ДОДАТИ ЦЕ: робимо видимим */
    opacity: 1; }

/* Стилі всередині меню */
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.mobile-menu-logo { height: 35px; width: auto; }
.close-menu-btn { font-size: 1.5rem; color: rgba(255,255,255,0.7); cursor: pointer; transition: 0.3s; }
.close-menu-btn:hover { color: #FFAD33; transform: rotate(90deg); }

.mobile-nav-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.mobile-nav-links a {
    text-decoration: none; color: white; font-family: var(--font-accent, 'Rajdhani', sans-serif);
    font-size: 1.2rem; font-weight: 600; text-transform: uppercase;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; transition: 0.3s;
}
.mobile-nav-links a:hover { color: #FFAD33; padding-left: 10px; border-color: rgba(255, 173, 51, 0.3); }
.mobile-nav-links a i { font-size: 0.8rem; opacity: 0.5; }

.mobile-menu-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.mobile-menu-footer p { font-size: 0.9rem; color: #8faab9; margin-bottom: 10px; }
.mobile-socials { display: flex; gap: 15px; }
.mobile-socials a { color: white; font-size: 1.2rem; transition: 0.3s; }
.mobile-socials a:hover { color: #FFAD33; }

/* =========================================
   MOBILE ADAPTATION (Left: Burger, Right: Button)
   ========================================= */
@media (max-width: 991px) {

    /* 1. НАЛАШТУВАННЯ КОНТЕЙНЕРА */
    .header-container {
        /* Це розкидає елементи по краях: Ліво <-> Право */
        justify-content: space-between !important; 
        width: 100%;
        padding: 0 44px
    }

    /* 2. ХОВАЄМО ТІЛЬКИ ЛОГО І МЕНЮ */
    .logo, 
    .nav-menu { 
        display: none !important;  
    }

    /* 3. НАЛАШТУВАННЯ ГАМБУРГЕРА (ЗЛІВА) */
    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        color: white;
        cursor: pointer;
        padding: 5px;
        z-index: 1002;

}
    }
    
    .mobile-toggle:hover path {
    stroke: #FFAD33; /* Золотий колір ліній при наведенні */
    transition: 0.3s ease;
    }

    /* 4. НАЛАШТУВАННЯ КНОПКИ PLAY (СПРАВА) */
    /* Важливо: ми її показуємо, але робимо трохи меншою */
    .header-container .btn-header-glass {
        display: inline-flex !important; /* Показуємо! */
        padding: 8px 20px;               /* Зменшуємо відступи */
        font-size: 0.8rem;               /* Зменшуємо шрифт */
        min-width: auto;                 /* Щоб не була занадто широкою */
        margin: 0;                       /* Прибираємо зайві відступи */
    }

/* =========================================
   14. ADVANCED FOOTER (TRANSPARENT GLASS FIX)
   ========================================= */
.main-footer {
    width: 100%;
    
    /* ЗМІНА: Робимо фон більш прозорим і агресивним */
    background: rgba(0, 0, 0, 0.3) !important; /* Було 0.4, стало прозоріше */
    
    /* Зберігаємо ефект матового скла */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    
    padding: 60px 0 30px; 
    margin-top: auto;
    position: relative;
    z-index: 100;
    font-family: var(--font-text);
    
    /* Очищуємо будь-які тіні, які можуть виглядати як фон */
    box-shadow: none !important;
}

/* Сітка для колонок */
.footer-top-grid {
    display: grid;
    /* 4 колонки: Бренд (ширша), 2 меню, Контакти (ширша) */
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; 
    gap: 40px;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 40px;
}

/* Стилі колонок */
.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Логотип і опис */
.brand-col .footer-logo img {
    height: 45px;
    margin-bottom: 20px;
    opacity: 0.9;
}
.footer-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 250px;
}

/* Заголовки колонок */
.footer-heading {
    font-family: var(--font-accent);
    color: #FFAD33; /* Акцентний колір */
    font-size: 1.1rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Списки посилань */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
    padding-left: 0;
}
.footer-links a:hover {
    color: white;
    padding-left: 5px; /* Ефект зсуву при наведенні */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Блок контактів */
.contact-box {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.contact-box span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.email-link {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-accent);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}
.email-link i { color: #FFAD33; }
.email-link:hover { color: #FFAD33; }

/* Соцмережі */
.footer-socials {
    display: flex;
    gap: 12px;
}
.social-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none; transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.social-btn:hover {
    background: var(--grad-btn);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 173, 51, 0.3);
    border-color: transparent;
}

/* Нижній рядок (Copyright) */
.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}
.bottom-links {
    display: flex;
    gap: 20px;
}
.bottom-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: 0.3s;
}
.bottom-links a:hover { color: #FFAD33; }

/* --- ADAPTATION: TABLET (max-width: 991px) --- */
@media (max-width: 991px) {
    .footer-top-grid {
        grid-template-columns: 1fr 1fr; /* Дві колонки */
        gap: 30px;
    }
}

/* --- ADAPTATION: MOBILE (max-width: 576px) --- */
@media (max-width: 576px) {
    .footer-top-grid {
        grid-template-columns: 1fr; /* Одна колонка */
        gap: 40px;
        text-align: center;
    }
    .footer-col {
        align-items: center; /* Центруємо все */
    }
    .footer-links a:hover { padding-left: 0; } /* Вимикаємо зсув */
    
    .footer-bottom-row {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .contact-box { align-items: center; }
}
/* =========================================
   14. GLOBAL WIDGETS (SINGLE DARK BLOCK)
   ========================================= */

#global-widgets-container {
    position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 9999;
}

/* --- СПІЛЬНИЙ СТИЛЬ ФОНУ (Темно-синій блок) --- */
.glass-style {
    /* Глибокий темно-синій фон (як на референсі) */
    background: linear-gradient(180deg, rgba(52, 97, 185, 0) 0%, #0d1424 100%);
    
    /* Тонка рамка */
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Тінь для відриву від фону */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    
    /* Заокруглення */
    border-radius: 20px;
    
    /* Щоб діти не вилазили за межі */
    overflow: hidden; 
    
    /* Ефект скла (опціонально, якщо фон не 100% суцільний) */
    backdrop-filter: blur(20px);
    
}

    
   
/* --- 2. SIDEBAR MENU (СУЦІЛЬНИЙ ОСТРІВЕЦЬ) --- */
#side-sticky-menu {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 10000;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Відступи всередині блоку */
    padding: 25px 10px;
    gap: 19px; /* Відстань між іконками */
    
    /* Ширина всього блоку */
    width: 77px;
}

/* Елемент меню (Прозорий) */
.side-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent; /* Фону немає, фон дає батьківський блок */
    transition: transform 0.3s ease;
    cursor: pointer;
    width: 103%;
}

.side-img {
    width: 55px; /* Великі іконки */
    height: auto;
    fillc : aliceblue
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5)); /* Тінь під іконкою */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 8px;
}

.side-text {
    font-family: var(--font-accent);
    font-size: 0.75rem; 
    font-weight: 600; 
    color: #ffffff;
    text-align: center; 
    text-transform: uppercase; 
    line-height: 1.1;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Ефекти при наведенні */
.side-item:hover .side-img {
    transform: scale(1.2); /* Іконка смачно збільшується */
}

.side-item:hover .side-text {
    color: #FFAD33; /* Текст стає золотим (як акцент на сайті) */
}

/* =========================================
   MOBILE ADAPTATION (Bottom Sticky Bar)
   ========================================= */
@media (max-width: 768px) {

    /* 1. КОНТЕЙНЕР (Сама смужка меню) */
    #side-sticky-menu {
        /* Скидаємо десктопні прив'язки */
        top: auto; 
        transform: none;
        right: 0;
        
        /* Приліплюємо до низу */
        bottom: 0;
        left: 0;
        
        /* Розміри та відступи */
        width: 100%;
        height: auto;
        padding: 10px 5px; /* Менше вертикального відступу */
        padding-bottom: max(10px, env(safe-area-inset-bottom)); /* Врахування "чубчика" iPhone знизу */
        
        /* Вирівнювання в ряд */
        display: flex;
        flex-direction: row; /* Горизонтально */
        justify-content: space-evenly; /* Рівномірний розподіл кнопок */
        align-items: center;
        gap: 0; /* Відступи контролюємо через кнопки */
        
        /* Стиль "Скло" для мобільного */
        border-radius: 15px 15px 0 0; /* Закруглення тільки зверху */
        border-right: 1px solid rgba(255, 255, 255, 0.15); /* Повертаємо рамку справа */
        border-bottom: none; /* Знизу рамка не треба */
        background: rgba(11, 14, 17, 0.95); /* Більш щільний фон для читабельності */
        backdrop-filter: blur(15px);
        box-shadow: 0 -5px 20px rgba(0,0,0,0.6); /* Тінь вгору */
    }

    /* 2. КНОПКА (Елемент меню) */
    .side-item {
        /* Змінюємо вісь: Іконка зліва -> Текст справа */
        flex-direction: row; 
        width: auto; /* Автоматична ширина */
        padding: 5px 10px;
        flex: 1; /* Рівномірне розтягування */
        justify-content: center;
    }

    /* 3. ІКОНКА */
    .side-img {
        width: 28px; /* Менший розмір для мобільного */
        margin-bottom: 0; /* Прибираємо відступ знизу */
        margin-right: 8px; /* Додаємо відступ справа (до тексту) */
        filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
    }

    /* 4. ТЕКСТ */
    .side-text {
        font-size: 0.7rem; /* Компактний шрифт */
        text-align: left;
        line-height: 1.2;
        /* Можна сховати текст на дуже вузьких екранах, якщо треба */
    }

    /* Активний стан при натисканні пальцем */
    .side-item:active .side-img {
        transform: scale(1.1);
    }
    .side-item:active .side-text {
        color: #FFAD33;
    }
    
    /* Корекція кнопки Discord (щоб не перекривала меню) */
   #join_discord_btn{
        bottom: 75px; /* Піднімаємо вище меню */
        left: 10px;
        z-index: 9999;
    }
}
/* =========================================
   UNIVERSAL CHARACTER DETAIL CARD
   ========================================= */

/* ЗНАЙДИ ЦЕЙ БЛОК І ЗАМІНИ ЙОГО ПОВНІСТЮ */
.char-detail-card {
    display: flex;
    background: rgba(13, 20, 36, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    overflow: hidden;
    
    /* ЗМІНА ТУТ: */
    width: 100%;      /* Займає всю доступну ширину */
    max-width: 100%;  /* Прибираємо обмеження в 900px */
    
    margin: 0 auto;
    color: white;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    animation: fadeInCard 0.4s ease-out;
}
@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ЛІВА ЧАСТИНА (АРТ ПЕРСОНАЖА) */
.char-detail-art {
    flex: 1;
    position: relative;
    min-height: 400px;
    background: radial-gradient(circle at center, rgba(68, 86, 131, 0.2) 0%, rgba(13, 20, 36, 1) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Картинка героя (Великий рендер) */
.char-render-big {
    width: 100%;      /* Займає всю ширину блоку */
    height: 100%;     /* Займає всю висоту блоку */
    
    /* Ця властивість обрізає зайве, зберігаючи пропорції */
    object-fit: cover; 
    
    /* Фокусуємося на верхній частині картинки (де зазвичай обличчя) */
    object-position: top center; 
    
    /* Залишаємо маску, щоб низ картинки плавно переходив у фон (за бажанням) */
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    
    /* Прибираємо трансформ, якщо він був, або залишаємо легкий зум */
    transition: transform 0.5s ease;
}
/* ПРАВА ЧАСТИНА (СТАТИСТИКА) */
.char-detail-stats {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

/* Заголовок (Ім'я та Клас) */
.detail-header {
    border-bottom: 2px solid #FFAD33;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.detail-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    display: block;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.detail-class {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    color: #FFAD33;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Таблиця статів */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Дві колонки */
    gap: 10px 30px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    color: #8faab9;
    font-size: 0.95rem;
}

.stat-value {
    font-weight: 700;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
}

.val-gold { color: #FFAD33; }
.val-green { color: #00e676; }
.val-red { color: #ff3d3d; }

/* Кнопка закриття (Тільки для попапа) */
.close-popup-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}
.close-popup-btn:hover { color: white; transform: rotate(90deg); }

/* --- МОДАЛЬНЕ ВІКНО (POPUP WRAPPER) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none; /* Приховано за замовчуванням */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}
/* Мобільна адаптація картки */
@media (max-width: 768px) {
    .char-detail-card {
        flex-direction: column; /* Ставимо картинку зверху, текст знизу */
    }

    .char-detail-art {
        width: 100%;
        height: 350px; /* Фіксуємо висоту банера на мобільному */
        min-height: 350px;
    }

    .char-render-big {
        width: 100%;
        height: 100%;       /* Розтягуємо на весь блок .char-detail-art */
        object-fit: cover;  /* Заповнюємо без спотворень */
        object-position: top center; /* Фокус на голову */
        
        /* Прибираємо зсув (translateY), щоб не було дірок знизу/зверху */
        transform: none; 
        
        /* Трохи змінюємо маску для мобільного, щоб перехід був різкішим */
        mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    }

    .detail-name { 
        font-size: 2rem; 
    }
    
    .char-detail-stats {
        padding: 20px; /* Трохи менші відступи для телефону */
    }
}

/* =========================================
   STARS (ЗІРКИ)
   ========================================= */
.stars-wrapper {
    position: fixed; width: 100%; height: 100%; top: 0; left: 0; 
    
    /* ВИПРАВЛЕНО: z-index 1. 
       Фон має 0. Контент має 10.
       Тепер зірки будуть МІЖ фоном і контентом. */
    z-index: 1; 
    
    pointer-events: none; overflow: hidden;
}

.stars {
    width: 1px; height: 1px; position: absolute; background: white;
    box-shadow: 2vw 5vh 2px white, 10vw 8vh 2px white, 15vw 15vh 1px white, 28vw 12vh 2px white, 48vw 25vh 2px white;
    animation: twinkle 8s infinite linear;
}
.shooting-star {
    position: absolute; width: 100px; height: 2px;
    background: linear-gradient(90deg, white, transparent);
    animation: shoot 3s infinite ease-in;
}
.shooting-star:nth-child(1) { top: 20%; left: -100px; animation-delay: 0s; }
.shooting-star:nth-child(2) { top: 35%; left: -100px; animation-delay: 1s; }
.shooting-star:nth-child(3) { top: 50%; left: -100px; animation-delay: 2s; }

@keyframes twinkle { 0%, 100% { opacity: 0.8; } 50% { opacity: 0.4; } }
@keyframes shoot { 0% { transform: translateX(0) translateY(0) rotate(25deg); opacity: 1; } 100% { transform: translateX(120vw) translateY(50vh) rotate(25deg); opacity: 0; } }




/* --- СТИЛІ ПРЕЛОАДЕРА --- */
.preloader {
    display: none; /* Спочатку прихований, показуємо скриптом */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
     background: rgba(13, 22, 40, 0.6); /* Темний напівпрозорий */
    backdrop-filter: blur(12px); /* Розмиття фону під блоком */
    -webkit-backdrop-filter: blur(12px); /* Для Safari */
    z-index: 99999;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

/* Ефект скла для контенту всередині */
.loader-content {
    background: rgba(13, 22, 40, 0.6); 
    padding: 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    text-align: center;
    width: 320px;
    position: relative;
    z-index: 10;
}

/* Анімація іскор на фоні */
.sparks-container {
    position: absolute; width: 100%; height: 100%;
    overflow: hidden; pointer-events: none;
}

.loader-logo img {
    width: 180px;
    filter: drop-shadow(0 0 15px rgba(255, 173, 51, 0.5));
    margin-bottom: 20px;
}

.loader-text {
    font-family: 'Rajdhani', sans-serif;
    color: #FFAD33;
    font-weight: 700;
    letter-spacing: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.loader-bar {
    width: 100%; height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.bar-progress {
    width: 0%; height: 100%;
    background: #FFAD33;
    box-shadow: 0 0 15px #FFAD33;
    animation: loadLine 3s infinite ease-in-out;
}

@keyframes loadLine {
    0% { width: 0%; transform: translateX(-100%); }
    100% { width: 100%; transform: translateX(100%); }
}

.preloader.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
}



/* --- 1. DISCORD BUTTON (FIXED & COMPACT) --- */
#join_discord_btn {
    position: fixed !important;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 3px 25px; 
    background: rgba(0, 0, 0, 0.25); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    transform: skewX(-10deg);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    
    /* Анімація появи самої кнопки */
    animation: discordFadeIn 0.8s ease-out forwards;
}

/* ОДНОРАЗОВИЙ ЖОВТИЙ ПУЛЬС ПРИ ПОЯВІ */
.discord-entrance-pulse {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px;
    border: 2px solid #FFD700; /* Золотий/Жовтий */
    opacity: 0;
    pointer-events: none;
    /* Спрацьовує 1 раз через 0.5с після завантаження */
    animation: goldPulseOnce 1.5s ease-out 0.5s 1;
}

.discord-inner-fix {
    display: flex;
    align-items: center;
    gap: 12px;
    transform: skewX(10deg);
}

.discord-img { 
    width: 100px; 
    height: 50px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    flex-shrink: 0; 
    filter: brightness(0) invert(1); 
    transition: 0.3s;
    object-fit: contain;
}

/* --- Анімації --- */
@keyframes discordFadeIn {
    0% { opacity: 0; transform: skewX(-10deg) translateY(20px); }
    100% { opacity: 1; transform: skewX(-10deg) translateY(0); }
}

@keyframes goldPulseOnce {
    0% { transform: scale(1); opacity: 0; }
    30% { opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* --- Ефекти при наведенні --- */
#join_discord_btn:hover {
    transform: skewX(-10deg) translateY(-5px);
    background: rgba(0, 0, 0, 0.32);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

#join_discord_btn:hover .discord-img {
    transform: scale(1.1);
}

/* --- МОБІЛЬНА ВЕРСІЯ: ПРИХОВУЄМО КНОПКУ --- */
@media (max-width: 768px) {
    #join_discord_btn, #discord-widget-container {
        display: none !important;
    }
}/* --- 1. DISCORD BUTTON (FIXED & COMPACT) --- */
#join_discord_btn {
    position: fixed !important;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 3px 25px; 
    background: rgba(0, 0, 0, 0.25); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    transform: skewX(-10deg);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    
    /* Анімація появи самої кнопки */
    animation: discordFadeIn 0.8s ease-out forwards;
}

/* ОДНОРАЗОВИЙ ЖОВТИЙ ПУЛЬС ПРИ ПОЯВІ */
.discord-entrance-pulse {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px;
    border: 2px solid #FFD700; /* Золотий/Жовтий */
    opacity: 0;
    pointer-events: none;
    /* Спрацьовує 1 раз через 0.5с після завантаження */
    animation: goldPulseOnce 1.5s ease-out 0.5s 1;
}

.discord-inner-fix {
    display: flex;
    align-items: center;
    gap: 12px;
    transform: skewX(10deg);
}

.discord-img { 
    width: 100px; 
    height: 50px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    flex-shrink: 0; 
    filter: brightness(0) invert(1); 
    transition: 0.3s;
    object-fit: contain;
}

/* --- Анімації --- */
@keyframes discordFadeIn {
    0% { opacity: 0; transform: skewX(-10deg) translateY(20px); }
    100% { opacity: 1; transform: skewX(-10deg) translateY(0); }
}

@keyframes goldPulseOnce {
    0% { transform: scale(1); opacity: 0; }
    30% { opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* --- Ефекти при наведенні --- */
#join_discord_btn:hover {
    transform: skewX(-10deg) translateY(-5px);
    background: rgba(0, 0, 0, 0.32);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

#join_discord_btn:hover .discord-img {
    transform: scale(1.1);
}

/* --- МОБІЛЬНА ВЕРСІЯ: ПРИХОВУЄМО КНОПКУ --- */
@media (max-width: 768px) {
    #join_discord_btn, #discord-widget-container {
        display: none !important;
    }
}

