/* ---- Auth Page (Login / Register combined) ---- */

.auth-wrapper {
    position: fixed;
    inset: 0;
    background: #f6f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI", "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
}

.auth-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18), 0 10px 10px rgba(0, 0, 0, 0.14);
    position: relative;
    overflow: hidden;
    width: 960px;
    max-width: 100%;
    min-height: 600px;
}

.auth-container .form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.auth-container .sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.auth-container .sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.auth-container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.auth-container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: auth-show 0.6s;
}

@keyframes auth-show {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}

.auth-form {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

.auth-form h1 {
    font-weight: 700;
    margin: 0 0 12px;
    font-size: 28px;
    color: #222;
}

.auth-form .brand {
    color: #1976d2;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.auth-form .social {
    display: flex;
    gap: 10px;
    margin: 12px 0 14px;
}

.auth-form .social a {
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.auth-form .social a:hover {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.auth-form .hint {
    font-size: 12px;
    color: #888;
    margin: 8px 0;
}

.auth-form .auth-input,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input:not([type]) {
    background: #f2f2f2 !important;
    border: 1px solid transparent !important;
    padding: 14px 18px !important;
    margin: 6px 0 !important;
    width: 100% !important;
    border-radius: 999px !important;
    outline: none !important;
    font-size: 14px !important;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
    display: block;
}

.auth-form .auth-input:focus,
.auth-form input:focus {
    background: #fff !important;
    border-color: #1976d2 !important;
}

.auth-form .remember-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
    margin: 6px 0 12px;
}

.auth-form .remember-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.auth-form .remember-row a {
    color: #1976d2;
    text-decoration: none;
}

.auth-form .remember-row a:hover {
    text-decoration: underline;
}

.auth-form .validation-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: -2px;
    margin-bottom: 6px;
    width: 100%;
    text-align: left;
    padding-left: 16px;
}

.auth-form .error-banner {
    background: #fdecea;
    color: #b71c1c;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 10px;
    width: 100%;
}

.btn-primary-pill {
    border-radius: 999px;
    border: 1px solid #1976d2;
    background: linear-gradient(135deg, #42a5f5, #1565c0);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 13px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.08s ease-in, box-shadow 0.2s;
    margin-top: 8px;
}

.btn-primary-pill:hover {
    box-shadow: 0 4px 14px rgba(33, 150, 243, 0.45);
}

.btn-primary-pill:active {
    transform: scale(0.97);
}

.btn-ghost-pill {
    border-radius: 999px;
    border: 1.5px solid #fff;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 13px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.08s ease-in, background 0.2s;
}

.btn-ghost-pill:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-ghost-pill:active {
    transform: scale(0.97);
}

/* ---- Overlay (blue curved panel) ---- */

.auth-container .overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.auth-container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.auth-container .overlay {
    background: linear-gradient(135deg, #42a5f5 0%, #1565c0 100%);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-container.right-panel-active .overlay {
    transform: translateX(50%);
}

/* Curved inner edges — pseudo-element circle creates the bulge */
.auth-container .overlay::before,
.auth-container .overlay::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-container .overlay::before {
    left: -20%;
}

.auth-container .overlay::after {
    right: -20%;
}

.auth-container .overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-container .overlay-panel h1 {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 14px;
    letter-spacing: 0.5px;
}

.auth-container .overlay-panel p {
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.3px;
    margin: 16px 0 24px;
    opacity: 0.92;
}

.auth-container .overlay-left {
    transform: translateX(-20%);
    left: 0;
}

.auth-container .overlay-right {
    right: 0;
    transform: translateX(0);
}

.auth-container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.auth-container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

/* ---- Mobile ---- */

@media (max-width: 768px) {
    .auth-container { min-height: 100vh; border-radius: 0; }
    .auth-wrapper { padding: 0; }
    .auth-form { padding: 0 24px; }
    .auth-container .form-container {
        width: 100%;
    }
    .auth-container .sign-up-container {
        top: 100%;
        opacity: 1;
        transition: transform 0.5s;
    }
    .auth-container.right-panel-active .sign-up-container {
        transform: translateY(-100%);
        animation: none;
    }
    .auth-container.right-panel-active .sign-in-container {
        transform: translateY(-100%);
    }
    .auth-container .overlay-container {
        display: none;
    }
    .mobile-toggle-row {
        display: block !important;
        width: 100%;
        margin-top: 14px;
        font-size: 13px;
        color: #666;
    }
    .mobile-toggle-row a {
        color: #1976d2;
        font-weight: 600;
        text-decoration: none;
    }
}

.mobile-toggle-row { display: none; }
