:root {
    --valorant-red: #ff4655;
    --valorant-offwhite: #ece8e1;
    --valorant-dark: #0f172a; 
    --valorant-dark-accent: #111a2c;
    --header-height: 75px;
    --valorant-red-transparent: rgba(255, 70, 85, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Bahnschrift', 'Tungsten', 'Inter', system-ui, -apple-system, sans-serif;
}

.header {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 98%;
    max-width: 1700px;
    height: var(--header-height);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);

    /* Border color as background, padding as border-width */
    background: var(--valorant-red-transparent); 
    padding: 2px; 

    clip-path: polygon(
        0 15px, 
        15px 0, 
        calc(100% - 15px) 0, 
        100% 15px, 
        100% calc(100% - 15px), 
        calc(100% - 15px) 100%, 
        15px 100%, 
        0 calc(100% - 15px)
    );
}

.header.scrolled {
    top: 10px;
    height: 70px;
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: relative;

    /* Main background moved from parent */
    background: rgba(15, 23, 42, 0.9); 
    backdrop-filter: blur(12px); 

    /* Same clip-path as parent */
    clip-path: polygon( 
        0 15px, 
        15px 0, 
        calc(100% - 15px) 0, 
        100% 15px, 
        100% calc(100% - 15px), 
        calc(100% - 15px) 100%, 
        15px 100%, 
        0 calc(100% - 15px)
    );
}

.header.scrolled .header-container {
    background: rgba(15, 23, 42, 0.98);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 40px;
}

.logo-text {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--valorant-offwhite);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    color: var(--valorant-offwhite);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    text-transform: uppercase;
    transition: all 0.2s ease-in-out;
    position: relative;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    background: transparent;
}

.nav-link:hover, .nav-link.active, .nav-link:focus-visible {
    background: rgba(255, 70, 85, 0.1);
    color: var(--valorant-red);
    transform: translateY(-2px);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: var(--valorant-red);
    box-shadow: 0 0 5px var(--valorant-red);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background: rgba(255, 70, 85, 0.1);
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--valorant-offwhite);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}


.login-button {
    background: var(--valorant-red);
    color: var(--valorant-offwhite);
    padding: 0.7rem 1.8rem;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    margin-left: 1rem;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 15% 100%);
    border: 1px solid var(--valorant-red);
}

.login-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.login-button:hover,.login-button:focus-visible {
    background: var(--valorant-dark);
    color: var(--valorant-red);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 70, 85, 0.4);
}

.login-button:hover,.login-button:focus-visible i {
    transform: translateX(3px);
}

.login-button:active {
    transform: scale(1);
}


/* General Button Styles for Dashboard, Notice etc. */
.notice-button, .dashboard-button {
    color: var(--valorant-offwhite);
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    font-size: 0.9rem;
    clip-path: polygon(15% 0, 100% 0, 85% 100%, 0% 100%);
    cursor: pointer;
}

.notice-button i, .dashboard-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.notice-button:hover, .dashboard-button:hover {
    background: var(--valorant-red);
    border-color: var(--valorant-red);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 70, 85, 0.4);
}

.user-menu {
    position: relative;
}

.dashboard-button i:last-child {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dashboard-button.active i:last-child, .dashboard-button:hover i:last-child {
    transform: rotate(180deg);
}

.dashboard-button.active {
    background: var(--valorant-red);
    border-color: var(--valorant-red);
    box-shadow: 0 0 15px rgba(255, 70, 85, 0.4);
}


.user-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: var(--valorant-dark-accent);
    padding: 0.8rem;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--valorant-red-transparent);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    color: var(--valorant-offwhite);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.user-dropdown a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.user-dropdown a:hover {
    background: rgba(255, 70, 85, 0.15);
    color: var(--valorant-red);
    transform: translateX(5px);
}

.logout-link {
    border-top: 1px solid var(--valorant-red-transparent);
    margin-top: 0.5rem;
    padding-top: 0.8rem !important;
    color: var(--valorant-red) !important;
}

.logout-link:hover {
    background: rgba(255, 70, 85, 0.25) !important;
    color: #fff !important;
}

@media (max-width: 968px) {
    .header {
        top: 0;
        width: 100%;
        
        /* Revert changes for mobile view */
        clip-path: none; 
        padding: 0; 
        background: rgba(15, 23, 42, 0.9); 
        /* backdrop-filter: blur(12px); */ /* --- THIS WAS THE BUG. REMOVED. --- */
        border: none; 
        border-bottom: 2px solid var(--valorant-red-transparent); 
    }
    .header.scrolled {
        top: 0;
        background: rgba(15, 23, 42, 0.98); 
    }
    
    .header-container {
        /* Reset container on mobile */
        background: transparent;
        backdrop-filter: none;
        clip-path: none;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        flex-direction: column;
        background: linear-gradient(180deg, var(--valorant-dark-accent), var(--valorant-dark));
        width: 100%;
        height: calc(100vh - var(--header-height));
        padding: 2rem;
        gap: 1rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 1px solid var(--valorant-red-transparent);
        /* z-index: 999; */ /* --- REMOVED. Not needed. --- */
    }
    .nav-menu.active {
        right: 0;
    }
    .nav-link, .notice-button, .login-button, .dashboard-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        margin: 0.2rem 0;
        clip-path: none;
        border-radius: 4px;
        text-align: center;
    }
    .hamburger {
        display: block;
    }
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .user-menu {
        width: 100%;
        max-width: 300px;
    }
    
    .user-dropdown {
        display: none;
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin-top: 0.5rem;
        border: none;
        min-width: 100%;
        transform: none;
        opacity: 1;
        visibility: visible;
    }
    .user-dropdown.active {
        display: block;
    }
    .user-dropdown a {
        background: rgba(0, 0, 0, 0.2);
        margin-bottom: 0.5rem;
        border-radius: 4px;
        justify-content: center;
        color: var(--valorant-offwhite);
    }
    .user-dropdown a:hover {
        background: rgba(255, 70, 85, 0.2);
        color: var(--valorant-red);
        transform: none;
    }
    .logout-link {
        border-top: none;
        background: rgba(255, 70, 85, 0.15) !important;
    }
    
    /* Animation for mobile dropdown items */
    .user-dropdown.active a {
        animation: slideIn 0.3s ease forwards;
        opacity: 0;
    }
    .user-dropdown.active a:nth-child(1) { animation-delay: 0.1s; }
    .user-dropdown.active a:nth-child(2) { animation-delay: 0.2s; }
    .user-dropdown.active a:nth-child(3) { animation-delay: 0.3s; }

    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateX(-15px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
    }
    .logo img {
        height: 35px;
    }
    .logo-text {
        font-size: 1.4rem;
    }
}