/* =============================================
   AUTH - Login Styles with Avatars
   ProductiveApp v4.0
============================================= */

/* === LOGIN SCREEN === */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary, #12121a);
    background-image: radial-gradient(ellipse at 50% 0%, var(--accent-glow, rgba(99, 102, 241, 0.1)) 0%, transparent 50%);
    overflow: hidden;
}

.login-screen.hidden {
    display: none;
}

/* Email login toggle button */
.email-login-toggle {
    margin-top: 30px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.email-login-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: var(--accent, #6366f1);
}

.email-login-toggle.hidden {
    display: none;
}

/* Remove all ugly outlines */
.login-screen button,
.login-screen img,
.login-screen *:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* === LOGIN CONTAINER === */
.login-container {
    text-align: center;
    z-index: 10;
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

.login-logo {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-container h1 {
    color: #d4af37;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 8px;
    text-shadow: 0 2px 20px rgba(212, 175, 55, 0.3);
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin: 0 0 40px;
}

/* === USER CAROUSEL === */
.user-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.carousel-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    transform: scale(1.1);
}

/* === USER SELECT GRID === */
.user-select-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
}

.user-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: transparent;
    border: none;
    outline: none;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 200px;
    -webkit-tap-highlight-color: transparent;
}

.user-select-btn:hover,
.user-select-btn:focus,
.user-select-btn:active {
    background: transparent;
    border: none;
    outline: none;
    transform: scale(1.05);
}

.user-select-btn:focus-visible {
    outline: none;
}

/* === AVATAR CONTAINER === */
.avatar-orbit-container {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-img-login {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    outline: none;
    -webkit-user-drag: none;
    user-select: none;
}

.user-select-btn:hover .user-avatar-img-login {
    border-color: #d4af37;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    transform: scale(1.02);
}

.user-name-select {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
}

/* === FIRE BREATH PARTICLES === */
.fire-breath-container {
    position: absolute;
    inset: -20px;
    pointer-events: none;
    overflow: visible;
}

.breath-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffaa00 0%, #ff6600 50%, transparent 100%);
    animation: breathParticle 2s ease-out infinite;
    opacity: 0;
}

@keyframes breathParticle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    20% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: scale(2) rotate(360deg) translateY(-50px);
    }
}

/* === PASSWORD FORM === */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 320px;
    margin: 0 auto;
    padding: 30px;
    background: var(--bg-card, rgba(255, 255, 255, 0.03));
    border-radius: 20px;
    border: 1px solid var(--border-primary, rgba(255, 255, 255, 0.08));
    animation: formAppear 0.4s ease-out;
}

@keyframes formAppear {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-form.hidden {
    display: none;
}

/* Hide carousel when showing password */
.user-carousel.hidden {
    display: none;
}

.login-subtitle.hidden {
    display: none;
}

#login-username {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.login-selected-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #d4af37;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

#login-password {
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

#login-password::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#login-password:focus {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

#login-btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

#back-btn {
    padding: 12px 24px;
    font-size: 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#back-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* === ERROR TEXT === */
.error-text {
    color: #ff6b6b;
    font-size: 14px;
    min-height: 20px;
    margin-top: 16px;
}

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

/* === CAROUSEL ANIMATIONS === */
@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(-20deg);
    }
    100% {
        opacity: 1;
        transform: scale(1.1) rotateY(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1.1);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1.1);
    }
}

/* === FIRE BUBBLES BACKGROUND === */
.fire-bubble {
    position: fixed;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.6) 0%, rgba(255, 140, 0, 0.3) 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    animation: fireBubbleRise linear infinite;
    z-index: 1;
}

@keyframes fireBubbleRise {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .login-container {
        padding: 20px;
    }

    .login-logo {
        width: 80px;
        height: 80px;
    }

    .login-container h1 {
        font-size: 1.8rem;
    }

    .avatar-orbit-container {
        width: 120px;
        height: 120px;
    }

    .user-avatar-img-login {
        width: 110px;
        height: 110px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}
