:root {
    --discord-color: #5865F2;
    --accent: #ff7700;
    --text: #ffffff;
    --bg-dark: #0a0a0c;
    --dropdown-bg: #1a1a1d;
}

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

.main-header {
    width: 100%;
    height: 8vh;
    min-height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3vw;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 0.1vh solid rgba(255, 119, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    user-select: none;
}

/* LEWA STRONA */
.header-left { display: flex; align-items: center; gap: 1vw; }
.logo-icon { height: 6vh; width: auto; }
.brand-name { font-size: 2.5vh; font-weight: 700; color: var(--accent); letter-spacing: 0.2vw; text-transform: uppercase; }

/* PRAWA STRONA I MENU */
.header-right { display: flex; align-items: center; position: relative; gap: 15px; }

.login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    
    /* Zamiast samego vh, używamy min-height i bezpiecznego paddingu */
    padding: 4px 10px; 
    min-height: 35px; /* Przyciski nie będą niższe niż 35px */
    height: 4vh ;
    
    background-color: var(--discord-color);
    color: #fff;
    border-radius: 6px; /* Lepiej użyć px lub stałej wartości dla zaokrągleń */
    font-size: 12px;
    text-decoration: none;
    font-weight: 700;
    
    /* Zapobiega ściskaniu przycisku na bardzo małych ekranach */
    white-space: nowrap;
}

/* Kontener statusu - poprawiony dla lepszego wyglądu */
.status-badge {
    padding: 4px 12px;
    border-radius: 50px; /* Bardziej zaokrąglone rogi (kapsułka) */
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ADMIN - Ognisty gradient */
.dropdown-header .status-admin { 
    background: linear-gradient(135deg, #ff7700, #ff4500); 
    color: #fff; 
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* PREMIUM - Luksusowy złoty gradient */
.dropdown-header .status-premium { 
    background: linear-gradient(135deg, #f1c40f, #d4af37); 
    color: #000; 
    font-weight: 900;
}

/* FREE - Czysty, nowoczesny szary */
.dropdown-header .status-free { 
    background: linear-gradient(135deg, #444, #2a2a2a); 
    color: #ccc; 
}

/* KONTENER PROFILU */
.user-menu-container { position: relative; }
.user-trigger { cursor: pointer; display: flex; align-items: center; }
.user-circle { width: 5vh; height: 5vh; border-radius: 50%; border: 0.2vh solid var(--accent); overflow: hidden; }
.user-circle img { width: 100%; height: 100%; object-fit: cover; }

/* DROPDOWN MENU */
.user-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    width: 250px;
    background: var(--dropdown-bg);
    border: 1px solid #333;
    border-radius: 15px;
    
    /* Animacja */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    
    display: flex; /* Zmieniamy na flex od razu */
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #333;
    width: 100%;
}
.dropdown-header img { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 5px; }
.dropdown-header span {
    font-weight: bold;
    color: white;
    
    /* Wymuszenie zawijania tekstu */
    display: block;
    word-break: break-all; /* Kluczowe przy długich nazwach bez spacji */
    text-align: center;    /* Centrowanie zawiniętego tekstu */
}
.dropdown-header small { color: #888; font-size: 1.2vh; }

.user-dropdown a { color: #ccc; padding: 12px; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: 0.3s; }
.user-dropdown a:hover { background: #252529; color: white; }
.logout-link { color: #ff4d4d !important; }

.lang-selector-container { 
    position: relative; 
    user-select: none; /* Zapobiega zaznaczaniu tekstu przy szybkim klikaniu */
}

.lang-trigger {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    color: #fff;
}

.lang-trigger:hover {
    border-color: var(--accent); /* Podświetlenie obramowania przy najechaniu */
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px); /* Delikatny odstęp od przycisku */
    right: 0;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
    min-width: 120px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); /* Głęboki cień dla głębi */
    display: none; 
    z-index: 100;
    overflow: hidden;
}

.lang-dropdown.show { 
    display: block; 
    animation: fadeIn 0.2s ease; /* Płynne pojawianie się */
}

.lang-dropdown div {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.lang-dropdown div:hover { 
    background: var(--accent); 
    color: #000000; 
}

/* Animacja */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
    .main-header { height: 9vh; padding: 0 4vw; }
    .user-trigger { gap: 2vw; }
    .admin-badge { font-size: 0.8vh; }
}