/* ==============================================
   COMPONENTS - AUTHENTICATION & ONBOARDING
   ============================================== */

.login-modal {
    max-width: 420px;
    width: 90%;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 0;
    overflow: hidden;
    animation: modal-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.modal-close-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

.login-brand {
    padding: 48px 40px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center the logo */
}

.login-logo {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
}

/* Premium Text Logo Fallback/Alternative */
.logo-text-premium {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-bant {
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-era {
    background: linear-gradient(135deg, #5eead4 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-modal .modal-body {
    padding: 0 40px 48px;
    flex-grow: 1;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: white;
}

.login-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 32px;
}

.social-login-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.google-btn-v2 {
    background: white;
    color: #1f1f1f !important;
    border: none;
    height: 56px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    display: flex !important;
    flex-direction: row !important;
    /* Counteract .social-btn column */
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.google-btn-v2:hover {
    background: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
    filter: brightness(1.08);
    /* Slightly more glow */
}

.wechat-btn-v2:hover {
    background: #06ad56 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.3);
}

.wechat-btn-v2 {
    background: #07c160;
    color: white !important;
    border: none;
    height: 56px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    display: flex !important;
    flex-direction: row !important;
    /* Counteract .social-btn column */
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.wechat-btn-v2 i {
    color: white !important;
    /* Override inline or inherited color */
}

.wechat-btn-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.3);
    background: #06ad56;
}

.login-footer {
    padding: 24px 40px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
}

.login-footer .terms {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
}

.login-footer a {
    color: #f3c26a !important;
    /* Explicitly use var(--gold) value to bypass CSS variables issues */
    text-decoration: none !important;
    font-weight: 600;
    margin: 0 4px;
    transition: color 0.2s ease;
    border-bottom: 1px solid rgba(243, 194, 106, 0.2);
}

.login-footer a:hover {
    color: #ffffff !important;
    border-bottom-color: #ffffff;
}

/* Replay Filters Styling */
#replayFilters {
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 12px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-group {
    display: flex;
    gap: 4px;
}

.filter-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.filter-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

/* Email Authentication Extensions */
.auth-view {
    animation: auth-view-enter 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes auth-view-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    margin: 20px 0;
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider:not(:empty)::before {
    margin-right: .5em;
}

.auth-divider:not(:empty)::after {
    margin-left: .5em;
}

/* Premium Email Auth Button (Row layout, inline icon) */
.email-btn-v2 {
    background: rgba(255, 255, 255, 0.05);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 56px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.email-btn-v2:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(243, 194, 106, 0.5) !important; /* var(--gold) border */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 194, 106, 0.15);
}

/* Forms layout & Input Styling */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.form-group-premium {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-premium label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group-premium label i {
    color: var(--gold);
    opacity: 0.8;
}

.form-group-premium input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 14px 18px !important;
    color: white !important;
    font-size: 0.95rem !important;
    outline: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box;
}

.form-group-premium input::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

.form-group-premium input:focus {
    border-color: rgba(243, 194, 106, 0.6) !important; /* var(--gold) */
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 15px rgba(243, 194, 106, 0.15) !important;
}

/* Premium gradient titles for forms */
.auth-view .login-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #d1d1d6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.auth-view .login-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.auth-form-links a {
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.auth-form-links a:hover {
    color: var(--gold) !important;
}

.auth-submit-btn {
    height: 52px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer !important;
    background: var(--gold) !important;
    color: black !important;
    box-shadow: 0 8px 20px -4px rgba(255, 191, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.auth-submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px -6px rgba(255, 191, 0, 0.45) !important;
    filter: brightness(1.08) !important;
}

.auth-switch-link {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.auth-switch-link a {
    color: var(--gold) !important;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.auth-switch-link a:hover {
    color: white !important;
}

.auth-back-link {
    text-align: center;
    margin-top: 20px;
}

.auth-back-link a {
    color: rgba(255, 255, 255, 0.4) !important;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.auth-back-link a:hover {
    color: white !important;
}