:root {
    --placeholder: #A79EB1;
    --border: #666666;
    --card-bg: #FFFFFF;
}

/* ===== Background ===== */
.login-bg {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #FEFEFE;
}

.login-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #D9D9D9;
    z-index: 0;
    background: url("../images/login_bg.png") no-repeat center;
    background-size: cover;
}

/* ===== Logo ===== */
.login-logo {
    display: block;
    position: relative;
    z-index: 2;
    padding: 18px 80px;
}

.login-logo .logo-img {
    width: 140px;
    height: 45px;
}

/* ===== Card ===== */
.login-card-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    padding-right: 180px;
    margin-top: 68px;
}

.login-card {
    width: 516px;
    min-height: 600px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 80px 70px 23px 70px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

/* ===== Title ===== */
.login-title {
    font-size: 40px;
    font-weight: 900;
    color: var(--primary);
    text-align: center;
    line-height: 1.3;
    margin-bottom: 60px;
}

.login-title .highlight {
    color: var(--yellow);
}

/* ===== Form ===== */
.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
    width: 100%;
    align-self: stretch;
}

.form-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 48px;
    width: 100%;
}

/* 面板：输入框与按钮之间留 50px */
#registerForm,
#loginForm {
    gap: 0;
}
#registerForm .form-section,
#loginForm .form-section {
    margin-top: 50px;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 56px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    background: transparent;
    transition: border-color 0.2s ease;
}

.input-group:focus-within {
    border-color: var(--primary);
}

/* Phone Input */
.phone-prefix {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    position: relative;
}

.phone-prefix-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    line-height: 24px;
}

.phone-prefix-arrow {
    width: 16px;
    height: 9px;
    position: relative;
}

.phone-prefix-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 9px solid var(--white);
}

.phone-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    line-height: 24px;
    background: transparent;
    font-family: var(--font-family);
}

.phone-input::placeholder {
    color: var(--placeholder);
}

/* Verification Input */
.verify-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 32px;
}

.verify-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.verify-input {
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    line-height: 24px;
    background: transparent;
    font-family: var(--font-family);
    width: 100%;
}

.verify-input::placeholder {
    color: var(--placeholder);
}

.verify-separator {
    margin: 0 5px;
    width: 1px;
    height: 16px;
    background: var(--placeholder);
}

.btn-verify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 110px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: var(--font-family);
}

.btn-verify:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-verify:active {
    transform: scale(0.97);
}

/* Submit Button */
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: var(--font-family);
}

.btn-login:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 42, 166, 0.3);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Link Text */
.login-link {
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    color: var(--gray-text);
    line-height: 1.5;
}

.login-link a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.login-link a:hover {
    opacity: 0.8;
}

/* Agreement */
.agreement {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agreement-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid var(--gray-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: transparent;
    position: relative;
}

.agreement-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.agreement-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 10px;
    line-height: 1;
    font-weight: bold;
}

.agreement-text {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-text);
    line-height: 1.5;
}

.agreement-text a {
    color: var(--primary);
    text-decoration: underline;
}

/* ===== Responsive: 900px ===== */
@media (max-width: 900px) {
    .login-card-container {
        justify-content: center;
        padding-right: 0;
        margin-top: 80px;
    }

    .login-logo {
        padding: 18px 40px;
    }
}

/* ===== Responsive: 600px ===== */
@media (max-width: 600px) {
    .login-logo {
        padding: 18px 20px;
    }
    .login-bg {
        background-color: var(--primary);
    }
    .login-bg-image {
        background-size: auto 100%;
        background-position: right 0px;
    }
    .login-card {
        width: 90vw;
        max-width: 360px;
        min-height: auto;
        padding: 40px 24px 23px;
        margin: 40px auto;
    }

    .login-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .login-form {
        gap: 60px;
        width: 100%;
    }

    .input-group {
        height: 50px;
    }

    .btn-login {
        height: 54px;
        font-size: 16px;
    }

    .phone-prefix-text {
        font-size: 14px;
    }

    .phone-input {
        font-size: 14px;
    }

    .verify-input {
        font-size: 14px;
    }

    .btn-verify {
        width: 100px;
        height: 36px;
        font-size: 14px;
    }

    .login-link {
        font-size: 14px;
    }

    .agreement-text {
        font-size: 12px;
    }
}

/* ===== Responsive: 375px ===== */
@media (max-width: 375px) {
    .login-title {
        font-size: 24px;
    }

    .login-card {
        padding: 32px 20px 20px;
    }

    .input-group {
        height: 48px;
        padding: 6px;
    }

    .btn-login {
        height: 50px;
    }
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    transition: transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===== Countdown Button ===== */
.btn-verify.counting {
    background: #f0f0f0;
    color: var(--gray-text);
    pointer-events: none;
    cursor: not-allowed;
}

.btn-verify:not(.counting) {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}