:root {
    --primary-color: #005375;
    --secondary-color: #4ECDC4;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--dark-color);
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px;
    box-shadow: var(--box-shadow);
    z-index: 10;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

.header .subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
}

/* 地图容器 */
.map-container {
    flex: 1;
    background: #f5f5f5;
    position: relative;
}

.map-container #map {
    width: 100%;
    height: 100%;
}

/* 信息面板样式 */
.info-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 85vh;
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.info-panel.hidden {
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.close-btn {
    position: sticky;
    top: 0;
    align-self: flex-end;
    width: 40px;
    height: 40px;
    border: none;
    background: #f0f0f0;
    color: var(--dark-color);
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin: 5px 5px 0 0;
    flex-shrink: 0;
}

.close-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.info-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.info-content h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
    word-break: break-word;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item {
    background: var(--light-color);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.info-item p {
    font-size: 13px;
    color: var(--dark-color);
    line-height: 1.5;
    word-break: break-word;
}

#info-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    background: #f9f9f9;
    border-radius: 4px;
    overflow: hidden;
}

#info-image {
    width: 100%;
    height: auto;
}

#info-image-placeholder {
    font-size: 13px;
    color: #999;
    text-align: center;
    padding: 10px;
}

/* 底部样式 */
.footer {
    background: var(--light-color);
    padding: 15px 20px;
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
    border-top: 1px solid #bdc3c7;
}

.footer-btn {
    padding: 4px 12px;
    margin: 0 5px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.footer-btn:hover {
    background: rgb(0, 83, 117);
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 22px;
    }

    .header .subtitle {
        font-size: 12px;
    }

    .info-panel {
        position: fixed;
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
        z-index: 2000;
    }

    .info-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .info-content {
        padding: 15px;
    }

    .info-content h2 {
        font-size: 18px;
    }
}

.footer-btn {
    background: none;
    border: none;
    color: #0066cc;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.footer-btn:hover {
    opacity: 0.7;
}

/* 图层切换控件 */
.layer-control {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 100;
}

.layer-control label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--dark-color);
    cursor: pointer;
}

.layer-control label:last-child {
    margin-bottom: 0;
}

.layer-control input[type="radio"],
.layer-control input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.layer-control input[type="checkbox"] {
    margin-left: 20px;
}

@media (max-width: 768px) {
    .layer-control {
        top: 10px;
        right: 10px;
        padding: 8px;
    }
    
    .layer-control label {
        font-size: 12px;
        margin-bottom: 6px;
    }
}

/* 自定义滚动条 */
.info-panel::-webkit-scrollbar {
    width: 6px;
}

.info-panel::-webkit-scrollbar-track {
    background: transparent;
}

.info-panel::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

.info-panel::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
