/* Premium Navbar Styles - Using Design System Variables */
.premium-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-navbar.scrolled {
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    padding: 0.25rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.nav-brand:hover {
    transform: scale(1.02);
}

.brand-logo {
    height: 38px;
    width: auto;
}

.brand-icon-wrapper {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Desktop Desktop Nav */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: var(--primary);
    background: var(--bg-tertiary);
}

.nav-divider {
    height: 24px;
    width: 1px;
    background: var(--border);
}

/* User Zone */
.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem 0.4rem 0.4rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-pill:hover,
.user-pill.active {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.toggle-icon {
    font-size: 0.75rem;
    color: var(--text-lighter);
    transition: transform 0.2s;
}

.toggle-icon.rotate {
    transform: rotate(180deg);
}

/* Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
}

.dropdown-info {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.7rem;
    color: var(--text-lighter);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: var(--bg-tertiary);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.dropdown-item i {
    width: 20px;
    font-size: 1rem;
    opacity: 0.7;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.dropdown-item.admin-link:hover {
    color: var(--warning);
    background: #fffbeb;
}

.dropdown-item.logout-link:hover {
    color: var(--danger);
    background: #fef2f2;
}

.badge-admin {
    background: #fef3c7;
    color: #b45309;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-login {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-register {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff !important;
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(81, 59, 91, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-register:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(81, 59, 91, 0.35);
    color: #ffffff !important;
}

/* Mobile */
.mobile-toggle {
    display: none;
    padding: 10px;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 8px;
}

.hamburger span:nth-child(3) {
    top: 16px;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg);
    top: 8px;
}

.mobile-drawer {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff !important;
    /* Force opaque white */
    z-index: 9999;
    /* Ensure it's above everything including content */
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
}

/* Ensure drawer content is visible */
.drawer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    min-height: 100%;
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-lighter);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    border-radius: 12px;
    transition: background 0.2s;
}

.drawer-link:active {
    background: var(--bg-secondary);
}

.drawer-link i {
    width: 24px;
    font-size: 1.2rem;
    color: var(--primary);
}

.drawer-link.logout-link {
    color: var(--danger);
}

.drawer-link.logout-link i {
    color: var(--danger);
}

.register-highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white !important;
    border: none;
}

.register-highlight i {
    color: white !important;
}

/* Transitions */
[x-cloak] {
    display: none !important;
}

/* Transition Utilities */
.transition {
    transition-property: transform, opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-200 {
    transition-duration: 200ms;
}

.ease-out {
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.ease-in {
    transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.translate-x-full {
    transform: translateX(100%);
}

.translate-x-0 {
    transform: translateX(0);
}

.dropdown-enter {
    transform: translateY(-10px);
    opacity: 0;
}

.dropdown-leave {
    transform: translateY(-10px);
    opacity: 0;
}

/* Body Padding for fixed navbar */
body {
    padding-top: 72px;
}

@media (max-width: 992px) {
    .nav-desktop {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    body {
        padding-top: 64px;
    }
}