/* Header, Logo, Auth Buttons, Title */

.neo-calc-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 2rem 0 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: -0.4rem;
    margin-bottom: 0px;
    position: relative;
    overflow: visible;
}

.neo-frame-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem 0.2rem 3rem;
    position: relative;
    z-index: 20;
}

.neo-frame-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.neo-frame-logo {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: #fff;
    text-shadow: 0 0 20px var(--primary-glow);
}

.neo-frame-logo-dot {
    color: var(--gold);
    margin-left: 0.02em;
    text-shadow: 0 0 12px rgba(255, 204, 51, 0.35);
}

.neo-visitor-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.78rem;
    border-radius: 999px;
    border: 0.5px solid rgba(255, 204, 51, 0.35);
    background: linear-gradient(135deg, rgba(255, 204, 51, 0.16) 0%, rgba(167, 139, 250, 0.12) 100%);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.58rem;
    font-weight: 800;
    white-space: nowrap;
}

.neo-visitor-badge strong {
    color: #fff;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    font-weight: 900;
}

.neo-visitor-badge.is-loading strong {
    color: rgba(255, 255, 255, 0.65);
}

.neo-frame-auth {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.neo-auth-btn {
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.35rem 1.2rem;
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Sign In -> Blue Glass (Badge Primary Style) */
.neo-auth-btn.signin {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.4) 0%, rgba(0, 102, 255, 0.5) 100%);
    box-shadow:
        0 4px 15px rgba(0, 102, 255, 0.2),
        inset 0 0 8px rgba(0, 102, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.neo-auth-btn.signin:hover {
    transform: translateY(-2px) scale(1.05);
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.6) 0%, rgba(0, 102, 255, 0.7) 100%);
    box-shadow: 0 10px 20px rgba(0, 102, 255, 0.3);
}

/* Sign Up -> Gold Glass (Badge Gold Style) */
.neo-auth-btn.signup {
    background: linear-gradient(135deg, rgba(255, 204, 51, 0.3) 0%, rgba(204, 153, 0, 0.4) 100%);
    box-shadow:
        0 4px 15px rgba(255, 204, 51, 0.2),
        inset 0 0 8px rgba(255, 204, 51, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.neo-auth-btn.signup:hover {
    transform: translateY(-2px) scale(1.05);
    background: linear-gradient(135deg, rgba(255, 204, 51, 0.5) 0%, rgba(204, 153, 0, 0.6) 100%);
    box-shadow: 0 10px 20px rgba(255, 204, 51, 0.4);
}

.neo-auth-btn.logout {
    background: linear-gradient(135deg, rgba(255, 204, 51, 0.22) 0%, rgba(204, 153, 0, 0.3) 100%);
    box-shadow:
        0 4px 15px rgba(255, 204, 51, 0.12),
        inset 0 0 8px rgba(255, 204, 51, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.neo-auth-btn.logout:hover {
    transform: translateY(-2px) scale(1.03);
    background: linear-gradient(135deg, rgba(255, 204, 51, 0.38) 0%, rgba(204, 153, 0, 0.48) 100%);
    box-shadow: 0 10px 20px rgba(255, 204, 51, 0.2);
}

#neo-frame-auth-slot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.neo-header-user {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.28rem 0.8rem 0.28rem 0.35rem;
    border-radius: 999px;
    border: 0.5px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(167, 139, 250, 0.08) 100%);
    color: #fff;
    cursor: pointer;
    transition: all 0.35s ease;
}

.neo-header-user:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 204, 51, 0.4);
    box-shadow: 0 10px 24px rgba(12, 8, 27, 0.24);
}

.neo-header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #ff9900 100%);
    color: #160824;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    box-shadow: 0 0 18px rgba(255, 204, 51, 0.18);
}

.neo-header-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.neo-header-user-meta strong,
.neo-header-user-meta span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neo-header-user-meta strong {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
}

.neo-header-user-meta span {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.62);
}

@media screen and (max-width: 767px) {
    .neo-frame-brand {
        gap: 0.55rem;
    }

    .neo-visitor-badge {
        display: none;
    }

    .neo-header-user-meta,
    .neo-auth-btn.logout,
    #neo-frame-auth-slot {
        display: none !important;
    }
}

.pane-padded-content {
    padding: 2rem 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.neo-title-group {
    width: 100%;
}

.neo-title-group h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    /* Slightly smaller for compactness */
    font-weight: 800;
    line-height: 1.1;
    margin-top: 0;
    margin-bottom: 0.4rem;
    /* Tight gap */
    background: linear-gradient(to bottom, #ffffff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1.5px;
    white-space: nowrap;
}

.neo-title-group p {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: none;
    margin: 0 auto 2.8rem auto;
}
