/* ============================================================
   AUTHENTICATION SCREEN
   Romantic Twin Pieces theme with glassmorphism cards,
   deep crimson gradients, gold accents, smooth animations
   ============================================================ */

/* ── screen container ── */
.auth-screen {
    display: none;                           /* toggled to flex on show() */
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.auth-screen-wrapper {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}


/* ============================================================
   LOGO SECTION
   ============================================================ */
.auth-logo-section {
    text-align: center;
}

.auth-logo {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.8) 0%, rgba(139, 0, 0, 0.3) 70%);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(255, 50, 50, 0.6);
    overflow: hidden;
    position: relative;
    animation: auth-logo-pulse 3s ease-in-out infinite;
}

@keyframes auth-logo-pulse {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 50, 50, 0.6); }
    50%      { box-shadow: 0 0 60px rgba(255, 50, 50, 0.8); }
}

.auth-logo-img {
    display: block;
    width: 75% !important;
    height: 75% !important;
    object-fit: contain;
}

.auth-app-title {
    font-family: 'Georgia', serif;
    font-size: 2.2rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6),
                 0 0 24px rgba(255, 71, 87, 0.25);
    letter-spacing: 1px;
}

.auth-app-tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin: 0;
}


/* ============================================================
   FLOW CONTAINER (holds AuthFlow component)
   ============================================================ */
.auth-flow-container {
    width: 100%;
}


/* ============================================================
   AUTH STEP CARD (glassmorphism)
   ============================================================ */
.auth-step {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: auth-step-fadeIn 0.4s ease;
}

@keyframes auth-step-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ── header ── */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-icon {
    font-size: 3rem;
    /* margin-bottom: 12px; */
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
    animation: auth-icon-float 3s ease-in-out infinite;
}

@keyframes auth-icon-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.auth-title {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.auth-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}


/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── input group ── */
.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.auth-label {
    font-size: 0.80rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

.auth-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.2);
}

.auth-hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}


/* ── error message ── */
.auth-error {
    padding: 12px 16px;
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid rgba(255, 71, 87, 0.4);
    border-radius: 10px;
    color: #ff4757;
    font-size: 0.88rem;
    text-align: center;
    animation: auth-error-shake 0.4s ease;
}

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


/* ── buttons ── */
.auth-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    box-sizing: border-box;
}

.auth-btn--primary {
    background: linear-gradient(135deg, #ff6b7a 0%, #ff4757 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.auth-btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff4757 0%, #ff2e40 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.5);
}

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

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

.auth-btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.auth-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}


/* ============================================================
   OTP INPUT (6-digit boxes)
   ============================================================ */
.auth-otp-group {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 0 auto;
    max-width: 360px;
}

.auth-otp-box {
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-align: center;
    outline: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    box-sizing: border-box;
}

.auth-otp-box:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    transform: scale(1.08);
}

.auth-otp-box:not(:placeholder-shown) {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
}


/* ── resend link ── */
.auth-resend-wrap {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-resend-text {
    margin-right: 4px;
}

.auth-resend-btn {
    background: none;
    border: none;
    color: #ffd700;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
    padding: 0;
}

.auth-resend-btn:hover:not(:disabled) {
    color: #ffed4e;
}

.auth-resend-btn--disabled {
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    text-decoration: none;
}


/* ============================================================
   SUCCESS STEP
   ============================================================ */
.auth-step--success {
    text-align: center;
    padding: 48px 32px;
}

.auth-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 8px 32px rgba(76, 209, 55, 0.4);
    animation: auth-success-bounce 0.6s ease;
}

@keyframes auth-success-bounce {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}


/* ============================================================
   RESPONSIVE  –  large desktop ≥ 1200
   ============================================================ */
@media (min-width: 1200px) {
    .auth-screen-wrapper { max-width: 520px; gap: 40px; }
    .auth-logo           { width: 110px; height: 110px; }
    .auth-app-title      { font-size: 2.4rem; }
    .auth-step           { padding: 40px 36px; }
    .auth-title          { font-size: 2rem; }
}


/* ============================================================
   RESPONSIVE  –  tablet landscape 900-1199
   ============================================================ */
@media (max-width: 1199px) and (min-width: 900px) {
    .auth-screen-wrapper { max-width: 500px; }
}


/* ============================================================
   RESPONSIVE  –  tablet portrait 650-899
   ============================================================ */
@media (max-width: 899px) and (min-width: 650px) {
    .auth-screen-wrapper { max-width: 460px; gap: 28px; }
    .auth-logo           { width: 90px; height: 90px; }
    .auth-app-title      { font-size: 2rem; }
    .auth-step           { padding: 32px 28px; }
}


/* ============================================================
   RESPONSIVE  –  mobile < 650
   ============================================================ */
@media (max-width: 649px) {
    .auth-screen {
        padding: 16px;
    }

    .auth-screen-wrapper {
        gap: 24px;
    }

    .auth-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
    }

    .auth-app-title {
        font-size: 1.8rem;
    }

    .auth-app-tagline {
        font-size: 0.9rem;
    }

    .auth-step {
        padding: 28px 24px;
        border-radius: 20px;
    }

    .auth-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    .auth-subtitle {
        font-size: 0.88rem;
    }

    .auth-input {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .auth-btn {
        padding: 13px 20px;
        font-size: 0.95rem;
    }

    .auth-otp-group {
        gap: 8px;
        max-width: 320px;
    }

    .auth-otp-box {
        font-size: 1.6rem;
        border-radius: 10px;
    }

    .auth-success-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
}


/* ============================================================
   RESPONSIVE  –  small mobile < 480
   ============================================================ */
@media (max-width: 479px) {
    .auth-logo {
        width: 70px;
        height: 70px;
    }

    .auth-app-title {
        font-size: 1.6rem;
    }

    .auth-step {
        padding: 24px 20px;
    }

    .auth-title {
        font-size: 1.4rem;
    }

    .auth-otp-group {
        gap: 6px;
        max-width: 280px;
    }

    .auth-otp-box {
        font-size: 1.4rem;
        border-width: 1.5px;
    }
}


/* ============================================================
   RESPONSIVE  –  tiny < 360
   ============================================================ */
@media (max-width: 359px) {
    .auth-screen {
        padding: 12px;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
    }

    .auth-app-title {
        font-size: 1.4rem;
    }

    .auth-step {
        padding: 20px 16px;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .auth-input {
        padding: 11px 14px;
        font-size: 0.9rem;
    }

    .auth-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .auth-otp-group {
        gap: 5px;
        max-width: 240px;
    }

    .auth-otp-box {
        font-size: 1.2rem;
    }
}


/* ============================================================
   RESPONSIVE  –  landscape on short screens
   ============================================================ */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-screen {
        padding: 12px;
        align-items: flex-start;
        overflow-y: auto;
    }

    .auth-screen-wrapper {
        gap: 16px;
        margin: 20px auto;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }

    .auth-app-title {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .auth-app-tagline {
        font-size: 0.82rem;
    }

    .auth-step {
        padding: 20px 24px;
    }

    .auth-header {
        margin-bottom: 18px;
    }

    .auth-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .auth-title {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .auth-subtitle {
        font-size: 0.82rem;
    }

    .auth-form {
        gap: 14px;
    }

    .auth-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .auth-btn {
        padding: 11px 18px;
        font-size: 0.9rem;
    }

    .auth-otp-group {
        gap: 6px;
        max-width: 280px;
    }

    .auth-otp-box {
        font-size: 1.3rem;
    }

    .auth-success-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin-bottom: 12px;
    }
}