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

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    overflow: hidden;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* 搜索容器 */
.search-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    min-width: 350px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#search-btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#search-btn:hover {
    background: #0056b3;
}

.search-options {
    display: flex;
    gap: 10px;
}

.search-options button {
    padding: 8px 15px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.search-options button:hover {
    background: #545b62;
}

/* 地图容器 */
#map-container {
    width: 100%;
    height: 100%;
}

/* 结果面板 */
.results-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 350px;
    max-height: 70vh;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #007bff;
    color: white;
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
}

#close-panel {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-content {
    max-height: calc(70vh - 60px);
    overflow-y: auto;
    padding: 15px;
}

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

.result-item:hover {
    background-color: #f8f9fa;
}

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

.result-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.result-address {
    color: #666;
    font-size: 12px;
    margin-bottom: 3px;
}

.result-type {
    color: #007bff;
    font-size: 11px;
}

/* 路线规划面板 */
.route-panel {
    position: absolute;
    top: 150px;
    left: 20px;
    width: 350px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* 缓存管理面板 */
.cache-panel {
    position: absolute;
    top: 150px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.cache-stats {
    margin-bottom: 20px;
}

.cache-stats h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.cache-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.cache-info span {
    font-weight: bold;
    color: #007bff;
}

.cache-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.cache-action-btn {
    padding: 10px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.cache-action-btn:hover {
    background: #545b62;
}

.cache-action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cache-progress {
    margin-top: 15px;
}

.cache-progress p {
    margin: 5px 0;
    font-size: 13px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f1f1f1;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
}

.route-inputs {
    margin-bottom: 15px;
}

.route-inputs input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

#plan-route-btn {
    width: 100%;
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#plan-route-btn:hover {
    background: #218838;
}

.route-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.route-info strong {
    color: #333;
}

/* 加载指示器 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

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

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

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-container {
        left: 10px;
        right: 10px;
        min-width: auto;
        width: calc(100% - 20px);
    }

    .results-panel {
        right: 10px;
        width: calc(100% - 20px);
        max-width: 350px;
    }

    .route-panel {
        left: 10px;
        width: calc(100% - 20px);
        max-width: 350px;
    }
}