* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #1a1a1a;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #ffd700;
}

.search-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

input, select {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: #fff;
    min-width: 200px;
}

#monstersGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.monster-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    height: 380px;
}

.monster-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px;
    transition: transform 0.2s;
}

.monster-link:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.monster-image {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.monster-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.monster-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
}

.monster-name {
    color: #ffd700;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.monster-category {
    color: #aaa;
    font-size: 0.9em;
}

.monster-location {
    color: #888;
    font-size: 0.85em;
    margin-top: 3px;
}

.monster-card:hover {
    transform: translateY(-5px);
}

.monster-card:hover .monster-image img {
    transform: scale(1.05);
}

/* 移除不需要的模态框相关样式 */
.modal,
.modal-content,
.modal-header,
.modal-images,
.modal-thumbnail,
.fullscreen-image,
.modal-poem,
.modal-description,
.close {
    display: none;
}

/* 新增详情页样式 */
.monster-detail {
    padding: 2rem 0;
}

.detail-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.detail-title {
    color: #ffd700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.detail-meta {
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    font-size: 0.9em;
    color: #888;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-in;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* 新增遮罩层样式 */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 999;
    cursor: zoom-out;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 修改放大效果 */
.gallery-image.zoomed {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1) !important;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1000;
    cursor: zoom-out;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.poem-section,
.description-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.poem-content {
    white-space: pre-wrap;
    line-height: 1.8;
    color: #ccc;
}

.description-content {
    line-height: 1.8;
    color: #ddd;
}

.back-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    color: #ddd;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95em;
}

.back-button:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.monster-meta {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.monster-meta p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    color: #ccc;
}

/* 添加移动端响应式 */
@media (max-width: 768px) {
    .detail-title {
        font-size: 1.8rem;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .back-button {
        width: 100%;
        text-align: center;
    }
}

/* 统一字体 */
.detail-card, .poem-content, .description-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.gallery-image {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

/* 优化弹层样式 */
.zoomed-image {
    top: 50%;
    left: 50%;
    z-index: 1000;
    cursor: zoom-out;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    object-fit: contain;
    transform-origin: center center;
}

/* 添加滚动支持 */
@media (min-width: 768px) {
    .zoomed-image {
        max-width: 90vw;
        max-height: 90vh;
    }
}

.breadcrumb {
    margin: 1rem 0;
    font-size: 0.9em;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 0;
}

.breadcrumb li:not(:last-child):after {
    content: "›";
    margin-left: 0.5rem;
    color: #666;
}

/* 修改导航链接颜色 */
.breadcrumb a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #fff;
}

/* 当前页面显示金色 */
.breadcrumb li:last-child {
    color: #ffd700;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
