
/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    height: 100vh;
    overflow: hidden;
}

/* ===== 登录界面 ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #ffffff;
    padding: 16px;
}

.login-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-header .logo {
    font-size: 40px;
    display: block;
    margin-bottom: 4px;
}

.login-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

.login-header p {
    color: #6b7280;
    font-size: 13px;
    margin-top: 2px;
}

/* ===== 登录方式切换 ===== */
.login-mode-switch {
    display: flex;
    background: transparent;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 16px;
    border: none;
    gap: 4px;
}

.login-mode-switch .mode-btn {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
    color: #6b7280;
}

.login-mode-switch .mode-btn.active {
    background: #3b82f6;
    color: #fff;
}

/* ===== 表单 ===== */
#accountLoginFields {
    display: block;
}

#phoneLoginFields {
    display: none;
}

.input-group {
    margin-bottom: 28px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

.input-group .code-row {
    display: flex;
    gap: 8px;
}

.input-group .code-row input {
    flex: 1;
}

.input-group .code-row button {
    width: auto;
    padding: 0 16px;
    font-size: 13px;
    white-space: nowrap;
    background: #e5e7eb;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.input-group .code-row button:hover:not(:disabled) {
    background: #d1d5db;
}

.input-group .code-row button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #2563eb;
}

.error-msg {
    text-align: center;
    font-size: 13px;
    margin-top: 10px;
    min-height: 20px;
    color: #ef4444;
}

.register-entry {
    margin-top: 16px;
    text-align: right;
    font-size: 13px;
    color: #6b7280;
}

.register-entry .register-link {
    color: #3b82f6;
    cursor: pointer;
    font-weight: 600;
}

.register-entry .register-link:hover {
    text-decoration: underline;
}

/* ===== 注册弹窗 ===== */
.register-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.register-modal.show {
    display: flex;
}

.register-modal .modal-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.register-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.register-modal .modal-header h2 {
    font-size: 20px;
    color: #1a1a2e;
}

.register-modal .modal-header .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0 4px;
}

.register-modal .submit-btn {
    background: #8b5cf6;
}

.register-modal .submit-btn:hover {
    background: #7c3aed;
}

/* ===== 修改密码 ===== */
.change-pwd-section {
    display: none;
    margin-top: 16px;
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}

.change-pwd-section.show {
    display: block;
}

.change-pwd-section .section-title {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 12px;
}

.change-pwd-section .submit-btn {
    background: #8b5cf6;
}

.change-pwd-section .submit-btn:hover {
    background: #7c3aed;
}
