/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header Styles */
.main-header {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    height: 70px;
    display: flex;
    align-items: center;
}

.main-header .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
}

.logo:hover img {
    transform: rotate(10deg);
}

/* Navigation Styles */
.main-nav {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0 0.75rem;
    position: relative;
    transition: color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    align-items: center;
}

.nav-item {
    position: relative;
    opacity: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    height: 100%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: #fff;
    border-radius: 4px;
    position: absolute;
    transition: transform 0.15s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

/* Mobile Menu */
@media (max-width: 992px) {
    .hamburger {
        display: block;
        position: relative;
        z-index: 1001;
        margin-left: auto;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        transition: right 0.4s ease-in-out;
        z-index: 999;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
        padding: 2rem;
        height: auto;
    }

    .nav-item {
        width: 100%;
        height: auto;
    }

    .nav-link {
        padding: 1rem 0;
        width: 100%;
        text-align: left;
        justify-content: flex-start;
        flex-direction: row;
        gap: 0.75rem;
    }

    .main-nav.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
        padding: 2rem;
        height: auto;
    }

    .nav-item {
        width: 100%;
        height: auto;
    }

    .nav-link {
        padding: 1rem 0;
        width: 100%;
        text-align: left;
        justify-content: flex-start;
        flex-direction: row;
        gap: 0.75rem;
    }
    .hamburger {
        display: block;
        position: relative;
        z-index: 1001;
        margin-left: auto;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        transition: right 0.4s ease-in-out;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
        margin: 0;
        overflow-y: auto;
    }
    
    .main-header .container {
        padding: 0 1.5rem;
    }

    .main-nav.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 0.5rem 0;
        width: 100%;
        text-align: left;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 0.8rem 0;
    }
}

/* Desktop Menu */
@media (min-width: 993px) {
    .main-nav {
        display: flex !important;
    }
}

/* Admin Badge */
.admin-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}

/* User Dropdown Menu */
.user-dropdown {
    position: relative;
    margin-left: 1rem;
    height: 100%;
    display: flex;
    align-items: center;
}

.user-menu {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.user-avatar {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    height: 100%;
    transition: background-color 0.3s ease;
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.user-avatar .fa-caret-down {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .fa-caret-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    min-width: 200px;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
}

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

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.dropdown-menu .divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.dropdown-menu .logout {
    color: #ff6b6b;
}

.dropdown-menu .logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Mobile styles */
@media (max-width: 992px) {
    .user-dropdown {
        width: 100%;
        margin: 0;
        padding: 0 2rem;
    }
    
    .user-avatar {
        width: 100%;
        justify-content: space-between;
        padding: 1rem 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 0 0 0 2rem;
        margin-top: 0.5rem;
        display: none;
    }
    
    .user-dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu a {
        padding: 0.75rem 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent scrolling when menu is open */
.no-scroll {
    overflow: hidden;
}

/* Hamburger animation */
.hamburger.is-active .hamburger-inner,
.hamburger.is-active .hamburger-inner::before,
.hamburger.is-active .hamburger-inner::after {
    background-color: #fff;
}

.hamburger.is-active .hamburger-inner {
    transform: rotate(45deg);
    transition-delay: 0.12s;
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}

.hamburger.is-active .hamburger-inner::before {
    top: 0;
    opacity: 0;
    transition: top 0.1s ease, opacity 0.1s 0.12s ease;
}

.hamburger.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
    transition: bottom 0.1s ease, transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Smooth transitions for header */
.main-header {
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
