.header {
    background: #0f0f1a;
    padding: 1rem;
    border-bottom: 2px solid #6b5b95;
    position: relative;
    display: block;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header .header-content .logo img {
    width: 250px; /* Desktop size */
    max-width: 250px;
    height: auto;
    display: block;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: #ffffff;
    cursor: pointer;
}

.nav {
    display: flex;
    align-items: center;
}

.nav a {
    color: #ffffff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
}

.nav a:hover {
    color: #b19cd9;
}

.login-container .login-btn {
    background: #6b5b95; /* Match login.php button */
    padding: 8px 15px;
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.login-container .login-btn:hover {
    background: #feb236;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        flex: 1;
        text-align: center;
        order: 2; /* Center position */
    }
    .nav.active ~ .hamburger {
        display: none; /* Hide hamburger when menu is open */
    }
    .header-content {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    .logo {
        flex: 1;
        text-align: left;
        order: 1; /* Left position */
    }
    .login-container {
        flex: 1;
        text-align: right;
        order: 3; /* Right position */
    }
    .nav {
        display: none !important; /* Hidden by default, enforce with !important */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 26, 0.85);
        padding: 10px 0;
        z-index: 1000;
    }
    .nav.active {
        display: flex !important; /* Shown when active, enforce with !important */
    }
    .nav a {
        margin: 10px 0;
        text-align: center;
        font-size: 1.2rem;
        color: #e0e0e0;
    }
    .header .header-content .logo img {
        width: 200px; /* Mobile size */
        max-width: 200px;
    }
    .login-container .login-btn {
        background: #6b5b95; /* Match login.php button */
        padding: 6px 12px;
        font-size: 1rem;
        display: inline-block;
        white-space: nowrap;
    }
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #0f0f1a;
    min-width: 250px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 5px;
}

.dropdown-content a {
    color: #ffffff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background: #6b5b95;
}

.dropdown:hover .dropdown-content {
    display: block;
}

@media (max-width: 768px) {
    .dropdown-content.active {
        display: block;
        position: relative;
        background: rgba(26, 26, 46, 0.9);
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }
    .dropdown-content a {
        text-align: center;
        color: #e0e0e0;
    }
}

.dropdown-content {
    min-width: 300px;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .dropdown-content {
        min-width: 200px;
    }
}