/* 古朴风格样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "SimSun", "宋体", serif;
    background-color: #f5f2e9;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: #8b4513;
    color: #f5f2e9;
    padding: 1rem 0;
    border-bottom: 3px solid #654321;
}

header h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #f5f2e9;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #a0522d;
}

/* 主要内容区域 */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border: 1px solid #d2b48c;
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #8b4513;
    border-bottom: 1px solid #d2b48c;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-item {
    background-color: #fff;
    border: 1px solid #d2b48c;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s;
}

.grid-item:hover {
    transform: translateY(-5px);
}

.grid-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.grid-item-content {
    padding: 1rem;
}

.grid-item h3 {
    color: #8b4513;
    margin-bottom: 0.5rem;
}

.grid-item p {
    color: #666;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background-color: #8b4513;
    color: #fff;
    padding: 8px 15px;
    border-radius: 3px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #a0522d;
}

.btn-secondary {
    background-color: #d2b48c;
    color: #333;
}

.btn-secondary:hover {
    background-color: #c19a6b;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d2b48c;
    border-radius: 3px;
    font-size: 1rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a, .pagination span {
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #d2b48c;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background-color: #d2b48c;
}

.pagination .current {
    background-color: #8b4513;
    color: #fff;
}

/* 评论样式 */
.comments {
    margin-top: 2rem;
}

.comment {
    border-bottom: 1px solid #d2b48c;
    padding: 1rem 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: bold;
    color: #8b4513;
}

.comment-date {
    color: #666;
    font-size: 0.9rem;
}

/* 后台表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th, .table td {
    padding: 0.75rem;
    border: 1px solid #d2b48c;
    text-align: left;
}

.table th {
    background-color: #8b4513;
    color: #fff;
}

.table tr:nth-child(even) {
    background-color: #f9f5f0;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 5px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #d2b48c;
    padding-bottom: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #8b4513;
}

/* 页脚样式 */
footer {
    background-color: #8b4513;
    color: #f5f2e9;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 5px 0;
    }
}

/* 图片美化样式 */
.detail-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    margin: 1rem 0;
    border: 3px solid #d2b48c;
    transition: all 0.3s ease;
}

.detail-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

/* 图片容器 */
.image-container {
    position: relative;
    margin: 1.5rem 0;
    text-align: center;
}

.image-container img {
    max-height: 400px;
    object-fit: cover;
    width: 100%;
}

/* 图片相框效果 */
.image-frame {
    padding: 10px;
    background: #f9f5f0;
    border: 1px solid #d2b48c;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-frame img {
    border-radius: 8px;
}

/* 响应式图片 */
.responsive-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 图片画廊样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* 图片说明文字 */
.image-caption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    padding: 0 1rem;
}

/* 详情页内容样式 */
.detail-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
}

.detail-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

/* 特色标签 */
.feature-tag {
    display: inline-block;
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0.5rem 0.5rem 0.5rem 0;
    box-shadow: 0 2px 5px rgba(139, 69, 19, 0.3);
}

/* 信息卡片 */
.info-card {
    background: #f9f5f0;
    border: 1px solid #d2b48c;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-card h3 {
    color: #8b4513;
    border-bottom: 2px solid #d2b48c;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* 评分样式 */
.rating {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.stars {
    color: #ffd700;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.rating-text {
    color: #666;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .image-container img {
        max-height: 300px;
    }

    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .gallery-item img {
        height: 120px;
    }

    .detail-content {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .image-container img {
        max-height: 250px;
    }

    .image-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-item img {
        height: 100px;
    }
}

.manager-container {
    padding: 0;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8dfd3;
}

.page-header h1 {
    color: #8b4513;
    margin: 0;
}

.search-add-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    min-width: 300px;
}

.search-form input {
    flex: 1;
}

.edit-form {
    max-width: 800px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e8dfd3;
}

.current-image {
    margin: 1rem 0;
    padding: 1rem;
    background: #f9f5f0;
    border-radius: 4px;
}

.current-image p {
    margin: 0 0 0.5rem 0;
    font-weight: bold;
    color: #666;
}

.table-responsive {
    overflow-x: auto;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

@media (max-width: 768px) {
    .search-add-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        min-width: auto;
    }

    .form-actions {
        flex-direction: column;
    }
}