/* ========== Auth Split Layout ========== */
.auth-split {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 5;
}

/* ========== Left Side ========== */
.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.auth-left-content {
    position: relative;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Hero area: image + avatar + taglines overlaid */
.auth-hero-area {
    position: relative;
    width: 100%;
    max-width: 300px;
}

/* Avatar overlapping top-left corner of the frame */
.auth-left-avatar {
    position: absolute;
    top: -20px;
    left: -20px;
    z-index: 3;
}

.auth-avatar-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(30, 20, 35, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.15);
    animation: avatar-idle 4s ease-in-out infinite;
}

@keyframes avatar-idle {
    0%   { transform: rotate(0deg) scale(1); }
    25%  { transform: rotate(3deg) scale(1.03); }
    50%  { transform: rotate(0deg) scale(1); }
    75%  { transform: rotate(-3deg) scale(0.97); }
    100% { transform: rotate(0deg) scale(1); }
}

/* Hero image */
.auth-hero-wrapper {
    width: 100%;
    padding: 6px;
    background: #2a1f33;
    border-radius: 54px;
    box-shadow: 0 8px 32px rgba(124, 108, 175, 0.25);
    overflow: hidden;
}

.auth-hero-img {
    width: calc(100% + 48px);
    margin: -24px;
    display: block;
    object-fit: cover;
    border-radius: 48px;
}

/* Tagline bubbles overlaying the image */
.auth-taglines {
    position: absolute;
    bottom: 60px;
    right: -120px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.tagline-bubble {
    background: rgba(30, 25, 40, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.75rem 1.3rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    width: fit-content;
    white-space: nowrap;
}

.tagline-bubble {
    opacity: 0;
    transform: translateY(10px);
}

/* 10s total: staggered in (0-2s), hold (2-7s), all fade out (7-8s), pause (8-10s) */
.tagline-1 {
    align-self: flex-start;
    border-top-left-radius: 8px;
    animation: tagline-1 10s ease infinite;
}
.tagline-2 {
    align-self: flex-start;
    margin-left: 1rem;
    animation: tagline-2 10s ease infinite;
}
.tagline-3 {
    align-self: flex-start;
    margin-left: 2rem;
    animation: tagline-3 10s ease infinite;
}

@keyframes tagline-1 {
    0%   { opacity: 0; transform: translateY(10px); }
    5%   { opacity: 1; transform: translateY(0); }
    70%  { opacity: 1; transform: translateY(0); }
    80%  { opacity: 0; transform: translateY(0); }
    100% { opacity: 0; }
}

@keyframes tagline-2 {
    0%, 7% { opacity: 0; transform: translateY(10px); }
    12%  { opacity: 1; transform: translateY(0); }
    70%  { opacity: 1; transform: translateY(0); }
    80%  { opacity: 0; transform: translateY(0); }
    100% { opacity: 0; }
}

@keyframes tagline-3 {
    0%, 14% { opacity: 0; transform: translateY(10px); }
    19%  { opacity: 1; transform: translateY(0); }
    70%  { opacity: 1; transform: translateY(0); }
    80%  { opacity: 0; transform: translateY(0); }
    100% { opacity: 0; }
}

/* Title */
.auth-title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    color: var(--text-primary);
    text-align: center;
    margin-top: 0.5rem;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.5) 35%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 255, 255, 0.5) 65%,
        rgba(255, 255, 255, 0.5) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: title-shine 4s ease-in-out infinite;
}

@keyframes title-shine {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Active count */
.auth-active-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(152, 152, 152, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0.45rem 1rem;
}

.active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ========== Vertical Divider ========== */
.auth-divider-vertical {
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    align-self: stretch;
    margin: 3rem 0;
}

/* ========== Right Side ========== */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-right-inner {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: none;
}

/* Logo */
.auth-logo {
    width: 340px;
    margin-bottom: 2rem;
    margin-top: -2rem;
}

/* Form sections — consolidated under Forgot password section below */

/* Floating labels */
.auth-form-group {
    width: 100%;
}

.floating-field {
    position: relative;
}

.floating-field input {
    width: 100%;
    height: 56px;
    padding: 1.4rem 0.9rem 0.5rem;
    background-color: #1a1020;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    color-scheme: dark;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.floating-field input:focus {
    border-color: var(--accent);
}

.floating-field input:-webkit-autofill,
.floating-field input:-webkit-autofill:hover,
.floating-field input:-webkit-autofill:focus,
.floating-field input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0 1000px #1a1020 inset !important;
    box-shadow: 0 0 0 1000px #1a1020 inset !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.12);
}

.floating-field label {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.2s ease;
}

.floating-field input:focus + label,
.floating-field input:not(:placeholder-shown) + label,
.floating-field input:-webkit-autofill + label {
    top: 0.6rem;
    transform: none;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Auth primary button */
.btn-auth-primary {
    width: 100%;
    padding: 0.75rem;
    background: #2a1f33;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.2rem;
}

.btn-auth-primary:hover {
    background: #382a45;
}

.btn-auth-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toggle text */
.auth-toggle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-toggle a {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* Forgot password section */
#login-form-section,
#signup-form-section,
#forgot-form-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-forgot-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

/* Success message */
.auth-success {
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: var(--radius-sm);
    color: #2ecc71;
    font-size: 0.85rem;
    text-align: center;
}

/* Error message */
.auth-error {
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius-sm);
    color: #e74c3c;
    font-size: 0.85rem;
    text-align: center;
}

/* Or divider */
.auth-or-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0.3rem 0;
}

.auth-or-divider::before,
.auth-or-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Social buttons */
.btn-social {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-social:hover {
    opacity: 0.9;
}

.btn-social:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-facebook {
    background: #1877F2;
    color: #fff;
}

.btn-google {
    background: #fff;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Footer */
.auth-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.auth-footer-mobile {
    display: none;
}

/* ========== Mobile ========== */
@media (max-width: 768px) {
    .auth-split {
        flex-direction: column-reverse;
    }

    .auth-left {
        padding: 2rem 1rem 3rem;
    }

    .auth-left-content {
        align-items: center;
    }

    .auth-hero-area {
        max-width: 260px;
    }

    .auth-taglines {
        right: -20px;
        bottom: 20px;
    }

    .tagline-bubble {
        font-size: 0.75rem;
    }

    .auth-title {
        text-align: center;
    }

    .auth-divider-vertical {
        display: none;
    }

    .auth-right {
        width: 100%;
        padding: 3rem 1rem 1rem;
    }

    .auth-right .auth-footer {
        display: none;
    }

    .auth-footer-mobile {
        display: block;
    }

    .auth-logo {
        width: 200px;
        margin-top: 0;
    }
}
