/* Site-wide Navbar — refined dark terminal aesthetic */

.header {
    background: #08061a;
    border-bottom: 1px solid rgba(221, 118, 140, 0.2);
    padding: 0 24px;
    height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
    flex-shrink: 0;
}

/* Luminous bottom accent line */
.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(221, 118, 140, 0.6) 30%,
        rgba(165, 180, 252, 0.5) 70%,
        transparent 100%
    );
    pointer-events: none;
}

/* ── Back-to-hub nav link ── */
.nav-link {
    color: rgba(253, 178, 159, 0.75);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 12px 6px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::before {
    content: '←';
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.nav-link:hover {
    color: #DD768C;
}

.nav-link:hover::before {
    transform: translateX(-3px);
}

/* ── Right side container ── */
.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Shared button base for header controls ── */
.language-button,
.user-button,
.login-button,
.tooltip-btn {
    background: transparent;
    border: 1px solid rgba(104, 79, 126, 0.4);
    color: rgba(221, 118, 140, 0.8);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.language-button:hover,
.user-button:hover,
.login-button:hover,
.tooltip-btn:hover {
    background: rgba(221, 118, 140, 0.08);
    border-color: rgba(221, 118, 140, 0.5);
    color: #DD768C;
}

/* ── Language Switcher ── */
.language-switcher {
    position: relative;
}

.language-button {
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    line-height: 1;
    height: 32px;
}

.language-button svg {
    opacity: 0.5;
    flex-shrink: 0;
}

.flag {
    font-size: 1rem;
    line-height: 1;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #0e0b24;
    border: 1px solid rgba(104, 79, 126, 0.5);
    border-radius: 8px;
    padding: 4px;
    min-width: 148px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    z-index: 1002;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(221, 118, 140, 0.05);
    pointer-events: none;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 5px;
    cursor: pointer;
    color: rgba(253, 178, 159, 0.7);
    font-size: 0.85rem;
    transition: background 0.12s ease, color 0.12s ease;
}

.language-option:hover {
    background: rgba(221, 118, 140, 0.1);
    color: #DD768C;
}

.language-option.active {
    background: rgba(221, 118, 140, 0.12);
    color: #DD768C;
}

/* ── Tooltip (tips button) ── */
.tooltip-container {
    position: relative;
}

.tooltip-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.tooltip {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #0e0b24;
    border: 1px solid rgba(104, 79, 126, 0.5);
    color: rgba(253, 178, 159, 0.85);
    border-radius: 8px;
    padding: 14px 16px;
    width: 272px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    z-index: 1002;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(221, 118, 140, 0.05);
    font-size: 0.85rem;
    pointer-events: none;
}

.tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.tooltip p {
    margin: 0 0 10px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #DD768C;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tooltip ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.tooltip li {
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
    color: rgba(253, 178, 159, 0.75);
    line-height: 1.4;
}

.tooltip li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: rgba(221, 118, 140, 0.5);
    font-size: 1.1em;
}

/* ── User Auth ── */
.user-auth {
    position: relative;
}

.user-menu {
    position: relative;
}

/* Login button — distinct from other controls */
.login-button {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    height: 32px;
    border: 1px solid rgba(221, 118, 140, 0.35);
    background: rgba(221, 118, 140, 0.07);
    color: #DD768C;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-button::before {
    content: none; /* remove inherited shimmer if any */
}

.login-button:hover {
    background: rgba(221, 118, 140, 0.14);
    border-color: rgba(221, 118, 140, 0.6);
    box-shadow: 0 0 12px rgba(221, 118, 140, 0.15);
    transform: none;
}

.login-button:active {
    transform: none;
    box-shadow: none;
}

.login-button svg {
    opacity: 0.8;
    flex-shrink: 0;
}

/* User logged-in button */
.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    height: 32px;
    color: rgba(221, 118, 140, 0.8);
    font-size: 0.82rem;
}

.user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(221, 118, 140, 0.3);
}

.user-avatar-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(221, 118, 140, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* ── Dropdown panels (shared) ── */
.user-dropdown,
.login-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #0e0b24;
    border: 1px solid rgba(104, 79, 126, 0.5);
    border-radius: 8px;
    min-width: 196px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    z-index: 1002;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(221, 118, 140, 0.04);
    overflow: hidden;
}

.user-dropdown.active,
.login-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(104, 79, 126, 0.35);
}

.user-name-header {
    font-size: 0.88rem;
    font-weight: 600;
    color: #DD768C;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: rgba(253, 178, 159, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-option {
    padding: 10px 14px;
    cursor: pointer;
    color: rgba(253, 178, 159, 0.7);
    font-size: 0.85rem;
    transition: background 0.12s ease, color 0.12s ease;
}

.user-option:hover {
    background: rgba(221, 118, 140, 0.1);
    color: #DD768C;
}

/* Login provider options */
.provider-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    cursor: pointer;
    color: rgba(253, 178, 159, 0.75);
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(104, 79, 126, 0.25);
    transition: background 0.12s ease, color 0.12s ease;
}

.provider-option:last-child {
    border-bottom: none;
}

.provider-option:hover {
    background: rgba(221, 118, 140, 0.08);
    color: #DD768C;
}

.provider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Cast / TV pairing styles live in cast.css — included separately */
