/* SysArmor 自定义样式 - 现代化设计 */

/* 使用默认宽度，保持原始布局 */

/* Hero 区域大图背景效果（参考 AlphaFold 风格） */
.hero:first-of-type {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
}

.hero:first-of-type .hero-body {
    padding: 2.5rem 1.5rem;
}

.hero:first-of-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%);
    background-size: 100% 100%;
    animation: gradientShift 15s ease infinite;
}

.hero:first-of-type::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, transparent 1px, transparent 40px, rgba(255, 255, 255, 0.03) 41px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, transparent 1px, transparent 40px, rgba(255, 255, 255, 0.03) 41px);
    pointer-events: none;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.hero:first-of-type .container {
    position: relative;
    z-index: 1;
}

.hero:first-of-type .title,
.hero:first-of-type .publication-authors,
.hero:first-of-type .button {
    position: relative;
    z-index: 1;
}

/* 优化首页标题在彩色背景上的显示 */
.hero:first-of-type .publication-title {
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    color: white !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    background: none !important;
    -webkit-text-fill-color: white !important;
}

.hero:first-of-type .title.is-3 {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.hero:first-of-type .publication-authors p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.hero:first-of-type .button.is-dark {
    background-color: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border: none;
    font-weight: 600;
}

.hero:first-of-type .button.is-dark:hover {
    background-color: white;
    color: #764ba2;
    transform: translateY(-2px);
}

/* 优化副标题 */
.hero .title.is-3 {
    font-weight: 600;
    line-height: 1.4;
}

/* 优化核心价值卡片 */
.box {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 优化按钮样式 */
.button.is-dark {
    transition: all 0.3s ease;
    font-weight: 600;
}

.button.is-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 优化章节标题 */
.section .title.is-3 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section .title.is-3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 2px;
}

/* 优化代码块样式 */
pre {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 优化链接样式 */
a {
    transition: color 0.2s ease;
}

/* 优化 section 间距 */
.section {
    padding: 4rem 1.5rem;
}

/* 优化浅色背景 */
.hero.is-light {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Footer 优化 */
.footer {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 3rem 1.5rem;
}

.footer a {
    color: #93c5fd;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #60a5fa;
}

/* 图标动画 */
.icon.is-large i {
    transition: transform 0.3s ease;
}

.box:hover .icon.is-large i {
    transform: scale(1.1);
}

/* Mermaid 图表样式优化 */
.mermaid {
    display: flex;
    justify-content: center;
    min-height: 500px;
    width: 100%;
}

.mermaid svg {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 450px;
}

/* 调整 Mermaid 图表的字体大小 */
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon {
    stroke-width: 2px;
}

.mermaid text {
    font-size: 16px !important;
    font-weight: 500;
}

/* 优化相关链接下拉菜单 */
.work-item {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0 !important;
}

.work-item .work-info h5 {
    font-size: 0.95rem !important;
    margin-bottom: 0.25rem !important;
}

.work-item .work-info p {
    font-size: 0.8rem !important;
    margin-bottom: 0.25rem !important;
}

.work-item .work-venue {
    font-size: 0.75rem !important;
}

.more-works-dropdown {
    max-width: 320px !important;
}

/* 响应式优化 */
@media screen and (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }

    .publication-title {
        font-size: 2rem !important;
    }

    .mermaid {
        min-height: 300px;
    }

    .hero:first-of-type {
        min-height: 350px;
    }
}

/* Language Switcher - 语言切换器（精简优化） */
.language-switcher {
    position: fixed;
    top: 16px;
    right: 180px;
    z-index: 1000;
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: #64748b;
    white-space: nowrap;
}

.lang-btn i {
    font-size: 0.75rem;
}

.lang-btn:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.lang-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: default;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

.lang-btn.active:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

@media screen and (max-width: 768px) {
    .language-switcher {
        top: 70px;
        /* 移到相关链接按钮下方 */
        right: 10px;
        padding: 0.4rem;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .lang-btn i {
        font-size: 0.9rem;
    }
}