/* ===== Academic-specific styles for simplified layout ===== */

/* ===== About Section Enhanced Styles ===== */
.research-focus {
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.research-interests {
    border-right: 4px solid var(--primary-color);
    position: relative;
}

.research-interests li::before {
    content: "▸ ";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* ===== Research Section Enhanced Styles ===== */
.research-description {
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
    position: relative;
}

.research-description::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.research-description h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.research-description p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

[data-theme="dark"] .research-description p {
    color: var(--text-dark);
}

.research-description ul {
    margin-left: 1.5rem;
    line-height: 1.8;
}

.research-description li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

[data-theme="dark"] .research-description li {
    color: var(--text-dark);
}

/* ===== Publication Card Enhanced Styles ===== */
.publication-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.publication-card:hover::before {
    transform: scaleY(1);
}

.publication-layout {
    position: relative;
}

.publication-layout::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.publication-card:hover .publication-layout::after {
    opacity: 1;
}

.publication-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .publication-header {
    border-bottom-color: var(--border-color);
}

.publication-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.publication-title:hover {
    color: var(--accent-color);
}

.publication-meta {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.publication-abstract {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

[data-theme="dark"] .publication-abstract {
    border-top-color: var(--border-color);
}

.abstract-toggle {
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.abstract-toggle:hover {
    color: var(--accent-color) !important;
}

.abstract-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.abstract-content.show {
    max-height: 500px;
}

/* ===== Model Image Enhanced Styles ===== */
.model-image-container {
    position: relative;
    background: white;
    border: 2px solid transparent;
    /* 禁用所有过渡效果 */
    transition: none;
    overflow: hidden;
}

[data-theme="dark"] .model-image-container {
    background: var(--card-bg);
}

.model-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    /* 禁用伪元素过渡效果 */
    transition: none;
    z-index: 1;
}

.model-image-container:hover::before {
    /* 禁用渐变覆盖层动画 */
    left: -100%;
}

.model-image-container:hover {
    /* 禁用所有悬停效果 */
    border-color: transparent;
    box-shadow: none;
    transform: none;
    transition: none;
}

.model-image {
    position: relative;
    z-index: 2;
    /* 禁用图片过渡效果 */
    transition: none;
}

.model-image-container:hover .model-image {
    /* 禁用图片缩放和亮度变化 */
    transform: none;
    filter: none;
    transition: none;
}

.model-caption {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    /* 禁用标题过渡效果 */
    transition: none;
}

.model-image-container:hover .model-caption {
    /* 禁用标题颜色变化 */
    color: var(--text-muted);
    transition: none;
}

.model-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.model-image-container:hover .model-overlay {
    /* 完全隐藏覆盖层，不显示"Click to enlarge"提示 */
    opacity: 0;
    pointer-events: none;
}

.model-overlay i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    /* 禁用脉冲动画 */
    animation: none;
}

.model-overlay span {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.model-placeholder {
    position: relative;
    min-height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 2px dashed rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

[data-theme="dark"] .model-placeholder {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: rgba(102, 126, 234, 0.5);
}

.model-placeholder:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.model-placeholder i {
    color: var(--primary-color);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.model-placeholder:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* ===== Publication Info Enhanced Styles ===== */
.publication-info {
    position: relative;
    z-index: 2;
}

.publication-model {
    position: relative;
    z-index: 2;
}

/* ===== Lightbox Enhanced Styles ===== */
.lightbox-content {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    position: relative;
}

[data-theme="dark"] .lightbox-content {
    background: var(--card-bg);
    color: var(--text-dark);
}

.lightbox-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.lightbox-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-bottom: 2px solid var(--gradient-primary);
}

[data-theme="dark"] .lightbox-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.lightbox-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.lightbox-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--gradient-primary);
    color: white !important;
    transform: rotate(90deg);
}

.lightbox-body {
    background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .lightbox-body {
    background: rgba(45, 55, 72, 0.3);
}

.lightbox-image {
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-primary) border-box;
    transition: all 0.3s ease;
}

[data-theme="dark"] .lightbox-image {
    background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
                var(--gradient-primary) border-box;
}

.lightbox-image:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.lightbox-footer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .lightbox-footer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-top-color: rgba(102, 126, 234, 0.4);
}

/* ===== Responsive Enhancements for Publication Layout ===== */
@media (max-width: 992px) {
    .publication-layout {
        flex-direction: column;
    }

    .publication-info {
        border-right: none !important;
        border-bottom: 2px solid var(--gradient-primary);
        padding-bottom: 2rem;
        margin-bottom: 0;
    }

    [data-theme="dark"] .publication-info {
        border-bottom-color: var(--border-color);
    }

    .publication-model {
        border-left: none !important;
        border-top: 2px solid var(--gradient-primary);
        padding-top: 2rem;
        margin-top: 0;
    }

    [data-theme="dark"] .publication-model {
        border-top-color: var(--border-color);
    }
}

@media (max-width: 768px) {
    .publication-info {
        padding: 1.5rem;
    }

    .publication-model {
        padding: 1rem;
    }

    .model-image {
        max-height: 200px;
    }

    .lightbox-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }

    .lightbox-header {
        padding: 1rem;
    }

    .lightbox-body {
        padding: 1rem;
    }

    .lightbox-footer {
        padding: 1rem;
    }

    .lightbox-title {
        font-size: 1.1rem;
    }

    .model-overlay i {
        font-size: 2rem;
    }

    .model-overlay span {
        font-size: 0.9rem;
    }
}

/* ===== Keyword Tags ===== */
.keyword-tag-sm {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(0, 123, 255, 0.2);
    display: inline-block;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

.keyword-tag-sm:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* ===== Gallery Enhanced Styles ===== */
.gallery-grid {
    display: grid;
    /* 优化4张图片的布局：在桌面端使用2×2网格，在移动端自适应 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1.5rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* 当屏幕宽度允许时，确保4张图片形成2×2的正方形网格 */
@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px; /* 限制宽度，避免图片过大 */
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    /* 统一宽高比：16:9 */
    aspect-ratio: 16 / 9;
    height: 100%;
    background: var(--card-bg, white);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: 1;
    transition: all 0.3s ease;
}

.gallery-item:hover::before {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 防止拉伸，保持宽高比，居中裁剪 */
    object-position: center;
    transition: all 0.3s ease;
    z-index: 2;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

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

.gallery-overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay-content {
    transform: translateY(0);
}

.gallery-placeholder {
    position: relative;
    z-index: 2;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-placeholder {
    color: var(--primary-color);
    transform: scale(1.05);
}

.gallery-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-placeholder i {
    transform: scale(1.1);
}

.gallery-placeholder p {
    margin: 0;
    font-weight: 500;
    font-size: 1rem;
}

/* ===== Contact Enhanced Styles ===== */
.contact-content {
    position: relative;
    overflow: hidden;
}

.contact-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.contact-item {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

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

.contact-item i {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-item:hover i {
    color: var(--accent-color);
    transform: scale(1.1);
}

.social-link-large {
    color: var(--primary-color);
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.social-link-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.1);
    transition: left 0.3s ease;
}

.social-link-large:hover::before {
    left: 0;
}

.social-link-large:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

.social-link-large i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.social-link-large:hover i {
    transform: scale(1.1);
}

.social-link-large span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.3s ease;
}

[data-theme="dark"] .social-link-large span {
    color: var(--text-dark);
}

.social-link-large:hover span {
    color: var(--accent-color);
}

/* ===== Search Filter Enhanced Styles - Removed ===== */

/* ===== Section Title Enhanced Styles ===== */
.section-title {
    position: relative;
    margin-bottom: 4rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* ===== Publication Links Enhanced Styles - DISABLED TO PREVENT JITTER ===== */
.publication-links .btn {
    position: relative;
    overflow: hidden;
    transition: none !important;
    animation: none !important;
    transform: none !important;
    border-radius: 20px;
}

/* 完全禁用所有伪元素动画 */
.publication-links .btn::before {
    display: none !important;
}

.publication-links .btn:hover::before {
    display: none !important;
}

.publication-links .btn:hover {
    /* 完全静态 - 不允许任何变化 */
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* ===== Dark Mode Enhanced Styles ===== */
[data-theme="dark"] .research-focus,
[data-theme="dark"] .research-interests,
[data-theme="dark"] .research-description {
    background: var(--card-bg);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .publication-card {
    background: var(--card-bg);
    color: var(--text-dark);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .gallery-item {
    background: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .contact-content {
    background: var(--card-bg);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .search-filter {
    background: var(--card-bg);
    color: var(--text-dark);
}

/* ===== Enhanced Gallery Modal Styles ===== */
.gallery-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--card-bg, white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gallery-modal-overlay.show .gallery-modal-content {
    transform: scale(1);
}

.gallery-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.gallery-modal-close:hover {
    background: rgba(220, 53, 69, 0.8);
    transform: scale(1.1);
}

.gallery-modal-body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-modal-image {
    max-width: 80vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-modal-caption {
    padding: 1.5rem;
    text-align: center;
    background: var(--bg-light, #f8f9fa);
    width: 100%;
    margin-top: 1rem;
}

[data-theme="dark"] .gallery-modal-caption {
    background: var(--bg-dark, #2d3748);
}

.gallery-modal-caption h5 {
    margin: 0;
    color: var(--text-light, #333);
    font-weight: 600;
}

.gallery-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg, white);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: var(--bg-light, #f8f9fa);
    border-radius: 8px;
    color: var(--text-muted, #666);
}

[data-theme="dark"] .gallery-error {
    background: var(--bg-dark, #2d3748);
}

/* ===== Enhanced WeChat QR Code Modal Styles ===== */
.wechat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wechat-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.wechat-modal-content {
    background: var(--card-bg, white);
    border-radius: 20px;
    max-width: 380px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.wechat-modal-content.show {
    transform: scale(1) translateY(0);
}

.wechat-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #07c160 0%, #00d4aa 50%, #07c160 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Header Styles */
.wechat-modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg,
        rgba(7, 193, 96, 0.05) 0%,
        rgba(0, 212, 170, 0.05) 100%);
    border-bottom: 1px solid rgba(7, 193, 96, 0.1);
}

[data-theme="dark"] .wechat-modal-header {
    background: linear-gradient(135deg,
        rgba(7, 193, 96, 0.1) 0%,
        rgba(0, 212, 170, 0.1) 100%);
    border-bottom-color: rgba(7, 193, 96, 0.2);
}

.wechat-modal-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #07c160 0%, #00d4aa 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 25px rgba(7, 193, 96, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.wechat-modal-icon i {
    font-size: 1.8rem;
    color: white;
}

.wechat-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light, #333);
    margin: 0;
    background: linear-gradient(135deg, #07c160 0%, #00d4aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wechat-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    color: var(--text-muted, #666);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .wechat-modal-close {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dark, #999);
}

.wechat-modal-close:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: rotate(90deg);
}

/* Body Styles */
.wechat-modal-body {
    padding: 1.5rem 2rem;
}

.qr-code-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.qr-code-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 10px 30px rgba(7, 193, 96, 0.2),
        0 0 0 2px rgba(7, 193, 96, 0.1);
    background: white;
}

.qr-code-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-code-image.loaded {
    opacity: 1;
}

.qr-code-image.error {
    display: none;
}

.qr-code-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #07c160;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-code-fallback.show {
    display: flex;
    opacity: 1;
}

.qr-code-fallback i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.qr-code-fallback p {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.qr-code-fallback small {
    font-size: 0.8rem;
    opacity: 0.7;
}

.qr-code-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .qr-code-loading {
    background: rgba(0, 0, 0, 0.7);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(7, 193, 96, 0.2);
    border-top: 3px solid #07c160;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* WeChat Info Styles */
.wechat-info {
    text-align: center;
}

.wechat-id-section {
    margin-bottom: 1rem;
}

.wechat-id-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light, #333);
    margin-bottom: 0.75rem;
}

.wechat-id-label i {
    color: #07c160;
    font-size: 1.1rem;
}

.wechat-id-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(7, 193, 96, 0.05);
    border: 1px solid rgba(7, 193, 96, 0.2);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .wechat-id-container {
    background: rgba(7, 193, 96, 0.1);
    border-color: rgba(7, 193, 96, 0.3);
}

.wechat-id-container:hover {
    background: rgba(7, 193, 96, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.2);
}

.wechat-id {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #07c160;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.copy-btn {
    background: rgba(7, 193, 96, 0.1);
    border: 1px solid rgba(7, 193, 96, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    color: #07c160;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #07c160;
    color: white;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.wechat-description {
    font-size: 0.9rem;
    color: var(--text-muted, #666);
    line-height: 1.5;
    margin: 0;
}

/* Footer Styles */
.wechat-modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.wechat-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.wechat-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.wechat-btn:hover::before {
    left: 100%;
}

.wechat-btn-primary {
    background: linear-gradient(135deg, #07c160 0%, #00d4aa 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.3);
}

.wechat-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4);
}

.wechat-btn-secondary {
    background: var(--bg-light, #f8f9fa);
    color: var(--text-light, #333);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .wechat-btn-secondary {
    background: var(--bg-dark, #2d3748);
    color: var(--text-dark, #f8f9fa);
    border-color: rgba(255, 255, 255, 0.1);
}

.wechat-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 480px) {
    .wechat-modal-content {
        width: 95%;
        margin: 1rem;
    }

    .wechat-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .wechat-modal-body {
        padding: 1rem 1.5rem;
    }

    .wechat-modal-footer {
        padding: 1rem 1.5rem 1.5rem;
        flex-direction: column;
    }

    .wechat-btn {
        width: 100%;
    }

    .qr-code-container {
        width: 180px;
        height: 180px;
    }

    .wechat-modal-icon {
        width: 50px;
        height: 50px;
    }

    .wechat-modal-icon i {
        font-size: 1.5rem;
    }

    .wechat-modal-title {
        font-size: 1.3rem;
    }
}

/* ===== Gallery Responsive Design ===== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        /* 平板端优化：确保4张图片能形成2×2网格或单列 */
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        padding: 0.5rem 0;
    }

    .gallery-item {
        aspect-ratio: 4 / 3; /* 平板端更适合4:3比例 */
        max-height: 200px; /* 限制最大高度 */
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }

    .gallery-item {
        aspect-ratio: 16 / 9;
        max-height: 240px;
    }

    .gallery-overlay-content {
        padding: 1rem;
    }

    .gallery-overlay-content i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .gallery-overlay-content p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
}

/* ===== Responsive Enhancements ===== */
@media (max-width: 768px) {
    .publication-title {
        font-size: 1.1rem;
    }

    .research-description {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .social-links-large {
        flex-direction: column;
        gap: 1rem;
    }

    /* Filter button styles removed */
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .section-title::after {
        width: 60px;
        height: 3px;
    }

    .publication-card {
        padding: 1.5rem;
    }

    .contact-item i {
        font-size: 2rem;
    }

    .social-link-large i {
        font-size: 2rem;
    }
}

/* ===== Citation Badge Styles ===== */
.citation-link {
    border-radius: 25px !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
    animation: none !important;
    transform: none !important;
    padding: 0.375rem 1rem !important;
    border-color: #28a745 !important;
    color: #28a745 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

[data-theme="dark"] .citation-link {
    border-color: #34d058 !important;
    color: #34d058 !important;
}

.citation-link:hover {
    background-color: #28a745 !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

[data-theme="dark"] .citation-link:hover {
    background-color: #34d058 !important;
    box-shadow: 0 4px 12px rgba(52, 208, 88, 0.4) !important;
}

.citation-link.disabled {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.citation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.citation-badge i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.citation-count {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.citation-label {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Animation for citation count change */
@keyframes countUp {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        color: #ffc107;
    }
    100% {
        transform: scale(1);
    }
}

.citation-count.updating {
    animation: countUp 0.5s ease;
}

/* Tooltip for citation badge */
.citation-link::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.citation-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* Responsive adjustments for citation badge */
@media (max-width: 768px) {
    .citation-link {
        padding: 0.3rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    
    .citation-badge {
        gap: 0.25rem;
        font-size: 0.75rem;
    }
    
    .citation-count {
        font-size: 0.8rem;
    }
    
    .citation-label {
        font-size: 0.7rem;
    }
}