/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 搜索区域 */
.search-section {
    margin-bottom: 25px;
}

.search-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#address-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

#address-input:focus {
    outline: none;
    border-color: #3498db;
}

.button-group {
    display: flex;
    gap: 10px;
}

button {
    padding: 12px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

#clear-btn {
    background: #e74c3c;
}

#clear-btn:hover {
    background: #c0392b;
}

#my-location {
    background: #2ecc71;
}

#my-location:hover {
    background: #27ae60;
}

/* 搜索建议 */
.suggestions {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: calc(100% - 50px);
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* 搜索历史 */
.search-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.search-history h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: #3498db;
    color: white;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
    margin-bottom: 30px;
}

/* 地图区域 */
.map-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: relative;
}

#map-container {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
}

.map-controls {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.map-controls button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 4px;
}

.map-info {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* 位置列表 */
.location-list {
    max-height: 300px;
    overflow-y: auto;
}

.location-item {
    padding: 15px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid #3498db;
}

.location-item:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.location-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.location-coord {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.location-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

/* 信息框 */
.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* 位置表单 */
.location-form {
    margin-top: 20px;
}

.location-form input,
.location-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.location-form textarea {
    height: 100px;
    resize: vertical;
}

/* 快速链接 */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-links button {
    padding: 10px;
    font-size: 14px;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    color: #666;
    font-size: 14px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.loading:after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .button-group {
        width: 100%;
    }
    
    button {
        flex: 1;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    #map-container {
        height: 400px;
    }
}