/* 京剧脸谱大全样式 */

/* 脸谱分类和搜索 */
.masks-filter {
    margin-bottom: 30px;
}

.filter-section {
    margin-bottom: 20px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.category-btn {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover {
    background-color: #e0e0e0;
}

.category-btn.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-box button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-box button:hover {
    background-color: #45a049;
}

/* 脸谱展示区 */
.masks-gallery {
    margin-bottom: 30px;
}

.masks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.mask-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.mask-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mask-image {
    height: 200px;
    overflow: hidden;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mask-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mask-info {
    padding: 15px;
}

.mask-name {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.mask-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tag.color {
    background-color: #e3f2fd;
    color: #1976d2;
}

.tag.character {
    background-color: #f1f8e9;
    color: #689f38;
}

.load-more {
    text-align: center;
    margin-top: 20px;
}

.load-more button {
    padding: 10px 20px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more button:hover {
    background-color: #e0e0e0;
}

/* 脸谱详情弹窗 */
.mask-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 80%;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.mask-detail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.mask-image-large {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mask-image-large img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.mask-info {
    flex: 2;
    min-width: 300px;
}

.mask-info h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.mask-description,
.mask-symbolism,
.mask-colors,
.mask-patterns,
.mask-famous-plays {
    margin-bottom: 20px;
}

.mask-description h3,
.mask-symbolism h3,
.mask-colors h3,
.mask-patterns h3,
.mask-famous-plays h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.mask-description p,
.mask-symbolism p,
.mask-colors p,
.mask-patterns p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.mask-famous-plays ul {
    margin: 0;
    padding-left: 20px;
    color: #555;
    line-height: 1.6;
}

.mask-famous-plays li {
    margin-bottom: 5px;
}

/* 脸谱知识 */
.masks-knowledge {
    margin-bottom: 30px;
}

.knowledge-content {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.knowledge-section {
    margin-bottom: 25px;
}

.knowledge-section:last-child {
    margin-bottom: 0;
}

.knowledge-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.knowledge-section p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.color-meanings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-box {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.color-box.red { background-color: #e53935; }
.color-box.black { background-color: #212121; }
.color-box.blue { background-color: #1565c0; }
.color-box.yellow { background-color: #fdd835; }
.color-box.white { background-color: #f5f5f5; border: 1px solid #ddd; }
.color-box.gold { background-color: #ffc107; }
.color-box.silver { background-color: #bdbdbd; }
.color-box.green { background-color: #43a047; }
.color-box.purple { background-color: #8e24aa; }

.color-meaning h5 {
    margin: 0 0 5px 0;
    color: #333;
}

.color-meaning p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.pattern-meanings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.pattern-item {
    background-color: #fff;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pattern-item h5 {
    margin: 0 0 10px 0;
    color: #333;
}

.pattern-item p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .masks-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .mask-detail-content {
        flex-direction: column;
    }
    
    .mask-image-large {
        max-width: 100%;
    }
    
    .color-meanings,
    .pattern-meanings {
        grid-template-columns: 1fr;
    }
}