/* The Enchanters - Beautiful Header Styles */

:root {
    /* Primary Colors */
    --primary-color: #C9B7E2; /* Lavender Glow */
    --secondary-color: #E6DDF3; /* Soft Lilac */

    /* Secondary Colors */
    --moonlight-cream: #FFF6E8;
    --pastel-pink: #F4C6D7;

    /* Accent Colors */
    --accent-color: #F6D77A; /* Stardust Gold */
    --midnight-plum: #5B3B6E;

    /* Legacy support */
    --dark-bg: #5B3B6E; /* Using Midnight Plum for dark backgrounds */
    --light-text: #000000;
    --border-color: #C9B7E2; /* Using Lavender Glow for borders */
}

/* Header Container */
.enchanter-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #eed9ff;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(91, 59, 110, 0.15);
    padding: 0.5rem 0;
}

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

/* Logo Section */
.header-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.logo-link:hover {
    background: rgba(201, 183, 226, 0.2);
    transform: translateY(-2px);
}

.logo-icon {
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
}

.logo-image {
    height: 42px;
    width: auto;
    max-width: 42px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--midnight-plum);
    letter-spacing: 0.5px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Navigation Menu */
.header-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    position: relative;
    color: var(--midnight-plum);
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.nav-link:hover {
    color: var(--midnight-plum);
    background: rgba(201, 183, 226, 0.3);
}

.nav-underline {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover .nav-underline {
    width: 100%;
}

.nav-link.active {
    color: var(--midnight-plum);
    background: rgba(201, 183, 226, 0.5);
}

.nav-link.active .nav-underline {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--midnight-plum);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Header Actions (Login/Logout Buttons) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-login,
.btn-dashboard,
.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    color: var(--midnight-plum);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(91, 59, 110, 0.2);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 59, 110, 0.3);
}

.btn-dashboard {
    background: rgba(201, 183, 226, 0.3);
    border: 2px solid var(--primary-color);
}

.btn-dashboard:hover {
    background: rgba(201, 183, 226, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 59, 110, 0.3);
}

.btn-logout {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.2) 0%, rgba(239, 83, 80, 0.2) 100%);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #ef5350;
}

.btn-logout:hover {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3) 0%, rgba(239, 83, 80, 0.3) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.user-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.btn-login i,
.btn-logout i {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        height: 60px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: #a88fba;
        backdrop-filter: blur(10px);
        border-bottom: 2px solid var(--primary-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .header-nav.active {
        max-height: 400px;
    }

    .header-actions {
        position: absolute;
        top: 10px;
        right: 60px;
        gap: 0.5rem;
    }

    .btn-login,
    .btn-dashboard,
    .btn-logout {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .btn-login span,
    .btn-dashboard span,
    .btn-logout span {
        display: none;
    }

    .btn-login i,
    .btn-logout i {
        font-size: 1.1rem;
    }

    .user-avatar-small {
        width: 24px;
        height: 24px;
    }

    .btn-dashboard {
        padding: 0.4rem;
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
        border-radius: 0;
        justify-content: flex-start;
        border-left: 3px solid transparent;
    }

    .nav-link:hover {
        background: rgba(201, 183, 226, 0.3);
        border-left-color: var(--primary-color);
    }

    .nav-link.active {
        background: rgba(201, 183, 226, 0.5);
        border-left-color: var(--accent-color);
    }

    .nav-underline {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 0.75rem;
        height: 55px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-icon {
        font-size: 1.3rem;
    }

    .logo-link {
        gap: 0.5rem;
        padding: 0.4rem 0.75rem;
    }

    .nav-link {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Adjust body padding for fixed header and set global font */
body {
    padding-top: 70px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 55px;
    }
}

