/* THEGAMING.CO - SHARED HEADER STYLES */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 max(18px, env(safe-area-inset-left)) 0 max(18px, env(safe-area-inset-right));
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.nav-left { justify-self: flex-start; }
.nav-right-wrapper { justify-self: flex-end; display: flex; justify-content: flex-end; }

.header-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 4px;
    color: #fff;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    justify-self: center;
}

.header-logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b9d, #4facfe, #a445b2) !important;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(-2px);
}

.back-btn svg { width: 16px; height: 16px; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.nav-right-logged-out,
.nav-right-logged-in { display: none !important; }

.auth-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
    height: 36px;
    display: inline-flex;
    align-items: center;
}

.auth-link:hover { color: #fff; }

.user-menu-wrapper { position: relative; }

.user-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #a445b2) !important;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    color: #fff;
    border: none;
}

.user-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.user-pill-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.user-pill-skeleton {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(10, 10, 15, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 120;
}

.user-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.user-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.user-menu-item:hover { background: rgba(255, 255, 255, 0.08); }

/* Responsive */
@media (max-width: 700px) {
    header {
        height: 56px;
        padding: 0 14px;
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
    }
    .nav-inner { gap: 12px; }
    .header-logo { font-size: 1.4rem; letter-spacing: 3px; }
    .header-actions { gap: 12px; }
    .back-btn { padding: 6px 12px; font-size: 0.8rem; }
    .back-btn span { display: none; }
}

@media (max-width: 400px) {
    .header-logo { font-size: 1.2rem; letter-spacing: 2px; }
}
