/* ============================================
   SB LiveStream — 3D Animated Login Page
   Glassmorphism + Floating Particles + 3D Tilt
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

/* ── Animated Gradient Background ── */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(-45deg, #0f0f23, #1a1a3e, #0d2137, #16213e, #1a0a2e);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* ── Floating Orbs ── */
.login-orbs {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.5), transparent);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4), transparent);
    bottom: -80px;
    right: -80px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent);
    top: 40%;
    right: 20%;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 40px) scale(0.95); }
    75% { transform: translate(30px, 20px) scale(1.02); }
}

/* ── Particles Canvas ── */
#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* ── 3D Card Container ── */
.login-card-wrapper {
    perspective: 1200px;
    z-index: 10;
    position: relative;
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: rgba(22, 33, 62, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.login-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.06), transparent 60%);
    pointer-events: none;
}

.login-card:hover {
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(99, 102, 241, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ── Card Header / Branding ── */
.login-header {
    text-align: center;
    margin-bottom: 36px;
    transform: translateZ(40px);
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 25px var(--primary-glow);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 8px 25px var(--primary-glow); }
    50% { box-shadow: 0 8px 40px rgba(99, 102, 241, 0.6); }
}

.login-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
    line-height: 1.3;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Form Fields ── */
.login-form {
    transform: translateZ(30px);
}

.login-field {
    position: relative;
    margin-bottom: 24px;
}

.login-field .field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 1;
}

.login-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(13, 27, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    transition: var(--transition);
    outline: none;
}

.login-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: rgba(13, 27, 42, 0.9);
}

.login-input:focus + .field-line,
.login-input:focus ~ .field-icon {
    color: var(--primary-light);
}

.login-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.field-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: var(--transition);
    border-radius: 2px;
    transform: translateX(-50%);
}

.login-input:focus + .field-line {
    width: 100%;
}

/* ── Login Button ── */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
}

/* ── Error Message ── */
.login-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #fca5a5;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ── Contact Details ── */
.login-footer {
    margin-top: 32px;
    text-align: center;
    transform: translateZ(20px);
}

.login-contact {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.login-contact strong {
    color: var(--text-secondary);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px;
    }

    .login-title {
        font-size: 1.25rem;
    }

    .login-logo {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }
}

/* ── Password Change Page ── */
.change-password-wrapper {
    max-width: 480px;
    margin: 60px auto;
}
