﻿body {
    min-height: 100vh;
    margin: 0;
    padding-top: 70px; /* 为固定导航栏腾出空间 */
    position: relative;
    overflow: auto; /* 修改为允许滚动 */
    background: #f0f2f5;
    padding: 60px 0px 0px 0px;
    display: flex;
    flex-direction: column; /* 让子元素垂直排列 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
}

/* 使导航栏内容居中并设置宽度为 1200 像素 */
.navbar .container-fluid {
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* 主体容器样式 */
.main-content {
    flex-grow: 1; /* 核心：强制占据所有剩余垂直空间 */
    display: flex; /* 登录窗口居中 */
    justify-content: center;
    align-items: center;
}

/* 卡片通用样式 */
.card {
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
}

/* 步骤卡片样式 */
.step-card {
    padding: 25px;
    text-align: center;
}

.step-icon {
    font-size: 36px;
    color: #007bff;
    margin-bottom: 15px;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-description {
    color: #666;
    font-size: 14px;
    height: 50px;
    overflow: hidden;
}

/* 特色功能卡片样式 */
.feature-card {
    padding: 25px;
    display: flex;
    flex-direction: row; /* 确保子元素水平排列 */
    align-items: center; /* 垂直居中对齐 */
    gap: 20px; /* 设置图标和文字区域的间距 */
    width: 100%; /* 确保卡片宽度占满父容器 */
}

.feature-icon {
    font-size: 48px;
    color: #007bff;
    flex: 0 0 auto; /* 固定图标宽度 */
    width: 60px; /* 可根据实际情况调整图标列宽度 */
    text-align: center; /* 图标居中显示 */
    display: flex; /* 确保图标垂直居中 */
    align-items: center;
    justify-content: center;
}

.feature-text {
    display: flex;
    flex-direction: column;
    flex: 1; /* 文字区域占据剩余空间 */
    min-width: 0; /* 防止内容溢出导致换行 */
}

.feature-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.feature-description {
    color: #666;
    font-size: 16px;
}

/* 纪念馆卡片样式 */
.memorial-card {
    padding: 0;
    overflow: hidden;
}

.memorial-card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 0px;
}

.memorial-name {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 10px;
    padding: 0 5px;
    height: 30px;
    overflow: hidden;
    text-align: center;
    color: #333;
}

.memorial-name a {
    text-decoration: none; /* 去除下划线 */
    color: #333;
}

.memorial-name a:hover {
    text-decoration: none; /* 鼠标悬停也无下划线 */
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 5px 8px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.edit-btn {
    background-color: #28a745;
    color: white;
    text-decoration: none;
}

.view-btn {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    text-decoration: none;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    color: #007bff;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 4px;
}

.pagination a.active {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/* 导航栏样式 */
.navbar {
    background-color: #f8f9fa;
    color: #333;
}

.navbar .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-collapse {
    justify-content: flex-end;
}

.login-box {
    max-width: 300px;
    width: 100%;
}

.login-form {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.user-info-box {
    background-color: #fff;
    /*border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);*/
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    max-width: 350px;
    width: 100%;
}

.user-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    background-image: url('default_avatar.png'); /* 默认头像 */
    background-size: cover;
    background-position: center;
}

.user-avatar:hover {
    transform: translateY(-10px);
}

.user-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.sidebar-menu {
    list-style-type: none;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.sidebar-menu li a i {
    margin-right: 10px;
}

/* 注册登录相关 */
.rlogin-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 400px;
}

.rlogin-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-label {
    margin-bottom: 0.2rem;
}

.form-control {
    margin-bottom: 1rem;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.9em;
    margin-top: 0.25rem;
}

/*纪念堂编辑*/
.full-width-textarea {
    width: 100%;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.style-option {
    margin-bottom: 15px;
}

.style-option label {
    display: block;
    text-align: center;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-option input[type="radio"] {
    display: none;
}

.style-option input[type="radio"]:checked + label {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/*留言相关*/
.message-card {
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 100%;
    text-decoration: none;
}

.message-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.message-card .header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.message-card .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.message-card .user {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    text-decoration: none;
}

.message-card .user a {
    text-decoration: none; /* 去除下划线 */
    color: #333;
}

.message-card .time {
    font-size: 0.9em;
    color: #777;
    margin-left: auto;
}

.message-card .content {
    line-height: 1.6;
    color: #555;
}

/*用户信息页面*/
/* 统计卡片样式 */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1rem;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.15s ease-in-out;
    background-color: #fff;
}

.stat-card:hover {
    transform: scale(1.02);
}

.stat-icon {
    font-size: 1.75rem;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #0d6efd;
}

/* .bi-building { background-color: #0dcaf020; color: #0dcaf0; }
.bi-eye { background-color: #ffc10720; color: #ffc107; }
.bi-heart { background-color: #dc354520; color: #dc3545; }
.bi-chat { background-color: #28a74520; color: #28a745; }
.bi-exclamation-triangle { background-color: #ff6b6b20; color: #ff6b6b; }*/

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 表单区域样式 */
.form-section {
    margin-top: 2rem;
    padding: 2rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cropper-container {
    max-width: 400px;
    max-height: 400px;
    margin: 20px auto;
    display: none;
    border: 1px solid #ddd;
    padding: 10px;
    overflow: auto;
    box-sizing: border-box;
    min-width: 350px;
    min-height: 350px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cropper-container img {
    max-width: 100%;
    max-height: 100%;
}

/*个人信息调用结束*/
.btn-group {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.section-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 30px 0;
}

/* 新增卡片悬停动画 */
.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-control {
        max-width: 100%;
    }
}

/* 优化底部版权区域颜色为淡灰色 */
footer {
    color: #333;
    padding: 5px;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: auto; /* 推到页面底部 */
    background-color: #f8f9fa;
}

/* 底部版权区域内容居中 */
footer .container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .user-info-box {
        display: none;
    }
}    