/* Redesigned Auth Pages Styles - Nova Theme - High Fidelity Restoration */

:root {
    --auth-blue: #005AFA;
    /* Closer to the vibrant blue in the image */
    --auth-blue-hover: #0048cc;
    --auth-text-main: #000000;
    --auth-text-secondary: #333333;
    --auth-bg-input: #F2F2F2;
    --auth-border: #E5E7EB;
    --auth-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", sans-serif;
    background-color: #f0f2f5;
}

/* --- Global Hidden Elements (Mobile Only Elements) --- */
.auth-mobile-header, 
.nova-form-label, 
.regist-link-mobile,
.auth-bottom-links {
    display: none; /* Hidden on Desktop by default */
}

/* Main Wrapper */
.auth-nova-wrapper {
    min-height: 100vh;
    width: 100%;
    background: url('../img/auth_geometric_bg.png') no-repeat center center;
    background-size: cover;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Logo Top Left */
.auth-nova-logo {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.auth-nova-logo img {
    height: 32px;
}

.auth-nova-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

/* Layout Container */
.auth-nova-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Push elements to the sides */
    gap: 40px;
    max-width: 1500px;
    width: 100%;
    padding: 30px 80px;
    /* 顶部内边距从 60px 减小为 30px */
    z-index: 5;
}

/* Form Card */
.auth-nova-card {
    background: #FFFFFF;
    width: 100%;
    max-width: 480px;
    padding: 40px 50px 50px;
    /* 顶部内边距从 60px 减小为 40px */
    border-radius: 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Diagonal Ribbon for Forgot Password */
.auth-card-links {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.forget-link-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    pointer-events: auto;
}

.auth-card-links .forget-link {
    display: block;
    width: 160px;
    height: 40px;
    line-height: 40px;
    background: #A3C5FF;
    /* Light blue ribbon */
    color: var(--auth-blue);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transform: rotate(-45deg) translate(-45px, -15px);
    cursor: pointer;
    transition: background 0.3s;
}

.auth-card-links .forget-link:hover {
    background: #90B6FF;
}

/* Language Switcher in Top Right */
.switcher-icon-box {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: #F2F2F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    pointer-events: auto;
    transition: all 0.3s;
}

.switcher-icon-box:hover {
    background: #E8E8E8;
}

/* Card Content Styling */
.auth-card-title {
    font-size: 36px;
    font-weight: 700;
    color: #000;
    margin-top: 20px;
    margin-bottom: 12px;
}

.auth-card-subtitle-desktop {
    font-size: 18px;
    color: #333;
    margin-bottom: 40px;
}

.auth-card-subtitle-desktop a {
    color: var(--auth-blue);
    text-decoration: none;
    margin-left: 10px;
    cursor: pointer;
}

/* Tab Style Label */
.nova-form-item {
    height: 60px !important;
    /* Force match the input height */
    margin-bottom: 12px !important;
    /* Fixed tight spacing */
    margin-top: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    /* Cut off any ghost spacing */
}

.nova-form-item .el-input,
.nova-form-item .el-select,
.nova-form-item .phone-input-wrapper {
    height: 60px !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: top !important;
    font-size: 14px;
}

/* Get Code Button Styling */
.nova-code-btn {
    height: 60px !important;
    line-height: 60px !important;
    padding: 0 20px !important;
    border-radius: 0 !important;
    background-color: var(--auth-blue) !important;
    color: #FFFFFF !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.nova-code-btn:hover {
    background-color: var(--auth-blue-hover) !important;
    opacity: 0.9;
}

.nova-code-btn:disabled {
    background-color: #CCC !important;
    cursor: not-allowed !important;
}

/* Element UI Input Overrides - Matching #F2F2F2 background */
.auth-nova-card .el-input__inner {
    height: 60px !important;
    line-height: 60px !important;
    background-color: var(--auth-bg-input) !important;
    border: none !important;
    border-radius: 0 !important;
    /* Sharp corners */
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #333 !important;
    padding: 0 20px !important;
}

.auth-nova-card .el-input__inner::placeholder {
    color: #999;
    font-weight: 400;
}

.phone-input-wrapper {
    display: flex;
    background: var(--auth-bg-input);
}

.country-code-select {
    width: 100px !important;
}

.country-code-select .el-input__inner {
    border-right: 1px solid #D9D9D9 !important;
    color: #666 !important;
    font-weight: 700 !important;
}

.phone-number-input {
    flex: 1;
}

/* Checkbox Row */
.auth-checkbox-row {
    margin: 15px 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: #333;
}

.auth-checkbox-row a {
    color: var(--auth-blue);
    text-decoration: none;
    font-weight: 600;
}

/* Large Blue Button */
.login-btn-large {
    width: 100% !important;
    height: 70px !important;
    margin-top: 10px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    background: var(--auth-blue) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 20px rgba(0, 90, 250, 0.2) !important;
    color: #FFFFFF !important;
    cursor: pointer;
}

.login-btn-large:hover {
    background: var(--auth-blue-hover) !important;
}

/* OAuth Section */
.oauth-section {
    margin-top: 20px !important;
}

.oauth-divider {
    position: relative !important;
    text-align: center !important;
    margin-bottom: 10px !important;
    line-height: 1 !important;
}

.oauth-divider::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: #EEE !important;
}

.oauth-divider span {
    position: relative !important;
    background: #fff !important;
    padding: 0 15px !important;
    color: #999 !important;
    font-size: 14px !important;
}

.oauth-icons {
    display: flex !important;
    justify-content: center !important;
    gap: 20px !important;
}

.oauth-icon-btn {
    width: 40px !important;
    height: 40px !important;
    border: 1px solid #EEE !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
}

/* Promotional Text Section */
.auth-promo {
    flex: 1;
    max-width: 500px;
}

.promo-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
    color: #000;
    margin-bottom: 25px;
}

.promo-text {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.promo-subtext {
    font-size: 16px;
    color: #666;
    margin-bottom: 35px;
}

.promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border: 1px solid var(--auth-blue);
    color: var(--auth-blue);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.promo-btn:hover {
    background: var(--auth-blue);
    color: #fff;
}

/* Tabs for Auth Types (Registration/Forget) */
.auth-tabs {
    display: flex !important;
    gap: 30px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #EEE !important;
}

.auth-tab-item {
    padding-bottom: 12px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    color: #666 !important;
    position: relative !important;
    font-weight: 600 !important;
}

.auth-tab-item.active {
    color: var(--auth-blue) !important;
}

.auth-tab-item.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background: var(--auth-blue) !important;
}

/* Footer Section */
.auth-nova-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #EEE;
}

.auth-nova-footer a {
    color: inherit;
    text-decoration: none;
}

/* ================== Pixel-Perfect Mobile Restoration ================== */
@media (max-width: 1024px) {
    .auth-nova-wrapper {
        background: #FFFFFF !important;
        padding: 0;
        justify-content: flex-start;
        overflow-y: auto;
    }

    /* 1. Mobile Fixed Header */
    .auth-mobile-header {
        display: flex !important; /* Show on mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: #FFFFFF;
        z-index: 1000;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid #F0F0F0;
        box-sizing: border-box;
    }

    .mobile-logo img { height: 32px; }
    
    .mobile-home-btn {
        font-size: 14px;
        color: var(--auth-blue);
        text-decoration: none;
        border: 1.5px solid var(--auth-blue);
        padding: 4px 12px;
        border-radius: 4px;
        font-weight: 600;
    }

    /* 2. Container and Card */
    .auth-nova-container {
        padding: 60px 0 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 0;
    }

    .auth-nova-card {
        width: 100% !important;
        max-width: 100% !important;
        min-height: calc(100vh - 60px);
        box-shadow: none !important;
        border-radius: 0;
        padding: 20px 20px 40px;
        background: #FFFFFF;
    }

    /* Hide desktop-only elements on mobile */
    .auth-card-title, .auth-card-links, .auth-promo, .auth-nova-logo, .auth-card-subtitle-desktop {
        display: none !important;
    }

    /* 3. Language Switcher (Top Right of Content) */
    .switcher-icon-box {
        display: flex !important;
        position: static !important;
        justify-content: flex-end;
        margin-bottom: 20px;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        border-radius: 0 !important;
        top: auto !important;
        right: auto !important;
    }

    .el-dropdown-link {
        font-size: 15px;
        color: #444;
        font-weight: 500;
        display: flex;
        align-items: center;
    }
    
    .lang-text { margin: 0 5px; }

    /* 4. Tabs and Register Link Row */
    .auth-tabs-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid #F0F0F0;
        padding-bottom: 10px;
    }

    .auth-tabs {
        margin-bottom: 0 !important;
        border-bottom: none !important;
        gap: 20px !important;
    }

    .auth-tab-item {
        padding-bottom: 10px !important;
        font-size: 16px !important;
        color: #666 !important;
    }

    .auth-tab-item.active {
        color: var(--auth-blue) !important;
        font-weight: 700 !important;
    }

    .auth-tab-item.active::after {
        content: '' !important;
        position: absolute !important;
        bottom: -11px !important;
        left: 0 !important;
        width: 100% !important;
        height: 2px !important;
        background: var(--auth-blue) !important;
    }

    .regist-link-mobile {
        display: block !important; /* Show on mobile */
        font-size: 14px;
        color: #666;
    }

    .regist-link-mobile a {
        color: var(--auth-blue);
        text-decoration: none;
        font-weight: 600;
        margin-left: 5px;
    }

    /* 5. Labeled Inputs with Light Blue BG */
    .form-item-wrapper {
        margin-bottom: 20px;
    }

    .nova-form-label,
    .custom-form .el-form-item__label {
        display: block !important; /* Show labels on mobile */
        font-size: 13px !important; /* Slightly smaller for refinement */
        color: #888 !important;
        margin-bottom: 6px !important;
        line-height: 1.4 !important;
        padding: 0 !important;
    }

    .auth-nova-card .el-input__inner, 
    .phone-input-wrapper,
    .custom-form .el-input__inner,
    .custom-form .el-textarea__inner {
        background-color: #F4F7FF !important;
        border: 1px solid #E5E9F2 !important;
        border-radius: 6px !important;
        height: 46px !important; /* Slightly more compact than 50px */
        line-height: 46px !important;
        font-size: 15px !important; /* Refined from 16px */
        font-weight: 500 !important;
        color: #333 !important;
        padding: 0 15px !important;
        transition: all 0.3s ease; 
    }

    /* Premium Focus State */
    .auth-nova-card .el-input__inner:focus, 
    .phone-input-wrapper:focus-within {
        background-color: #FFFFFF !important;
        border-color: var(--auth-blue) !important;
        box-shadow: 0 0 0 4px rgba(0, 90, 250, 0.08) !important;
    }

    .phone-input-wrapper { display: flex; align-items: center; padding: 0 !important; }
    .country-code-select { 
        width: 95px !important; /* Increased from 80px to accommodate the arrow */
    }
    .country-code-select .el-input__inner { 
        border: none !important; 
        border-right: 1px solid #D9D9F2 !important; 
        border-radius: 0 !important; 
        width: 100% !important; 
        padding: 0 35px 0 10px !important; /* Increased padding for the arrow move */
        text-align: left !important;
    }
    /* Move the arrow further left inside the 95px area */
    .country-code-select .el-input__suffix {
        right: 18px !important; 
    }
    .phone-number-input .el-input__inner { border: none !important; flex: 1; padding-left: 15px !important; }

    .nova-form-item,
    .custom-form .el-form-item {
        margin-bottom: 15px !important; 
        height: auto !important;
    }
    
    .custom-form .el-form-item__content {
        line-height: normal !important;
    }

    /* 6. Button and Bottom Links */
    .login-btn-large {
        height: 54px !important;
        font-size: 18px !important;
        margin-top: 10px !important;
        border-radius: 4px !important;
        box-shadow: 0 5px 15px rgba(0, 90, 250, 0.1) !important;
        background: var(--auth-blue) !important;
    }

    .auth-bottom-links {
        display: flex !important; /* Show bottom links on mobile */
        justify-content: flex-end;
        margin-top: 15px;
    }

    .forget-link-bottom {
        font-size: 14px;
        color: #888;
        text-decoration: none;
        cursor: pointer;
    }

    /* 7. Social Login Icons */
    .oauth-section {
        margin-top: 60px !important;
    }

    .oauth-divider span {
        background: #FFF !important;
        color: #AAA !important;
        font-size: 13px !important;
    }

    .oauth-icons {
        margin-top: 30px !important;
        gap: 30px !important;
        justify-content: center !important;
    }

    .oauth-icon-btn {
        width: 44px !important;
        height: 44px !important;
        border: 1px solid #EEE !important;
        background: transparent !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .oauth-icon-btn img {
        width: 28px !important;
        height: 28px !important;
    }

    .auth-nova-footer { display: none !important; }
}