* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7f9cf5 0%, #a78bfa 100%);
}

.card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    padding: 32px 24px;
    width: 100%;
    max-width: 420px;
    margin: 32px auto;
    box-sizing: border-box;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.status {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.location-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}

.location-info p {
    margin: 5px 0;
    color: #666;
}

.loading {
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-log {
    background: #2c2c2c;
    color: #ff4d4d;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    text-align: left;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 新增: 最终结果按钮的样式 */
.result-container a, #result-container a {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 18px auto 0 auto;
    padding: 14px 0;
    font-size: 20px;
    background: #27ae60;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 8px #27ae6022;
    transition: background 0.2s;
}
.result-container a:active, #result-container a:active {
    background: #219150;
}

#amap-container {
    max-width: 100%;
    min-height: 200px;
    height: 300px;
    border-radius: 8px;
    margin: 0 auto;
}

#amap-picker {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* 省市区选择器样式 */
#amap-picker select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

#amap-picker select:focus {
    border-color: #409eff;
}

#amap-picker select:hover {
    border-color: #409eff;
}

/* 移动端样式优化 */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    .container {
        min-height: 100vh;
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .card {
        width: 100%;
        max-width: none;
        min-width: unset;
        padding: 15px;
        margin: 0;
        border-radius: 12px;
        box-sizing: border-box;
    }
    
    #amap-container {
        height: 250px;
        width: 100%;
        margin-bottom: 15px;
    }
    
    #confirm-location {
        font-size: 16px !important;
        padding: 15px 10px !important;
        margin: 15px 0 10px 0 !important;
        width: 100% !important;
        background: #27ae60 !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3) !important;
        position: relative !important;
        z-index: 999 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        touch-action: manipulation !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }
    
    #confirm-location:active {
        background: #219150 !important;
        transform: translateY(1px);
    }
    
    #amap-picker {
        width: 100%;
        margin-bottom: 20px;
    }
    
    #amap-picker select {
        font-size: 14px;
        padding: 8px;
        margin-bottom: 8px;
        width: 100%;
        box-sizing: border-box;
    }
    
    #selected-location {
        margin: 10px 0 15px 0 !important;
        padding: 10px !important;
        background: #f8f9fa !important;
        border-radius: 6px !important;
        font-size: 14px !important;
        text-align: center !important;
        word-break: break-all !important;
        border: 1px solid #e9ecef !important;
    }
    
    .status {
        font-size: 14px;
        padding: 12px;
        margin: 15px 0;
    }
    
    /* 省市区选择器容器移动端优化 */
    #amap-picker > div:first-child {
        margin-bottom: 15px !important;
        padding: 10px !important;
    }
    
    #amap-picker > div:first-child > div:last-child {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    #amap-picker > div:first-child > div:last-child select {
        flex: none !important;
        width: 100% !important;
        min-width: auto !important;
    }
}

/* 超小屏幕设备优化 */
@media (max-width: 480px) {
    .container {
        padding: 5px;
        padding-top: 10px;
    }
    
    .card {
        padding: 12px;
        border-radius: 8px;
    }
    
    #amap-container {
        height: 220px;
    }
    
    #confirm-location {
        font-size: 15px !important;
        padding: 12px 8px !important;
    }
    
    .status {
        font-size: 13px;
        padding: 10px;
    }
}

#verify-modal-mask {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.55);
    transition: background 0.2s;
}
#verify-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    padding: 36px 24px 28px 24px;
    width: 92vw;
    max-width: 370px;
    min-width: 220px;
    text-align: center;
    animation: modalPopIn 0.25s cubic-bezier(.4,2,.6,1) 1;
}
@keyframes modalPopIn {
    0% { opacity: 0; transform: translate(-50%, -60%) scale(0.95); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
#verify-modal input {
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 10px;
    font-size: 17px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
    box-sizing: border-box;
}
#verify-modal button {
    width: 100%;
    padding: 14px 0;
    font-size: 18px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 2px 8px #409eff22;
    transition: background 0.2s;
}
#verify-modal button:active {
    background: #337ecc;
}
#verify-error {
    color: #e74c3c;
    text-align: center;
    margin-top: 12px;
    display: none;
    font-size: 15px;
}

/* 灰色禁用按钮样式 */
#confirm-location:disabled {
    background: #9e9e9e !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    box-shadow: none !important;
}

#confirm-location:disabled:active {
    background: #9e9e9e !important;
    transform: none !important;
} 