.login-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.login-modal-overlay.show {
    display: flex;
}

.login-modal {
    background-color: #fff;
    border-radius: 12px;
    width: 480px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: loginModalIn 0.25s ease-out;
}

.login-modal.profile-settings-modal {
    width: 600px;
    max-width: 95vw;
}

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

.login-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.login-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.login-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.login-modal-close:hover {
    color: #333;
    background-color: #f5f5f5;
}

.login-modal-body {
    padding: 28px;
}

.login-form-group {
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form-group input {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    line-height: 42px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: all 0.2s;
    background-color: #fafafa !important;
    font-family: inherit !important;
}

.login-form-group input:-webkit-autofill,
.login-form-group input:-webkit-autofill:hover,
.login-form-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fafafa inset !important;
    -webkit-text-fill-color: #333 !important;
    background-color: #fafafa !important;
    height: 42px !important;
}

.login-form-group input:focus {
    border-color: #9333ea;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.15);
}

.login-form-checkbox {
    margin-bottom: 20px;
}

.custom-checkbox-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.custom-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #bbb;
    border-radius: 4px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.custom-checkbox::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s;
    margin-top: -2px;
}

.custom-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox {
    border-color: #9333ea;
    background-color: #9333ea;
}

.custom-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox::after {
    transform: rotate(45deg) scale(1);
}

.custom-checkbox-label:hover .custom-checkbox {
    border-color: #9333ea;
}

.custom-checkbox-label input[type="checkbox"]:focus-visible ~ .custom-checkbox {
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.25);
}

.custom-checkbox-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.login-form-group select {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    line-height: 42px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    background-color: #fff !important;
    color: #333 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.login-modal-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    padding: 8px 12px;
    background-color: #fdecea;
    border-radius: 4px;
}

.extra-operation-options {
    display: flex;
    flex-direction: row;
    gap: 32px;
    margin-top: 8px;
}

.extra-operation-options .extra-operation-label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 0 !important;
    font-weight: normal !important;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.extra-operation-options .extra-operation-label input[type="radio"] {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.extra-operation-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.extra-operation-radio {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #bbb;
    border-radius: 50%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.extra-operation-radio::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s, transform 0.15s;
    transform: scale(0);
}

.extra-operation-label input[type="radio"]:checked ~ .extra-operation-radio {
    border-color: #9333ea;
}

.extra-operation-label input[type="radio"]:checked ~ .extra-operation-radio::after {
    background-color: #9333ea;
    transform: scale(1);
}

.extra-operation-label:hover .extra-operation-radio {
    border-color: #9333ea;
}

.extra-operation-label input[type="radio"]:focus-visible ~ .extra-operation-radio {
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.25);
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border: 1px solid #9333ea;
    border-radius: 50%;
    background-color: #f3e8ff;
    color: #9333ea;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    line-height: 1;
    vertical-align: middle;
    transition: all 0.2s;
}

.help-icon:hover {
    background-color: #9333ea;
    color: #fff;
    text-decoration: none;
}

.amap-key-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}

.gaode-usage-query-btn {
    flex-shrink: 0;
    padding: 4px 12px;
    font-size: 13px;
    color: #9333ea;
    background: #f3e8ff;
    border: 1px solid #d8b4fe;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.gaode-usage-query-btn:hover {
    background: #9333ea;
    color: #fff;
    border-color: #9333ea;
}

.gaode-usage-modal-overlay {
    z-index: 10002;
}

.login-modal.gaode-usage-modal {
    width: 640px;
    max-width: 95vw;
}

.gaode-usage-loading {
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 24px 0;
}

.gaode-usage-table-wrap {
    overflow-x: auto;
}

.gaode-usage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #333;
}

.gaode-usage-table th,
.gaode-usage-table td {
    border: 1px solid #333;
    padding: 10px 12px;
    text-align: left;
}

.gaode-usage-table th {
    background: #fafafa;
    font-weight: 600;
}

.gaode-usage-table td:nth-child(2),
.gaode-usage-table td:nth-child(3),
.gaode-usage-table td:nth-child(4) {
    text-align: right;
}

.gaode-usage-disclaimer {
    margin: 16px 0 0;
    font-size: 13px;
    color: #888;
    text-align: center;
}

.alert-modal-overlay {
    z-index: 10001;
}

.alert-modal {
    width: 420px;
    max-width: 92vw;
}

.alert-modal-body {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

.alert-modal-image-wrap {
    display: none;
    justify-content: center;
    margin-top: 16px;
}

.alert-modal-image-wrap.show {
    display: flex;
}

.alert-modal-image-wrap img {
    max-width: 200px;
    width: 100%;
    height: auto;
}

.alert-modal-title-success {
    color: #16a34a;
}

.alert-modal-title-error {
    color: #d9363e;
}

.confirm-modal-overlay {
    z-index: 10000;
}

.confirm-modal {
    width: 420px;
    max-width: 92vw;
}

.confirm-modal-body {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

.login-modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 28px;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

.login-modal-btn {
    padding: 9px 24px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
    font-family: inherit;
}

.login-btn-full {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
}

.login-modal-btn-cancel {
    background-color: #fff;
    border-color: #ddd;
    color: #666;
}

.login-modal-btn-cancel:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.login-modal-btn-primary {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    border-color: #7c3aed;
}

.login-modal-btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    border-color: #6d28d9;
}

.login-modal-btn-primary:disabled {
    background: #c4b5fd;
    border-color: #c4b5fd;
    cursor: not-allowed;
}

.login-modal-btn-danger {
    background: #e74c3c !important;
    border-color: #e74c3c !important;
    color: #fff !important;
}

.login-modal-btn-danger:hover {
    background: #cf3426 !important;
    border-color: #cf3426 !important;
}

.choice-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.choice-modal-footer .login-modal-btn {
    width: 100%;
    padding: 12px 24px;
}

.choice-modal-body {
    text-align: center;
    color: #666;
}

/* 帮助页自定义弹窗（屏幕居中） */
