/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 容器 - iPhone 16 尺寸 */
.container {
    position: relative;
    width: 393px;
    height: 852px;
    margin: 0 auto;
    background: #ffffff;
    overflow: hidden;
}

/* 响应式适配 */
@media (max-width: 393px) {
    .container {
        width: 100vw;
        height: 100vh;
    }
}

/* 顶部背景 */
.header-bg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 393px;
    height: 230px;
    z-index: 1;
}

.bg-image {
    width: 100%;
    height: 100%;
    display: block;
}

/* 页面标题 */
.page-title {
    position: absolute;
    left: 182px;
    top: 104px;
    width: 178px;
    height: 22px;
    font-size: 30px;
    font-weight: 700;
    line-height: 22px;
    color: #ffffff;
    text-align: left;
    z-index: 10;
    white-space: nowrap;
}

/* 内容区域包装器 */
.content-wrapper {
    position: absolute;
    left: 50%;
    top: 163px;
    transform: translateX(-50%);
    width: 365px;
    z-index: 10;
}

/* 主要内容卡片 */
.main-card {
    width: 100%;
    min-height: 199px;
    height: auto;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 2px 2px 0px rgba(122, 152, 218, 0.2);
    padding: 19px 18px;
    margin-bottom: 30px;
}

.card-title {
    font-size: 20px;
    font-weight: 500;
    line-height: 22px;
    color: #3a71e8;
    text-align: center;
    margin-bottom: 17px;
}

/* 输入字段 */
.input-field {
    position: relative;
    width: 331px;
    height: 45px;
    background: #f6f7fc;
    border-radius: 100px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    margin: 0 auto 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.input-field:hover {
    background: #eef0f8;
}

.input-field:focus-within {
    background: #ffffff;
    border-color: #3a71e8;
}

.input-field:last-of-type {
    margin-bottom: 0;
}

.field-label {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #989898;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 12px;
    display: inline-block;
}

.field-value {
    flex: 1;
    text-align: right;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #989898;
    margin-right: 8px;
}

.field-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #333333;
    text-align: right;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 0;
    margin: 0;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
}

.field-input::placeholder {
    color: #c0c0c0;
    opacity: 1;
    -webkit-text-fill-color: #c0c0c0;
    line-height: 1.5;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.field-input:focus {
    color: #333333;
}

.field-input.error {
    color: #ff4444;
}

.input-field.error {
    border: 2px solid #ff4444 !important;
    background: #fff5f5 !important;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.phone-number {
    color: #989898;
}

.dropdown-arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.input-field:hover .dropdown-arrow {
    transform: translateY(2px);
}

.close-icon {
    width: 10px;
    height: 10px;
}

/* 确认按钮 */
.confirm-button {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 331px;
    height: 45px;
    background: linear-gradient(180deg, #f7b14a 0%, #ff8a2d 100%);
    border: none;
    border-radius: 100px;
    font-size: 20px;
    font-weight: 500;
    line-height: 22px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.confirm-button:hover {
    box-shadow: 0px 4px 12px 0px rgba(255, 138, 45, 0.4);
    transform: translateX(-50%) translateY(-2px);
}

.confirm-button:active {
    transform: translateX(-50%) translateY(0px);
    box-shadow: 0px 2px 6px 0px rgba(255, 138, 45, 0.3);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 320px;
    max-height: 500px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    flex: 1;
    text-align: center;
}

.modal-back {
    position: absolute;
    left: 20px;
    font-size: 16px;
    color: #3a71e8;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-back:hover {
    color: #2860d0;
}

.modal-close {
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

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

.modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.location-option {
    padding: 15px 20px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
}

.location-option:hover {
    background: #f6f7fc;
}

.location-option:active {
    background: #eef0f8;
}

/* 滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 自定义弹窗 */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.custom-alert-overlay.show {
    opacity: 1;
}

.custom-alert {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 340px;
    width: 100%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.custom-alert-overlay.show .custom-alert {
    transform: scale(1);
}

.custom-alert-header {
    padding: 24px 24px 16px;
    text-align: center;
}

.custom-alert-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    position: relative;
}

.custom-alert-icon::before {
    content: '';
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: absolute;
}

.custom-alert-icon.success::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.custom-alert-icon.error::before {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.custom-alert-icon.info::before {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.custom-alert-icon.success::after {
    content: '✓';
    font-size: 36px;
    color: white;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.custom-alert-icon.error::after {
    content: '✕';
    font-size: 36px;
    color: white;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.custom-alert-icon.info::after {
    content: 'i';
    font-size: 36px;
    color: white;
    font-weight: bold;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.custom-alert-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.custom-alert-title.success {
    color: #155724;
}

.custom-alert-title.error {
    color: #721c24;
}

.custom-alert-title.info {
    color: #0c5460;
}

.custom-alert-message {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    padding: 0 24px 24px;
    text-align: center;
    white-space: pre-wrap;
}

.custom-alert-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    display: flex;
    gap: 12px;
}

.custom-alert-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-alert-btn-primary {
    background: linear-gradient(180deg, #f7b14a 0%, #ff8a2d 100%);
    color: white;
}

.custom-alert-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 45, 0.4);
}

.custom-alert-btn-primary:active {
    transform: translateY(0);
}

.custom-alert-btn-secondary {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.custom-alert-btn-secondary:hover {
    background: #f5f5f5;
}

