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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* 首页大图背景区域 */
.hero-section {
    position: relative;
    min-height: 60vh;
    background: url('/static/images/bg.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
}

.hero-header {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

/* 标题行 - 3D框和文字并排 */
.hero-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

/* 首页圆形3D展示框 */
.hero-3d-logo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
    flex-shrink: 0;
}

.hero-3d-logo iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.hero-3d-logo canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

.hero-3d-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    border-radius: 50%;
    z-index: 1;
}

.hero-header h1 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

.hero-header p {
    font-size: 1.3rem;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

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

.main-content {
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

/* 警告横幅样式调整 */
.hero-content .warning-banner {
    max-width: 800px;
    margin: 30px auto 0;
    background: rgba(255, 107, 107, 0.95);
    backdrop-filter: blur(10px);
}

.warning-banner {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.95), rgba(238, 90, 90, 0.95));
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(238, 90, 90, 0.3);
    backdrop-filter: blur(10px);
}

.warning-banner::before {
    content: '⚠️ ';
}

/* 搜索区域样式 */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}



.search-box {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-select {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.mushroom-grid {
    display: grid;
    /* 一页6个蘑菇：桌面端3列2行 */
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.mushroom-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.mushroom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.mushroom-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mushroom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model3d-container {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
    /* GPU加速，防止滚动后iframe被浏览器回收 */
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    contain: layout paint;
}

.model3d-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    /* GPU加速 */
    transform: translateZ(0);
    will-change: transform;
}

.model3d-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.model3d-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #888;
}

.model3d-placeholder-content .loading-text {
    font-size: 0.8rem;
}

.load-model-hint {
    font-size: 0.75rem;
    color: #667eea;
    margin-top: 2px;
}

.model3d-retry-area {
    cursor: pointer;
    padding: 20px;
    border-radius: 8px;
    transition: background 0.3s;
}

.model3d-retry-area:hover {
    background: rgba(102, 126, 234, 0.1);
}

.model3d-loading {
    cursor: pointer;
}

.load-model-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.load-model-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.model3d-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

.model3d-placeholder .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.model3d-placeholder .text {
    font-size: 14px;
    opacity: 0.9;
}

.mushroom-info {
    padding: 20px;
}

.mushroom-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.mushroom-scientific {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-bottom: 12px;
}

.mushroom-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tag {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag-edible {
    background: #d4edda;
    color: #155724;
}

.tag-poisonous {
    background: #f8d7da;
    color: #721c24;
}

.tag-caution {
    background: #fff3cd;
    color: #856404;
}

.tag-medicinal {
    background: #d1ecf1;
    color: #0c5460;
}

.tag-region {
    background: #e7f3ff;
    color: #004085;
}

.mushroom-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-count {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-count span:first-child {
    flex: 1;
}

.view-3d-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
}

.view-3d-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.view-count strong {
    color: #667eea;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 1040px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.modal-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

/* 详情页样式 */
.detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.detail-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.info-section {
    margin-bottom: 25px;
}

.info-section h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.info-section p {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.info-item h4 {
    color: #667eea;
    font-size: 0.85rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item p {
    color: #333;
    font-size: 0.95rem;
}

.toxicity-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.toxicity-safe {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.toxicity-caution {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.toxicity-danger {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.toxicity-icon {
    font-size: 1.8rem;
}

.toxicity-text h4 {
    margin-bottom: 5px;
    color: #333;
}

.toxicity-text p {
    color: #666;
    font-size: 0.9rem;
}

.model-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.model-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.share-btn {
    background: linear-gradient(135deg, #07c160 0%, #059e4c 100%) !important;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.share-btn:hover {
    box-shadow: 0 5px 15px rgba(7, 193, 96, 0.4) !important;
}

/* 详情页按钮组 */
.detail-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-actions .model-link {
    font-size: 15px;
    padding: 10px 20px;
}

.btn-alignment {
    background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%) !important;
    border: none;
    cursor: pointer;
}

.btn-gallery {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%) !important;
    border: none;
    cursor: pointer;
}

/* 分享弹窗 */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-modal.active {
    display: flex;
    opacity: 1;
}

.share-modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-modal.active .share-modal-content {
    transform: scale(1);
}

.share-modal-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.share-modal-content > p {
    color: #07c160;
    margin-bottom: 20px;
    font-weight: 500;
}

.share-link {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.share-link input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
}

.share-link button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.share-tips {
    background: #f0f9f4;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.share-tips p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.close-share-btn {
    padding: 12px 30px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.close-share-btn:hover {
    background: #e0e0e0;
}

.model3d-detail {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 15px;
}

.model3d-detail iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 详情页4:3比例3D模型容器 */
.detail-model3d-square {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 15px;
    position: relative;
}

.detail-model3d-square iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 3D模型遮罩层 - 防止滚动时误触 */
.model3d-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.model3d-overlay:hover {
    background: rgba(0, 0, 0, 0.3);
}

.model3d-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.model3d-overlay-icon {
    font-size: 48px;
    animation: pulse 2s infinite;
}

.model3d-overlay-text {
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* 未知类型标签 */
.tag-unknown {
    background: #e9ecef;
    color: #495057;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
}

.page-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.page-info {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* 底部访问统计 */
.footer-stats {
    text-align: center;
    padding: 30px 20px 15px;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
    border-top: 1px solid #e0e0e0;
}

.footer-stats span {
    margin: 0 10px;
}

.footer-stats strong {
    color: #667eea;
    font-weight: 600;
}

.stats-divider {
    color: #ccc;
}

/* 页脚版权信息 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 25px 20px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.9;
}

/* 平板端：2列布局 */
@media (max-width: 1200px) {
    .mushroom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机端：单列布局 */
@media (max-width: 768px) {
    /* 手机端：3D框居中靠上，标题在下方 */
    .hero-title-row {
        flex-direction: column;
        gap: 15px;
    }

    .hero-3d-logo {
        width: 140px;
        height: 140px;
        order: -1; /* 让3D框在标题上方 */
    }

    .hero-header h1 {
        font-size: 2rem;
    }

    .hero-header p {
        font-size: 1rem;
    }

    .hero-section {
        min-height: 50vh;
    }

    .mushroom-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .search-input, .filter-select {
        width: 100%;
    }

    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h2 {
        font-size: 1.15rem;
    }

    .modal-body {
        padding: 16px 20px;
    }

    .detail-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }

    .detail-actions .model-link {
        font-size: 13px;
        padding: 8px 10px;
        border-radius: 20px;
        justify-content: center;
        width: 100%;
    }
}

/* ============ 数字展品编号 ============ */

.mushroom-exhibit {
    font-size: 0.75rem;
    color: #888;
    margin-top: 6px;
}

.detail-exhibit-number {
    font-size: 1rem;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f0f3ff;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

/* ============ 图片浏览按钮 ============ */

.view-image-btn {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 6px;
}

.view-image-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.detail-image-gallery-btn {
    text-align: center;
    margin-bottom: 20px;
}

.image-gallery-btn {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.image-gallery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* ============ 图片浏览弹窗 ============ */

.image-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2500;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-gallery-modal.active {
    display: flex;
    opacity: 1;
}

.image-gallery-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-gallery-modal.active .image-gallery-content {
    transform: scale(1);
}

.image-gallery-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.image-gallery-header h3 {
    color: #333;
    font-size: 1.2rem;
    margin: 0;
}

.image-gallery-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    line-height: 1;
}

.image-gallery-close:hover {
    color: #333;
}

.image-gallery-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.image-gallery-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.image-gallery-loading p {
    margin-top: 15px;
    font-size: 1rem;
}

.image-gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.image-gallery-empty p {
    margin-top: 15px;
    font-size: 1rem;
}

.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.image-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
}

.image-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.image-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-gallery-item:hover .image-gallery-overlay {
    opacity: 1;
}

.image-gallery-overlay span {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.image-gallery-count {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* ============ 全图查看弹窗 ============ */

.image-full-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2600;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-full-modal.active {
    display: flex;
    opacity: 1;
}

.image-full-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-full-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    font-size: 36px;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.image-full-close:hover {
    color: #ff9a56;
}

.image-full-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-full-nav {
    margin-top: 15px;
    color: white;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 手机端图片浏览适配 */
@media (max-width: 768px) {
    .image-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .image-gallery-content {
        max-height: 95vh;
        border-radius: 10px;
    }

    .image-gallery-header {
        padding: 15px 20px;
    }

    .image-gallery-body {
        padding: 15px;
    }

    .image-full-img {
        max-width: 95vw;
        max-height: 80vh;
    }
}

/* ============ 分子鉴定按钮 ============ */

.view-alignment-btn {
    background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%);
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 6px;
}

.view-alignment-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(42, 157, 143, 0.4);
}

/* ============ 分子鉴定弹窗 ============ */

.alignment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2700;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.alignment-modal.active {
    display: flex;
    opacity: 1;
}

.alignment-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.alignment-modal.active .alignment-content {
    transform: scale(1);
}

.alignment-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.alignment-header h3 {
    color: #333;
    font-size: 1.2rem;
    margin: 0;
}

.alignment-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    line-height: 1;
}

.alignment-close:hover {
    color: #333;
}

.alignment-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.alignment-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.alignment-loading p {
    margin-top: 15px;
    font-size: 1rem;
}

.alignment-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.alignment-empty p {
    margin-top: 15px;
    font-size: 1rem;
}

.alignment-info {
    background: #f0f9f7;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #2a9d8f;
}

.alignment-info p {
    margin: 4px 0;
    color: #264653;
    font-size: 0.95rem;
}

.alignment-table-wrapper {
    overflow-x: auto;
    margin-bottom: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.alignment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.alignment-table thead {
    background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%);
    color: white;
}

.alignment-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.alignment-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.alignment-table tbody tr.even {
    background: #fafafa;
}

.alignment-table tbody tr.odd {
    background: white;
}

.alignment-table tbody tr:hover {
    background: #e8f5f2;
}

.alignment-detail-section {
    margin-top: 10px;
}

.alignment-detail-section h4 {
    color: #264653;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.alignment-detail-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 12px;
    border-left: 4px solid #2a9d8f;
}

.detail-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.detail-index {
    background: #2a9d8f;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.detail-species {
    font-weight: 600;
    color: #264653;
    font-size: 1rem;
}

.detail-accession {
    color: #888;
    font-size: 0.85rem;
    font-family: monospace;
}

.detail-card-body p {
    margin: 6px 0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.detail-card-body p strong {
    color: #264653;
}

/* 手机端分子鉴定弹窗适配 */
@media (max-width: 768px) {
    .alignment-content {
        max-height: 95vh;
        border-radius: 10px;
    }

    .alignment-header {
        padding: 15px 20px;
    }

    .alignment-body {
        padding: 15px;
    }

    .alignment-table {
        font-size: 0.8rem;
    }

    .alignment-table th,
    .alignment-table td {
        padding: 8px 10px;
    }

    .detail-card-header {
        gap: 8px;
    }

    .detail-card-body p {
        font-size: 0.85rem;
    }
}
