/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-x: hidden;
}

/* 应用容器 */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 页眉 */
header {
    text-align: center;
    margin-bottom: 0;
    padding: 8px 0;
    height: auto;
    min-height: 50px;
}

header h1 {
    font-size: 20px;
    color: #333;
}

.subtitle {
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

/* 主要内容区域 */
main {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: 600px;
    height: calc(100% - 80px);
    position: relative;
    width: 100%;
    align-items: stretch;
}

/* 侧边栏 */
.sidebar, #events-list {
    width: 300px;
    min-width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 100%;
    background-color: #fff;
    border-right: 1px solid #e5e7eb;
    transition: transform 0.3s ease, width 0.3s ease;
    position: relative;
    z-index: 10;
}

/* 折叠侧边栏 */
.sidebar.collapsed, #events-list.collapsed {
    transform: translateX(-100%);
    width: 0;
    min-width: 0;
    overflow: visible;
    visibility: hidden;
}

/* 侧边栏切换按钮 */
.sidebar-toggle {
    position: absolute;
    top: 45px;
    left: 300px;
    width: 30px;
    height: 60px;
    background-color: #fff;
    border-radius: 0 4px 4px 0;
    border: 1px solid #e5e7eb;
    border-left: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
    /* transition: all 0.3s ease-in-out; */
}

.sidebar-toggle:hover {
    background-color: #f3f4f6;
}

.sidebar-toggle i {
    font-size: 18px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

/* 折叠状态 */
#events-list.collapsed {
    transform: translateX(-100%);
    width: 0;
    min-width: 0;
    overflow: visible;
}

#events-list.collapsed ~ #sidebar-toggle {
    left: 0;
}

#events-list.collapsed ~ #sidebar-toggle i {
    transform: rotate(180deg);
}

/* 地图容器 */
.map-container, #map-container {
    flex: 1;
    position: relative;
    height: 100%;
    min-height: 500px;
    width: 100%;
    overflow: hidden;
    transition: width 0.3s ease, margin-left 0.3s ease;
}

#map {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px;
    z-index: 5;
}

/* 确保Leaflet地图正确显示 */
.leaflet-container {
    height: 100% !important;
    width: 100% !important;
    background-color: #dce7f0 !important;
}

.dark .leaflet-container {
    background-color: #1a2234 !important;
}

/* 侧边栏折叠时的地图容器样式 */
#events-list.collapsed ~ .map-container,
#events-list.collapsed ~ #map-container {
    width: 100% !important;
    margin-left: 0 !important;
}

/* 侧边栏展开时的地图容器样式 */
#events-list:not(.collapsed):not(.show-mobile):not(.-translate-x-full) ~ .map-container,
#events-list:not(.collapsed):not(.show-mobile):not(.-translate-x-full) ~ #map-container {
    width: calc(100% - 300px) !important;
    margin-left: 0px !important;
}

/* 地图控件 */
.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-btn {
    width: 36px;
    height: 36px;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.control-btn i {
    font-size: 20px;
    color: #64748b;
}

.control-btn:hover {
    background-color: #f8fafc;
}

.control-btn.active {
    background-color: #3b82f6;
    border-color: #2563eb;
}

.control-btn.active i {
    color: white;
}

/* 右侧控件容器 */
.map-control-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 10px;
    padding: 5px;
    color: #666;
    font-size: 14px;
}

/* 加载指示器 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-indicator.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 错误容器 */
.error-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.error-container.hidden {
    display: none;
}

.error-box {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.error-box h3 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.error-box .btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 15px;
    cursor: pointer;
}

/* 地图弹窗样式 */
.map-popup {
    max-width: 250px;
}

.map-popup h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.map-popup p {
    margin: 5px 0;
    font-size: 13px;
}

/* 事件弹窗样式 */
.event-popup {
    max-width: 320px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    padding: 5px;
}

.event-popup h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.event-popup p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

.event-popup strong {
    color: #444;
}

/* 迁徙弹窗样式 */
.migration-popup {
    max-width: 350px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    padding: 5px;
}

.migration-popup h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.migration-popup p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.4;
}

.migration-popup strong {
    color: #444;
}

/* 地图加载器 */
.map-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 500;
}

.loader-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.loader-text {
    font-size: 14px;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 1000px) {
    main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .map {
        height: 500px;
    }
}

/* 国家标签样式 */
.country-label {
    background-color: transparent !important;
    border: none !important;
    pointer-events: none;
    z-index: 500;
}

.country-name {
    font-size: 11px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff,
                 2px 2px 2px #fff, -2px -2px 2px #fff, 2px -2px 2px #fff, -2px 2px 2px #fff;
    white-space: nowrap;
    text-align: center;
    background-color: transparent;
    padding: 0;
    pointer-events: none;
    letter-spacing: 0.5px;
}

/* 地图区域悬停效果 */
.leaflet-interactive:hover {
    cursor: pointer;
}

/* 介绍页面样式 */
.intro-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.intro-header {
    background-color: #3b82f6;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.intro-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.intro-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

.intro-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #3b82f6;
}

.intro-content p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.intro-content ul {
    margin-bottom: 1rem;
    padding-left: 20px;
}

.intro-content li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.intro-footer {
    padding: 15px 20px;
    background-color: #f3f4f6;
    display: flex;
    justify-content: space-between;
}

.intro-nav-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.intro-nav-button:hover {
    background-color: #2563eb;
}

.intro-nav-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.intro-dot-nav {
    display: flex;
    gap: 5px;
    margin-top: 15px;
    justify-content: center;
}

.intro-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d1d5db;
    cursor: pointer;
}

.intro-dot.active {
    background-color: #3b82f6;
}

/* 增强帮助按钮 */
#help-button {
    background-color: #3498db;
    color: white;
}

#help-button:hover {
    background-color: #2980b9;
}

/* 自定义图标样式 */
.custom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.icon-inner:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.icon-inner .material-icons-round {
    font-size: 18px;
}

/* 类别颜色 */
.custom-icon.技术 .icon-inner { background-color: #3b82f6; }
.custom-icon.文明 .icon-inner { background-color: #8b5cf6; }
.custom-icon.帝国 .icon-inner { background-color: #8b5cf6; }
.custom-icon.战争 .icon-inner { background-color: #ef4444; }
.custom-icon.迁徙 .icon-inner { background-color: #7c3aed; }
.custom-icon.疾病 .icon-inner { background-color: #f59e0b; }
.custom-icon.农业 .icon-inner { background-color: #10b981; }
.custom-icon.物种 .icon-inner { background-color: #10b981; }

/* 自定义工具提示 */
.custom-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-tooltip:before {
    border-top-color: rgba(0, 0, 0, 0.8);
}

/* 按钮微交互效果 */
.category-btn, .btn, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-btn:hover, .btn:hover, button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.category-btn:active, .btn:active, button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 添加水波纹效果 */
.btn:after, .category-btn:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.8s;
}

.btn:active:after, .category-btn:active:after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* 图标动效 */
.icon-inner i {
    transition: all 0.3s ease;
}

.icon-inner:hover i {
    transform: scale(1.2);
}

/* 活跃按钮效果 */
.category-btn.active {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    color: rgb(37, 99, 235);
    font-weight: 500;
}

/* 滑块微交互 */
input[type="range"] {
    transition: all 0.2s ease;
}

input[type="range"]:hover {
    transform: scaleY(1.2);
}

input[type="range"]:active {
    cursor: grabbing;
}

/* 弹出窗口样式 */
.custom-popup {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    border: none;
    box-shadow: 0 3px 14px rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
    max-width: 300px;
    padding: 0;
    overflow: hidden;
}

.custom-popup .leaflet-popup-content-wrapper {
    background: transparent;
    border-radius: 4px;
    padding: 0;
    box-shadow: none;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    width: 100% !important;
}

.custom-popup .leaflet-popup-tip {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 14px rgba(0,0,0,0.15);
}

.dark .custom-popup {
    background-color: rgba(30, 41, 59, 0.95);
}

.dark .custom-popup .leaflet-popup-tip {
    background-color: rgba(30, 41, 59, 0.95);
}

.popup-header {
    padding: 8px 12px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.popup-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    font-size: 16px;
    line-height: 1;
}

.popup-close:hover {
    color: #ef4444;
}

.popup-content {
    padding: 12px;
}

.popup-content p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #334155;
}

.popup-footer {
    padding: 8px 12px;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

.popup-footer button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

.popup-footer button:hover {
    background-color: #2563eb;
}

.dark .popup-header {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
}

.dark .popup-title {
    color: #f8fafc;
}

.dark .popup-close {
    color: #94a3b8;
}

.dark .popup-close:hover {
    color: #ef4444;
}

.dark .popup-content p {
    color: #cbd5e1;
}

.dark .popup-footer {
    background-color: #1e293b;
    border-top: 1px solid #334155;
}

/* 脉冲效果样式 */
.pulse-marker {
    pointer-events: none;
    z-index: 1000;
}

.pulse-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.2);
    border: 2px solid rgba(59, 130, 246, 0.5);
    animation: pulse 2s infinite;
    transform-origin: center;
}

.dark .pulse-circle {
    background-color: rgba(96, 165, 250, 0.2);
    border: 2px solid rgba(96, 165, 250, 0.5);
}

@keyframes pulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}

/* 高亮样式 */
.map-marker.highlighted {
    z-index: 1000 !important;
    transform: scale(1.2) !important;
}

.map-marker.highlighted .marker-icon {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8) !important;
    border: 2px solid #fff !important;
}

.dark .map-marker.highlighted .marker-icon {
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.8) !important;
    border: 2px solid #1e293b !important;
}

/* 标记标签样式 */
.marker-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    padding: 3px 6px;
    margin-top: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    pointer-events: none;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-marker:hover .marker-label {
    opacity: 1;
}

.dark .marker-label {
    background-color: rgba(30, 41, 59, 0.9);
    color: #f1f5f9;
    border-color: rgba(51, 65, 85, 0.8);
}

/* 改进标记图标样式 */
.marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    transition: all 0.3s;
    color: #1e293b;
}

/* 修复弹窗消失问题 */
.leaflet-popup {
    pointer-events: auto !important;
}

.leaflet-popup-content-wrapper {
    pointer-events: auto !important;
}

.leaflet-popup-content {
    pointer-events: auto !important;
}

.event-popup {
    pointer-events: auto !important;
}

/* 基础样式 */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #6366f1;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}

/* 事件列表样式 */
.events-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 事件类别标题 */
.category-header {
    margin-top: 15px;
    margin-bottom: 8px;
    padding: 0 10px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
}

.dark .category-title {
    color: #f1f5f9;
    border-bottom-color: #334155;
}

.category-count {
    font-size: 12px;
    color: #64748b;
    font-weight: normal;
}

.dark .category-count {
    color: #94a3b8;
}

/* 改进事件卡片样式 */
.event-card {
    background-color: white;
    border-radius: 6px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 8px;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.event-card:hover {
    border-color: #93c5fd;
    transform: translateX(5px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.event-card-inner {
    flex: 1;
}

.event-id-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-id-badge.农业 { background-color: rgba(16, 185, 129, 0.15); color: #059669; }
.event-id-badge.技术 { background-color: rgba(59, 130, 246, 0.15); color: #2563eb; }
.event-id-badge.文明 { background-color: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.event-id-badge.征服 { background-color: rgba(239, 68, 68, 0.15); color: #dc2626; }
.event-id-badge.疾病 { background-color: rgba(245, 158, 11, 0.15); color: #d97706; }
.event-id-badge.迁徙 { background-color: rgba(124, 58, 237, 0.15); color: #6d28d9; }
.event-id-badge.其他 { background-color: rgba(107, 114, 128, 0.15); color: #4b5563; }

.dark .event-id-badge.农业 { background-color: rgba(16, 185, 129, 0.2); color: #34d399; }
.dark .event-id-badge.技术 { background-color: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.dark .event-id-badge.文明 { background-color: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.dark .event-id-badge.征服 { background-color: rgba(239, 68, 68, 0.2); color: #f87171; }
.dark .event-id-badge.疾病 { background-color: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.dark .event-id-badge.迁徙 { background-color: rgba(124, 58, 237, 0.2); color: #8b5cf6; }
.dark .event-id-badge.其他 { background-color: rgba(107, 114, 128, 0.2); color: #9ca3af; }

.event-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark .event-title {
    color: #f1f5f9;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.dark .event-meta {
    color: #94a3b8;
}

.event-date, .event-importance {
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-description {
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
    line-height: 1.4;
}

.dark .event-description {
    color: #cbd5e1;
}

.dark .event-card {
    background-color: #1e293b;
    border-color: #334155;
}

.dark .event-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* 事件标记样式 */
.event-marker {
    transition: all 0.3s;
    z-index: 500 !important;
    transform-origin: center bottom;
}

.event-marker:hover {
    transform: scale(1.1);
    z-index: 600 !important;
}

/* 事件图标样式现代化 */
.event-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    transform: translateY(0);
    position: relative;
    bottom: 0;
}

.dark .event-icon {
    background-color: rgba(30, 41, 59, 0.9);
    border-color: #334155;
}

/* 事件图标颜色 */
.event-marker .event-icon.农业 { color: #10b981; border-color: #d1fae5; }
.event-marker .event-icon.技术 { color: #3b82f6; border-color: #dbeafe; }
.event-marker .event-icon.文明 { color: #8b5cf6; border-color: #ede9fe; }
.event-marker .event-icon.征服 { color: #ef4444; border-color: #fee2e2; }
.event-marker .event-icon.疾病 { color: #f59e0b; border-color: #fef3c7; }
.event-marker .event-icon.迁徙 { color: #7c3aed; border-color: #ede9fe; }

.dark .event-marker .event-icon.农业 { border-color: #065f46; }
.dark .event-marker .event-icon.技术 { border-color: #1e40af; }
.dark .event-marker .event-icon.文明 { border-color: #5b21b6; }
.dark .event-marker .event-icon.征服 { border-color: #b91c1c; }
.dark .event-marker .event-icon.疾病 { border-color: #b45309; }
.dark .event-marker .event-icon.迁徙 { border-color: #5b21b6; }

/* 事件标记名称标签 - 始终显示在图标右侧 */
.event-marker-name {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 5px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
    z-index: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
    transition: all 0.2s;
    /* 文字描边效果 */
    color: #000;
    text-shadow: 
        -1px -1px 0 #fff,  
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 -2px 2px rgba(255, 255, 255, 0.8),
        0 2px 2px rgba(255, 255, 255, 0.8),
        -2px 0 2px rgba(255, 255, 255, 0.8),
        2px 0 2px rgba(255, 255, 255, 0.8);
}

/* 悬停时加强显示 */
.event-marker:hover .event-marker-name {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
    font-weight: 800;
    max-width: 250px;
}

/* 处理地图右侧边缘的事件名称 */
.leaflet-right .event-marker-name {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 5px;
    text-align: right;
}

/* 暗色模式下的事件标记名称 */
.dark .event-marker-name {
    color: #fff;
    text-shadow: 
        -1px -1px 0 #000,  
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 -2px 2px rgba(0, 0, 0, 0.8),
        0 2px 2px rgba(0, 0, 0, 0.8),
        -2px 0 2px rgba(0, 0, 0, 0.8),
        2px 0 2px rgba(0, 0, 0, 0.8);
}

.marker-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.85);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.map-marker:hover .marker-label {
    opacity: 1 !important;
}

/* 类别特定样式 */
.event-marker[data-category="农业"] .marker-icon {
    background-color: #10b981;
}

.event-marker[data-category="技术"] .marker-icon {
    background-color: #3b82f6;
}

.event-marker[data-category="文明"] .marker-icon {
    background-color: #8b5cf6;
}

.event-marker[data-category="战争"] .marker-icon {
    background-color: #ef4444;
}

.event-marker[data-category="疾病"] .marker-icon {
    background-color: #f59e0b;
}

.event-marker[data-category="迁徙"] .marker-icon {
    background-color: #7c3aed;
}

.event-marker[data-category="物种"] .marker-icon {
    background-color: #14b8a6;
}

/* 事件标题标签 - 原版带白色背景 */
.event-title-label {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 8px;
    border-radius: 4px;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    white-space: nowrap;
}

/* 事件标题文本 */
.event-title-text {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* 事件年份 */
.event-title-year {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
}

/* 事件标题描边效果 - 新版无背景，直接文字描边 */
.event-title-text-outline {
    pointer-events: none;
    transform: translateY(-100%);
    white-space: nowrap;
    text-align: center;
    font-weight: bold;
    text-shadow: 
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        0 -2px 2px rgba(255, 255, 255, 0.8),
        0 2px 2px rgba(255, 255, 255, 0.8),
        -2px 0 2px rgba(255, 255, 255, 0.8),
        2px 0 2px rgba(255, 255, 255, 0.8);
}

/* 事件名称描边效果 */
.event-title-text-outline .event-name {
    font-size: 14px;
    color: #000;
}

/* 事件年份描边效果 */
.event-title-text-outline .event-year {
    font-size: 12px;
    color: #444;
    margin-left: 4px;
}

/* 迁徙路径样式 */
.migration-path {
    stroke-dasharray: 5;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    animation: dash 30s linear infinite;
    pointer-events: stroke;
}

.migration-path:hover {
    stroke-width: 4 !important;
    stroke-opacity: 0.9 !important;
}

@keyframes dash {
    to {
        stroke-dashoffset: -200;
    }
}

.migration-arrow {
    z-index: 500;
    pointer-events: none;
}

.migration-arrow i {
    font-size: 14px;
    filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));
}

.dark .migration-arrow i {
    filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.5));
}

.migration-label {
    pointer-events: none;
    z-index: 500;
}

.migration-label-text {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 3px;
    text-align: center;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transform: translateY(-10px);
}

.dark .migration-label-text {
    color: #f8fafc;
    background-color: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.8);
}

/* 地区边界样式 */
.region-boundary {
    fill: transparent;
    stroke: rgba(51, 65, 85, 0.5);
    stroke-width: 1.5;
    stroke-dasharray: none;
    transition: all 0.3s ease;
    pointer-events: all;
    cursor: pointer;
}

.region-boundary:hover {
    fill: rgba(203, 213, 225, 0.15);
    stroke: rgba(51, 65, 85, 0.8);
    stroke-width: 2;
}

.dark .region-boundary {
    stroke: rgba(148, 163, 184, 0.5);
}

.dark .region-boundary:hover {
    fill: rgba(71, 85, 105, 0.15);
    stroke: rgba(203, 213, 225, 0.8);
}

/* 历史区域/国家区域样式 */
.historical-region {
    fill: rgba(203, 213, 225, 0.15);
    stroke: rgba(51, 65, 85, 0.6);
    stroke-width: 1;
    stroke-dasharray: 2,2;
    transition: all 0.3s ease;
    pointer-events: all;
    cursor: pointer;
}

.historical-region:hover {
    fill: rgba(203, 213, 225, 0.25);
    stroke: rgba(51, 65, 85, 0.9);
    stroke-width: 1.5;
}

.dark .historical-region {
    fill: rgba(71, 85, 105, 0.15);
    stroke: rgba(148, 163, 184, 0.6);
}

.dark .historical-region:hover {
    fill: rgba(71, 85, 105, 0.3);
    stroke: rgba(203, 213, 225, 0.9);
}

/* 国家/势力标签样式 */
.region-label {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 0 2px white, 0 0 2px white, 0 0 2px white, 0 0 2px white;
    letter-spacing: 0.5px;
}

.dark .region-label {
    color: #cbd5e1;
    text-shadow: 0 0 2px #1e293b, 0 0 2px #1e293b, 0 0 2px #1e293b, 0 0 2px #1e293b;
}

/* 时间点标记样式 */
.time-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.dark .time-marker {
    border-color: #1e293b;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

/* 文明标记样式 */
.civilization-marker {
    display: flex;
    justify-content: center;
    align-items: center;
}

.civ-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(124, 58, 237, 0.8);
    color: white;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.civ-icon i {
    font-size: 20px;
}

.civ-icon:hover {
    transform: scale(1.1);
    background-color: rgba(139, 92, 246, 0.9);
}

.dark .civ-icon {
    background-color: rgba(139, 92, 246, 0.7);
}

.dark .civ-icon:hover {
    background-color: rgba(167, 139, 250, 0.9);
}

/* 弹窗统一样式 */
.civilization-popup {
    padding: 0;
    max-width: 300px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.popup-title {
    font-size: 16px;
    font-weight: bold;
    color: #1e293b;
    margin: 0 0 8px 0;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.popup-time {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.popup-time::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2364748b"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z"/></svg>');
    background-size: contain;
    margin-right: 5px;
}

.popup-region {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.popup-region::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2364748b"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg>');
    background-size: contain;
    margin-right: 5px;
}

.popup-description {
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
    margin-bottom: 12px;
}

.popup-details {
    font-size: 12px;
    color: #475569;
    margin-bottom: 12px;
    padding: 8px;
    background-color: #f8fafc;
    border-radius: 4px;
}

.popup-details p {
    margin: 4px 0;
}

.popup-impact {
    font-size: 12px;
    color: #475569;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

/* 适配暗黑模式 */
body.dark .popup-title {
    color: #f1f5f9;
}

body.dark .popup-time,
body.dark .popup-region {
    color: #94a3b8;
}

body.dark .popup-description {
    color: #cbd5e1;
}

body.dark .popup-details {
    background-color: #1e293b;
    color: #cbd5e1;
}

body.dark .popup-impact {
    color: #cbd5e1;
    border-top-color: #334155;
}

/* 临时元素过渡效果 */
.temp-element {
    animation: fadeIn 0.3s ease-in-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 时间轴容器，确保与地图对齐 */
.timeline-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-top: 1px solid #e2e8f0;
    padding: 5px 0 15px 0;
    margin-bottom: 5px;
    z-index: 1000;
}

/* 响应式布局基础样式 */
@media (max-width: 768px) {
    .app-container {
        padding: 5px;
    }

    header h1 {
        font-size: 18px;
    }

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

/* 移动设备下的侧边栏切换按钮样式 */
@media (max-width: 768px) {
    .sidebar-toggle {
        top: 60px;
        left: 0;
        z-index: 1010;
    }
    
    #events-list.show-mobile ~ #sidebar-toggle {
        left: 85%;
    }
    
    #events-list.show-mobile ~ #sidebar-toggle i {
        transform: rotate(180deg);
    }
    
    #mobile-toggle {
        display: block;
    }
}

/* 平板设备下的侧边栏切换按钮 */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar-toggle {
        top: 60px;
        left: 0;
        z-index: 1010;
    }
    
    #events-list.show-mobile ~ #sidebar-toggle {
        left: 85%;
        max-left: 350px;
    }
}

/* 时间轴响应式样式 */
@media (max-width: 768px) {
    .timeline-container {
        padding: 8px 4px;
    }

    .current-year-display {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .timeline-slider-container {
        height: 40px;
    }

    #year-slider {
        margin: 0 10px;
    }
}

/* 移动设备下的地图容器样式 */
@media (max-width: 1024px) {
    #events-list ~ .map-container,
    #events-list ~ #map-container {
        width: 100% !important;
        margin-left: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    #map-container, #map {
        height: calc(100vh - 165px) !important;
        width: 100% !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        overflow: hidden !important;
    }
    
    .leaflet-container {
        height: 100% !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
    }
    
    /* 确保地图尺寸始终正确 */
    #map, .leaflet-map-pane {
        width: 100% !important;
        height: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
    }
}

/* 桌面样式覆盖 */
@media (min-width: 769px) {
    #events-list {
        transform: translateX(0) !important;
    }
    
    #mobile-toggle {
        display: none !important;
    }
}

/* 事件卡片响应式样式 */
@media (max-width: 480px) {
    .event-card {
        padding: 8px;
    }

    .event-title {
        font-size: 13px;
    }

    .event-meta {
        font-size: 11px;
    }

    .event-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
}

/* 弹窗响应式样式 */
@media (max-width: 768px) {
    .custom-popup {
        max-width: 250px;
    }

    .popup-title {
        font-size: 14px;
    }

    .popup-content p {
        font-size: 12px;
    }
}

/* 类别过滤器响应式样式 */
@media (max-width: 768px) {
    .category-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .category-btn i {
        font-size: 16px;
    }
}

/* 暗色模式响应式调整 */
@media (max-width: 768px) {
    .dark #events-list {
        background-color: #1e293b;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .dark #mobile-toggle {
        background-color: #1e293b;
        color: #f1f5f9;
    }
}

/* 修改响应式断点，让平板使用和移动端相同的样式 */
@media (max-width: 1024px) {
    #events-list {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 85% !important;
        max-width: 350px !important;
        z-index: 1000 !important;
        transform: translateX(-100%) !important;
    }
    
    #events-list.show-mobile {
        transform: translateX(0) !important;
    }
    
    #map-container {
        width: 100% !important;
        height: calc(100vh - 120px) !important;
    }
    
    .timeline-container {
        height: auto !important;
        padding: 5px !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
    
    /* 确保过滤器可滚动不换行 */
    .category-filters {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 5px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .category-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }
    
    #mobile-toggle {
        display: block !important;
        z-index: 1500 !important;
    }
    
    /* 在小屏幕下始终隐藏sidebar-toggle */
    .sidebar-toggle {
        display: none !important;
    }
    
    /* 确保events-list在show-mobile状态下有正确的动画和交互 */
    #events-list.show-mobile {
        transform: translateX(0) !important;
        visibility: visible !important;
        width: 85% !important;
        min-width: 250px !important;
        max-width: 350px !important;
    }
}

/* 强制设置地图容器尺寸 */
#map-container, #map {
    min-height: 400px !important;
    width: 100% !important;
    position: relative !important;
}

/* 不同屏幕尺寸的地图高度调整 */
@media (max-width: 1024px) {
    #map-container, #map {
        height: calc(100vh - 165px) !important;
    }
    
    /* 确保Leaflet容器在移动端和平板正确显示 */
    .leaflet-container {
        height: 100% !important;
        width: 100% !important;
    }
    
    /* 时间轴样式 */
    .timeline-container {
        position: fixed !important;
        z-index: 1000 !important;
        width: 100% !important;
    }
}

/* 桌面样式覆盖 */
@media (min-width: 1025px) {
    #events-list {
        transform: translateX(0) !important;
    }
    
    #mobile-toggle {
        display: none !important;
    }
    
    #map-container, #map {
        height: calc(100vh - 165px) !important;
    }
    
    /* 确保桌面端时间轴宽度匹配地图 */
    .timeline-container {
        width: calc(100% - 300px) !important;
        margin-left: 300px !important;
    }
    
    /* 桌面端sidebar-toggle位置 */
    .sidebar-toggle {
        left: 300px;
    }
    
    #events-list.collapsed ~ .sidebar-toggle {
        left: 0;
    }
}

/* 全屏模式样式 */
body.fullscreen .timeline-container,
.fullscreen .timeline-container,
body:fullscreen .timeline-container,
body:-webkit-full-screen .timeline-container,
body:-ms-fullscreen .timeline-container {
    width: 100% !important;
    margin-left: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* 针对移动端/平板调整时间轴位置 */
@media (max-width: 1024px) {
    #map-container, #map {
        height: calc(100vh - 165px) !important;
    }
    
    /* 时间轴位置始终在底部 */
    .timeline-container {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
}

/* 考虑浏览器导航栏的全屏模式 */
@media (display-mode: fullscreen) {
    #map-container, #map {
        height: calc(100vh - 165px) !important;
    }
    
    .timeline-container {
        bottom: env(safe-area-inset-bottom, 5px) !important;
    }
}

/* 侧边栏响应式样式 */
@media (max-width: 768px) {
    #events-list {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 350px;
        z-index: 1000;
        background-color: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    #events-list.collapsed {
        transform: translateX(-100%);
    }
}

@media (min-width: 769px) {
    #mobile-toggle {
        display: none;
    }
}

/* 移动和平板设备通用样式 - 1024px以下 */
@media (max-width: 1024px) {
    /* 在小屏幕和平板下始终隐藏sidebar-toggle */
    .sidebar-toggle {
        display: none !important;
    }
    
    /* 确保mobile-toggle按钮在小屏幕和平板下可见 */
    #mobile-toggle {
        display: block !important;
        z-index: 1500 !important;
    }
    
    /* 确保events-list在show-mobile状态下有正确的动画和交互 */
    #events-list.show-mobile {
        transform: translateX(0) !important;
        visibility: visible !important;
        width: 85% !important;
        min-width: 250px !important;
        max-width: 350px !important;
    }
}

/* 确保地图渲染完整的关键样式 */
#map-container, #map, .leaflet-container, .leaflet-map-pane {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 强制地图容器和地图元素的布局样式 */
#map-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 145px);
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: transparent;
}

/* 确保Leaflet地图图块正确填充 */
.leaflet-tile-container {
    width: 100%;
    height: 100%;
}

.leaflet-container {
    background-color: transparent !important;
}

/* 消除灰色区域 */
.leaflet-container .leaflet-tile-pane {
    width: 100%;
    height: 100%;
}

/* 修复移动端视图 */
@media (max-width: 1024px) {
    #map-container {
        width: 100% !important;
        height: calc(100vh - 145px) !important;
        margin-left: 0 !important;
    }
    
    #map {
        width: 100% !important;
        height: 100% !important;
    }
} 