/* ==========================================================================
   PREMIUM GLASSMORPHIC HEADER
   ========================================================================== */

/* Header Wrapper to create a floating pill effect */
.app-header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: var(--container-max);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 1.5rem 0 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

[data-mode="dark"] .header-container {
    background: rgba(20, 22, 25, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    transition: transform 0.3s ease;
}
.header-logo:hover {
    transform: scale(1.05);
}
.header-logo img {
    height: 34px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}
[data-mode="light"] .logo-dark { display: none; }
[data-mode="dark"] .logo-light { display: none; }

/* Navigation */
.header-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex: 1;
    padding: 0 2rem;
}
@media (min-width: 1100px) {
    .header-nav { display: flex; }
}

.header-nav a {
    position: relative;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}
.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}
.header-nav a:hover,
.header-nav a.active {
    color: var(--brand-primary);
}
.header-nav a:hover::after,
.header-nav a.active::after {
    width: 100%;
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}
[data-mode="dark"] .btn-icon {
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}
.btn-icon:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

[data-mode="light"] .icon-sun { display: none; }
[data-mode="dark"] .icon-moon { display: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--radius-md);
}
.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* Premium Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #6d4aff 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 31, 110, 0.3);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #6d4aff 0%, var(--brand-primary) 100%);
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 31, 110, 0.5);
}
.btn-primary:hover::before {
    opacity: 1;
}

/* Premium Outline Button */
.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}
[data-mode="dark"] .btn-outline {
    border-color: rgba(255, 255, 255, 0.1);
}
.btn-outline:hover {
    background: var(--text-main);
    color: var(--canvas-bg) !important;
    border-color: transparent;
    transform: translateY(-2px);
}

.desktop-only { display: inline-flex; }
.mobile-menu-btn { display: none; }
@media (max-width: 991px) {
    .desktop-only { display: none; }
    .mobile-menu-btn { display: flex; }
    .app-header { width: calc(100% - 2rem); top: 1rem; }
}
@media (max-width: 576px) {
    .header-container { padding: 0 1rem 0 1.25rem; height: 64px; }
    .btn-icon { width: 40px; height: 40px; }
}
