/* SpinZone Shared Header & Navigation Styles */
:root {
    --header-bg: rgba(10, 14, 26, 0.92);
    --nav-bg: #0f172a;
    --card-border: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #64748b;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --accent: #10b981;
    --gold: #f59e0b;
    --header-height: 64px;
}

header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    padding: 0 1.5rem;
    height: var(--header-height);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items:center;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.5px;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: var(--text-main);
}
.logo b { color: var(--primary); }
.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#headerAuth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #fff;
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.username {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.btn-signout {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-signout:hover {
    color: #fff;
    border-color: var(--text-muted);
}

.sz-nav {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: var(--header-height);
    z-index: 900;
    overflow-x: auto;
    scrollbar-width: none;
}
.sz-nav::-webkit-scrollbar { display: none; }

.sz-nav-inner {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.sz-nav-link {
    padding: 0.85rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.sz-nav-link:hover { color: var(--text-main); }
.sz-nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.badge-nav {
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 700;
}
.badge-nav.red { background: var(--danger); color: #fff; }
.badge-nav.gold { background: var(--gold); color: #000; }

/* Hide VIP/Pro elements while loading to prevent flicker */
.badge-nav.gold, .pro-lock-overlay, .btn-gold:not(.always-show) {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.is-premium .badge-nav.gold, 
body.is-premium .pro-lock-overlay,
body.is-premium .btn-gold:not(.always-show) {
    display: none !important;
}

body.is-free .badge-nav.gold, 
body.is-free .pro-lock-overlay,
body.is-free .btn-gold:not(.always-show) {
    opacity: 1 !important;
}

@media(max-width: 600px) {
    header { padding: 0 0.75rem; height: 56px; }
    .logo { font-size: 1.1rem; }
    .username { display: none; }
    .sz-nav-link { padding: 0.7rem 0.8rem; font-size: 0.75rem; }
}
