/* ============================
   STICKY HEADER SYSTEM
   Eternal Illusion - 2025
   ============================ */

/* Header alapok */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(12, 20, 69, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Scroll hatás */
.main-header.scrolled {
    background: rgba(12, 20, 69, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(255, 215, 0, 0.4);
}

/* Header container */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 15px;
    /* DEBUG: Diagnosztikai színek */
    /* border: 2px solid red; */
}

/* DEBUG: Komponensek színezése a layout teszteléshez */
/*
.header-logo {
    border: 1px solid green !important;
}

.header-nav {
    border: 1px solid blue !important;
}

.header-user {
    border: 1px solid orange !important;
}
*/

/* ============================
   LOGO SZEKCIÓ
   ============================ */

.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.logo-link:hover {
    transform: translateY(-1px);
}

.logo-icon {
    font-size: 2rem;
    margin-right: 12px;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #ffd700;
    opacity: 0.8;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ============================
   NAVIGATION MENU
   ============================ */

.header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    margin-left: 40px;
    max-width: 600px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    text-decoration: none;
    color: #e0e6ed;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link i {
    margin-right: 8px;
    font-size: 0.9rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* ============================
   USER SZEKCIÓ
   ============================ */

.header-user {
    flex-shrink: 0 !important;
    position: relative !important;
    min-width: 200px !important;
    display: flex !important;
    justify-content: flex-end !important;
}

/* Bejelentkezett user */
.header-user .user-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 215, 0, 0.2) !important;
    margin: 0 !important;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.header-user .user-info:hover {
    background: rgba(255, 215, 0, 0.1) !important;
    border-color: rgba(255, 215, 0, 0.4) !important;
}

.header-user .user-info:hover .user-avatar {
    border-color: rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.user-status {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.user-status.guild-member {
    color: #4ade80;
}

.user-status.visitor {
    color: #94a3b8;
}

.user-status i {
    font-size: 0.7rem;
}

/* User menu CSS moved to css/user-menu.css */

/* Discord login gomb */
.discord-login-btn,
button.discord-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #5865f2;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.discord-login-btn:hover,
button.discord-login-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.discord-login-btn i {
    font-size: 1.1rem;
}

/* ============================
   MOBILE MENU
   ============================ */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #ffd700;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ============================
   RESPONSIVE DESIGN
   ============================ */

@media (max-width: 1024px) {
    .header-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        gap: 0;
    }
    
    .nav-link {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .user-name {
        max-width: 100px;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 60px;
        padding: 0 15px;
    }
    
    .logo-icon {
        font-size: 1.5rem;
        margin-right: 8px;
    }
    
    .logo-title {
        font-size: 1.2rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    /* Mobile menu */
    .header-nav {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background: rgba(12, 20, 69, 0.98);
        backdrop-filter: blur(15px);
        transition: left 0.3s ease;
        margin: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
    
    .header-nav.show {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 20px 0;
        gap: 0;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-radius: 0;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    }
    
    .nav-link:hover {
        transform: none;
        background: rgba(255, 215, 0, 0.1);
        padding-left: 25px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    .user-details {
        display: none;
    }
    
    .user-info {
        gap: 8px;
    }
    
    .login-text {
        display: none;
    }
    
    .discord-login-btn {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 55px;
        padding: 0 10px;
    }
    
    .logo-text {
        display: none;
    }
    
    .logo-icon {
        font-size: 1.8rem;
        margin-right: 0;
    }
    
    .header-nav {
        width: 100%;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .discord-login-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* ============================
   BODY OFFSET (STICKY HEADER)
   ============================ */

body {
    padding-top: 70px; /* Header magasság */
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 55px;
    }
}

/* ============================
   ANIMÁCIÓK & EFFEKTEK
   ============================ */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Link hover effect */
@keyframes linkPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.nav-link:active {
    animation: linkPulse 0.3s ease;
}

/* Header hide/show on scroll */
.main-header.hide {
    transform: translateY(-100%);
}

.main-header.show {
    transform: translateY(0);
}