body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Microsoft YaHei", sans-serif;
}

#app {
    display: flex;
    height: 100vh;
}

#sidebar {
    width: 300px;
    background-color: #f4f4f4;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

#map-container {
    flex: 1;
    position: relative;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#site-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

#site-list li {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.3s;
}

#site-list li:hover {
    background-color: #e9e9e9;
}

#site-list li h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

#site-list li p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* Admin Styles */
.admin-container {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.admin-list {
    margin-top: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

table th {
    background-color: #f8f9fa;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover {
    color: #333;
}

/* Rich Text Content Styles */
.rich-content img {
    max-width: 100%;
    height: auto;
}

.rich-content {
    line-height: 1.6;
    word-wrap: break-word;
}

/* Timeline Styles */
#timeline-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 95%;
    max-width: 1600px;
}

.timeline-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#year-slider {
    width: 100%;
    cursor: pointer;
}

#current-year-display {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.timeline-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background-image: url('../时间轴图标.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translate(-50%, -50%);
    top: 50%;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto; /* 必须设置为 auto 以响应鼠标悬停和点击 */
    z-index: 1002;
}

.timeline-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.marker-tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    display: none;
    pointer-events: none;
    z-index: 1001;
}

.timeline-marker:hover .marker-tooltip {
    display: block;
}
