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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #0d0d0d;
    color: #ffffff;
    line-height: 1.6;
}

/* 顶部区域样式 */
.header {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}

.header-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    width: 100%;
}

.header-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
    letter-spacing: 0.2rem;
}

/* 历史事件展示区域样式 */
.events-section {
    padding: 0;
    background-color: #0d0d0d;
}

.events-container {
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.event-item {
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: none;
    margin: 2rem auto;
    max-width: 90%;
}

.event-item:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.event-image-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    padding: 0;
    margin: 0;
}

.event-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: none;
    display: block;
}

.event-image-text {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    max-width: 60%;
    font-size: 1.1rem;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: normal;
}

.event-image-text h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff3b30;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    white-space: normal;
}

.event-image-text p {
    margin: 0;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
}

.event-detail {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.event-detail h4 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff3b30;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ff3b30;
    padding-bottom: 0.5rem;
}

.event-detail p {
    font-size: 1.1rem;
    color: #cccccc;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.event-detail p:last-child {
    margin-bottom: 0;
}

/* 底部区域样式 */
.footer {
    background-color: #1a1a1a;
    padding: 3rem 0;
    border-top: 2px solid #333333;
}

/* 默哀区域样式 */
.mourn-section {
    max-width: 1200px;
    margin: 0 auto 3rem;
    text-align: center;
}

.mourn-section h2 {
    font-size: 2rem;
    color: #ff3b30;
    margin-bottom: 1.5rem;
}

.mourn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mourn-btn {
    background-color: #ff3b30;
    color: #ffffff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.mourn-btn:hover {
    background-color: #e0332a;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 59, 48, 0.5);
}

.mourn-btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mourn-count {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: bold;
}

#mournCount {
    color: #ff3b30;
    font-size: 2rem;
    margin: 0 0.5rem;
}

/* 留言板区域样式 */
.messages-section {
    max-width: 1200px;
    margin: 0 auto;
}

.messages-section h2 {
    font-size: 2rem;
    color: #ff3b30;
    margin-bottom: 1.5rem;
    text-align: center;
}

.messages-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 留言表单样式 */
.message-form {
    background-color: #2a2a2a;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-name, .message-text {
    padding: 0.8rem;
    border: 1px solid #444444;
    border-radius: 4px;
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
}

.message-name:focus, .message-text:focus {
    outline: none;
    border-color: #ff3b30;
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.2);
}

.message-text {
    resize: vertical;
    min-height: 120px;
}

.message-submit {
    background-color: #ff3b30;
    color: #ffffff;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.message-submit:hover {
    background-color: #e0332a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

/* 留言列表样式 */
.messages-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.message-item {
    background-color: #2a2a2a;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.message-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.message-author {
    font-weight: bold;
    color: #ff3b30;
    font-size: 1.1rem;
}

.message-time {
    font-size: 0.9rem;
    color: #888888;
}

.message-body {
    color: #cccccc;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .events-container {
        padding: 0 1rem;
    }
    
    .event-image-text {
        font-size: 1rem;
        max-width: 90%;
        padding: 0.8rem 1.2rem;
    }
    
    .event-image-text h3 {
        font-size: 1.3rem;
    }
    
    .event-detail {
        padding: 1.5rem;
    }
    
    .event-detail h4 {
        font-size: 1.5rem;
    }
    
    .event-detail p {
        font-size: 1rem;
    }
    
    .mourn-content {
        padding: 0 1rem;
    }
    
    .messages-content {
        padding: 0 1rem;
    }
    
    .messages-list {
        grid-template-columns: 1fr;
    }
    
    .message-form {
        padding: 1.5rem;
    }
    
    .message-submit {
        align-self: stretch;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .event-image-text {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
        top: 1rem;
        left: 1rem;
    }
    
    .event-image-text h3 {
        font-size: 1.1rem;
    }
    
    .event-image {
        max-height: 200px;
    }
    
    .mourn-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    #mournCount {
        font-size: 1.5rem;
    }
}