/* =====================================================
   ExcelQuest – Auth (Login + Register)
   ===================================================== */

.auth-page {
    min-height: 100vh;
    padding: 40px 20px 60px;
    position: relative;
    overflow-x: hidden;
    background: radial-gradient(ellipse at top, #0e2a18 0%, var(--bg) 60%);
}

/* ---- Partículas de fundo ---- */
.bg-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-particles span {
    position: absolute;
    font-size: 2rem;
    opacity: 0.08;
    animation: float linear infinite;
}

.bg-particles span:nth-child(1) {
    left: 5%;
    top: 10%;
    animation-duration: 18s;
    animation-delay: 0s;
}

.bg-particles span:nth-child(2) {
    left: 20%;
    top: 70%;
    animation-duration: 22s;
    animation-delay: 2s;
}

.bg-particles span:nth-child(3) {
    left: 40%;
    top: 30%;
    animation-duration: 15s;
    animation-delay: 4s;
}

.bg-particles span:nth-child(4) {
    left: 60%;
    top: 80%;
    animation-duration: 20s;
    animation-delay: 1s;
}

.bg-particles span:nth-child(5) {
    left: 75%;
    top: 20%;
    animation-duration: 17s;
    animation-delay: 3s;
}

.bg-particles span:nth-child(6) {
    left: 85%;
    top: 55%;
    animation-duration: 24s;
    animation-delay: 5s;
}

.bg-particles span:nth-child(7) {
    left: 10%;
    top: 45%;
    animation-duration: 19s;
    animation-delay: 1.5s;
}

.bg-particles span:nth-child(8) {
    left: 50%;
    top: 60%;
    animation-duration: 21s;
    animation-delay: 2.5s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.06;
    }

    50% {
        transform: translateY(-30px) rotate(180deg) scale(1.1);
        opacity: 0.12;
    }

    100% {
        transform: translateY(0) rotate(360deg) scale(1);
        opacity: 0.06;
    }
}

/* ---- Container ---- */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0 auto;
    /* Centraliza verticalmente em telas grandes */
    padding-top: clamp(0px, 5vh, 60px);
}

/* ---- Logo ---- */
.auth-logo {
    text-align: center;
    animation: slideDown 0.5s ease;
}

.logo-icon {
    font-size: 3.5rem;
    animation: bounce 2s ease infinite;
    display: block;
    margin-bottom: 8px;
}

.logo-title {
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green), #88ee44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* ---- Card ---- */
.auth-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease 0.1s both;
}

.auth-card h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.auth-card-sub {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-2);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-glow);
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--red);
}

/* ---- Divider ---- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---- Link ---- */
.auth-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-link:hover {
    color: var(--green);
}

/* ---- Features ---- */
.auth-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    animation: slideUp 0.5s ease 0.3s both;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.feature-icon {
    font-size: 1.5rem;
}

/* Loading state for button */
.btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 480px) {
    .auth-container {
        padding-top: 16px;
    }

    .auth-card {
        padding: 24px 20px;
        border-radius: var(--radius-lg);
    }

    .auth-features {
        gap: 12px;
    }
}