/* 菌种详情弹窗样式 */
.species-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.species-modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 25px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 45%;
    max-width: 550px;
    position: relative;
    animation: modalopen 0.4s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.species-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.species-modal-title {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.species-close {
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.species-close:hover,
.species-close:focus {
    color: #000;
}

.species-modal-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.species-image-container {
    text-align: center;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.species-image {
    width: 350px;
    height: 350px;
    max-height: 350px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.species-image:hover {
    transform: scale(1.02);
}

.species-description {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
    padding: 0 5px;
}

.species-link {
    color: white !important;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s;
}

.species-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 菌种列表容器样式 */
.species-list-container {
    display: block;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: nowrap;
    text-align: center;
    margin: 0 auto;
}

/* 在大屏幕上确保不换行 */
@media screen and (min-width: 992px) {
    .species-list-container {
        white-space: nowrap;
    }
}

/* 在中等屏幕上允许换行 */
@media screen and (max-width: 991px) {
    .species-list-container {
        white-space: normal;
    }
}

/* 响应式设计 */
@media screen and (max-width: 1200px) {
    .species-modal-content {
        width: 50%;
        max-width: 500px;
    }
}

@media screen and (max-width: 992px) {
    .species-modal-content {
        width: 55%;
        max-width: 450px;
    }
}

@media screen and (max-width: 768px) {
    .species-modal-content {
        width: 65%;
        max-width: 400px;
        padding: 20px;
    }
    
    .species-modal-title {
        font-size: 22px;
    }
    
    .species-image {
        width: 280px;
        height: 280px;
    }
    
    .species-description {
        font-size: 15px;
    }
}

@media screen and (max-width: 576px) {
    .species-modal-content {
        width: 85%;
        max-width: 350px;
        padding: 15px;
    }
    
    .species-modal-title {
        font-size: 20px;
    }
    
    .species-image {
        width: 250px;
        height: 250px;
    }
    
    .species-description {
        font-size: 14px;
    }
}

@media screen and (max-width: 400px) {
    .species-modal-content {
        width: 90%;
        padding: 12px;
    }
    
    .species-modal-title {
        font-size: 18px;
    }
    
    .species-image {
        width: 200px;
        height: 200px;
    }
    
    .species-description {
        font-size: 13px;
    }
}