* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 50px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #764ba2;
    background-color: #e8eaff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-content h3 {
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    margin-bottom: 20px;
}

.upload-content button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.upload-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.results-section, .error-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #ffe6e6;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    padding: 20px;
    color: #d63031;
    text-align: center;
}

.info-section {
    margin-bottom: 25px;
}

/* 图片预览样式 */
.image-preview {
    text-align: center;
}

.preview-container {
    margin-top: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.preview-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 无预览时的样式 */
.preview-container.no-preview {
    background-color: #f5f5f5;
    border: 2px dashed #ccc;
}

.no-preview-message {
    text-align: center;
    color: #666;
}

.no-preview-message .file-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

.no-preview-message p {
    margin: 5px 0;
    font-size: 1rem;
}

.no-preview-message .file-format {
    color: #999;
    font-size: 0.9rem;
    margin-top: 10px;
}

.info-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.info-section h4 {
    color: #764ba2;
    margin-bottom: 12px;
    margin-top: 15px;
    font-size: 1.1rem;
}

.address-info {
    background: #f0f4ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #764ba2;
}

.formatted-address {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.formatted-address strong {
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.formatted-address span {
    color: #333;
    line-height: 1.5;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-item strong {
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.map-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.map-link {
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.map-link:hover {
    background: #764ba2;
}

.coordinates {
    font-family: 'ConsoLes', 'Consolas', monospace;
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.coord-section {
    margin-bottom: 15px;
}

.coord-section:last-of-type {
    margin-bottom: 10px;
}

.coord-section strong {
    display: block;
    color: #a0aec0;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.coord-item {
    margin-left: 10px;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.coord-hint {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #4a5568;
    font-size: 0.85rem;
    color: #a0aec0;
}

/* 为pre标签添加ConsoLes字体 */
pre {
    font-family: 'ConsoLes', 'Consolas', monospace;
    overflow-x: auto;
    max-width: 100%;
    white-space: pre;
}

footer {
    margin-top: 40px;
}

.info-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    color: white;
    backdrop-filter: blur(10px);
}

.info-box h4 {
    margin-bottom: 15px;
}

.info-box ul {
    list-style: none;
}

.info-box li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.info-box li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        width: 100%;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .map-links {
        flex-direction: column;
    }
    
    .coordinates {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .coord-section {
        margin-bottom: 12px;
    }
    
    .coord-section strong {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .coord-item {
        font-size: 0.9rem;
        margin-left: 8px;
    }
    
    .coord-hint {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    pre {
        font-size: 0.85rem;
    }
    
    .upload-section, .results-section, .error-section {
        padding: 20px 15px;
    }
}