/* =========================================
   LOGIN & SIGNUP PREMIUM STYLING
   ========================================= */

:root {
    --login-glass: rgba(255, 255, 255, 0.05);
    --login-glass-border: rgba(255, 255, 255, 0.1);
    --login-accent: #818cf8;
    --login-accent-glow: rgba(129, 140, 248, 0.4);
}

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark); /* From style.css */
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    z-index: 10;
    perspective: 1000px;
}

.login-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.95));
    border: 1px solid var(--login-glass-border);
    border-radius: 36px;
    padding: 48px 40px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8);
    position: relative;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 24px;
    font-size: 2rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Auth Step Management */
.auth-step {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.auth-step.active {
    display: flex;
    animation: slideUpFade 0.5s ease-out forwards;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input Styling */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 20px;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: 0.3s;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 55px 16px 52px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--login-glass-border);
    border-radius: 18px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--login-accent);
    box-shadow: 0 0 20px var(--login-accent-glow);
}

.input-wrapper input:focus + i {
    color: var(--login-accent);
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    height: 40px;
    width: 40px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.btn-toggle-password:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

.btn-toggle-password i {
    position: static; /* Reset absolute icon inside button */
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

/* CAPTCHA Styling */
#captcha-container {
    margin: 15px 0 25px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 65px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px;
    transition: all 0.3s ease;
}

#captcha-container:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 18px;
    border-radius: 18px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

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

.btn-text-small {
    background: transparent;
    border: none;
    color: var(--login-accent);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}

.btn-text-small:hover {
    color: white;
    text-shadow: 0 0 10px var(--login-accent-glow);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 10px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--login-glass-border);
}

.divider span {
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-google {
    background: white;
    color: #1e293b;
    padding: 16px;
    border-radius: 18px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: 0.3s;
}

.btn-google img {
    width: 22px;
}

.btn-google:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* OTP Specific Styling */
.otp-instruction {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.otp-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.otp-input {
    width: 50px;
    height: 64px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--login-glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    outline: none;
    transition: all 0.3s;
}

.otp-input:focus {
    border-color: var(--login-accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px var(--login-accent-glow);
}

.otp-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-text:hover {
    color: var(--login-accent);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--login-accent);
    text-decoration: none;
    font-weight: 700;
    margin-left: 4px;
}

.auth-terms {
    margin-top: 40px;
    text-align: center;
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.6;
}

.auth-terms a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Background Decorations */
.bg-decoration {
    position: absolute;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

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

.circle-1 {
    width: 400px; height: 400px;
    background: #6366f1;
    top: -10%; left: -10%;
}

.circle-2 {
    width: 300px; height: 300px;
    background: #c084fc;
    bottom: -5%; right: -5%;
    animation-delay: -3s;
}

.circle-3 {
    width: 250px; height: 250px;
    background: #4f46e5;
    top: 40%; right: 10%;
    animation-delay: -6s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    50% { transform: scale(1.2) translate(30px, 20px); opacity: 0.5; }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: 40px 24px;
        border-radius: 28px;
    }
    .auth-header h2 { font-size: 1.5rem; }
    .otp-input { width: 42px; height: 56px; }
}
