/* HEADER WITH NOTCHED DESIGN */
.adventure-header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0;
    width: 100vw;
    height: 66px;
    z-index: 1000; 
    background: transparent;
    pointer-events: auto;
    clip-path: polygon(
        0 0, 0 35px, 5px 30px, 10px 22px, 15px 18px, 20px 16px, 210px 16px, 
        218px 18px, 224px 22px, 228px 28px, 231px 36px, 233px 44px, 
        235px 50px, 237px 52px, 100% 52px, 100% 0
    );
    transition: clip-path 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.adventure-header.logo-space {
    clip-path: polygon(
        0 0, 0 35px, 5px 30px, 10px 22px, 15px 18px, 20px 16px, 210px 16px, 
        218px 18px, 224px 22px, 228px 28px, 231px 36px, 233px 44px, 
        235px 50px, 237px 52px, 100% 52px, 100% 0
    );
}

.adventure-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 1;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: -1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.adventure-header.loaded::before { opacity: 1; }

.adventure-header.scrolled::before {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* HEADER CONTENT */
.header-content { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0.7rem 2rem;
    height: 52px;
    transition: padding 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav, .user-section {
    opacity: 1;
    visibility: visible;
    transition: all 0.4s ease;
}

.main-nav.loaded, .user-section.loaded {
    opacity: 1;
    visibility: visible;
}

.main-nav { 
    display: flex; 
    gap: 2.5rem;
    align-items: center;
    flex: 1;
    justify-content: center;
    padding-left: 210px;
}

.user-section { 
    display: flex; 
    gap: 0.5rem; 
    align-items: center; 
}

/* NAVIGATION LINKS */
.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.nav-link:hover {
    color: white !important;
    text-decoration: none;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.05);
}

/* LOGO */
.logo-container {
    position: fixed;
    top: 22px;
    left: -5px;
    z-index: 1010;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    clip-path: none;
    overflow: visible;
    pointer-events: auto;
}

.logo-container.show {
    opacity: 1;
    visibility: visible;
}

.logo-image {
    height: 58px;
    width: 240px;
    overflow: visible;
    filter: 
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6))
        drop-shadow(0 0 12px rgba(0, 0, 0, 0.4));
}

.logo-image img {
    width: 240px;
    height: 58px;
    object-fit: contain;
    display: block;
}

.logo-link:hover { opacity: 0.8; }

/* USER DROPDOWN */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-menu {
    position: fixed;
    top: 60px;
    right: 2rem;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

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

.user-menu-item {
    display: block;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border-radius: 0;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    text-decoration: none;
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* LOGIN MODAL STYLES */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: white;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    padding: 0.8rem 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-button {
    background: linear-gradient(45deg, #cc6600, #b85500);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(204, 102, 0, 0.3);
    margin-top: 0.5rem;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 102, 0, 0.4);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.login-success {
    color: #51cf66;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .adventure-header {
        height: 52px;
        clip-path: polygon(
            0 0, 0 28px, 4px 24px, 8px 18px, 12px 16px, 16px 14px, 170px 14px, 
            176px 16px, 181px 20px, 185px 26px, 188px 32px, 191px 37px, 193px 40px, 
            195px 41px, 100% 41px, 100% 0
        );
    }
    
    .header-content {
        padding: 0.35rem 1rem 0.35rem 210px;
        height: 41px;
    }
    
    .main-nav { gap: 1.5rem; }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    
    .nav-link span { display: none; }
}

@media (max-width: 640px) {
    .main-nav { display: none; }
    
    .header-content {
        padding: 0.75rem 1rem 0.75rem 180px;
        justify-content: flex-end;
    }
}
