/* ==========================================================
   LLML · 旗舰开源项目展示板块
   ========================================================== */
.llml-section {
    position: relative;
    padding: 110px 0 120px;
    background:
        radial-gradient(ellipse 90% 55% at 50% -8%, rgba(129, 140, 248, 0.18) 0%, transparent 62%),
        radial-gradient(ellipse 60% 40% at 85% 90%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #070d17 0%, #0b1226 48%, #0a1525 100%);
    overflow: hidden;
    /* 注意：不可用 isolation: isolate —— 会创建层叠上下文，
       使整个板块背景盖在光追 canvas（z-index:0，body 首子元素）之上，
       导致滚动到本板块时看不到光追效果 */
}

/* 顶部/底部过渡光带 */
.llml-section::before,
.llml-section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.45), transparent);
    pointer-events: none;
    z-index: 3;
}

.llml-section::before { top: 0; }
.llml-section::after { bottom: 0; }

.llml-section .container {
    position: relative;
    z-index: 4;
}

/* ---------- 背景光效 ---------- */
.llml-aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* 负层级：装饰光效绘制在板块背景之上、光追 canvas 之下，
       既有氛围光又完全不遮挡光追效果 */
    z-index: -1;
    overflow: hidden;
}

.llml-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    will-change: transform;
}

.llml-orb-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -80px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.42), transparent 70%);
    animation: llmlFloat1 18s ease-in-out infinite;
}

.llml-orb-2 {
    width: 360px;
    height: 360px;
    top: 38%;
    right: -110px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.34), transparent 70%);
    animation: llmlFloat2 22s ease-in-out infinite;
}

.llml-orb-3 {
    width: 300px;
    height: 300px;
    bottom: -90px;
    left: 42%;
    background: radial-gradient(circle, rgba(232, 121, 249, 0.26), transparent 70%);
    animation: llmlFloat3 26s ease-in-out infinite;
}

.llml-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    opacity: 0.75;
}

@keyframes llmlFloat1 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(60px, 40px, 0) scale(1.12); }
}

@keyframes llmlFloat2 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
    50%      { transform: translate3d(-70px, -50px, 0) scale(0.92); }
}

@keyframes llmlFloat3 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(0.95); }
    50%      { transform: translate3d(-50px, -60px, 0) scale(1.15); }
}

/* ---------- 头部 ---------- */
.llml-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.llml-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    margin-bottom: 1.5rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: #f5d0fe !important;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(56, 189, 248, 0.12));
    border: 1px solid rgba(167, 139, 250, 0.35);
    box-shadow: 0 6px 22px rgba(129, 140, 248, 0.18);
    animation: llmlPulse 3.4s ease-in-out infinite;
}

.llml-badge-pill i {
    color: #fbbf24 !important;
}

@keyframes llmlPulse {
    0%, 100% { box-shadow: 0 6px 22px rgba(129, 140, 248, 0.16); }
    50%      { box-shadow: 0 8px 30px rgba(167, 139, 250, 0.4); }
}

/* 说明：不使用 background-clip:text 渐变文字 —— 波浪动效会把字符拆成
   带 will-change 的独立 span，渐变背景无法正确裁剪到这些子层上，会导致文字不可见。
   保持 h2 为块级（inline-block 会与前面的 inline 徽章排进同一行，导致布局错乱） */
.llml-section .section-title {
    font-size: 3.25rem;
    letter-spacing: -1.5px;
    margin-bottom: 0.5rem;
    color: #f8faff !important;
    text-shadow:
        0 0 24px rgba(167, 139, 250, 0.55),
        0 0 60px rgba(56, 189, 248, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.6);
    position: relative;
}

.llml-section .section-title::after {
    background: linear-gradient(135deg, #a78bfa, #38bdf8, #e0f2fe);
    width: 72px;
    height: 3px;
    margin: 0.85rem auto 0;
}

.llml-tagline {
    font-size: 1.125rem;
    font-weight: 500;
    color: #c7d2fe !important;
    margin: 1.5rem 0 0.75rem;
    letter-spacing: 0.2px;
}

.llml-intro {
    max-width: 720px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.72) !important;
}

/* 元信息徽章 */
.llml-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.75rem 0 2rem;
}

.llml-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82) !important;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--glass-line);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-highlight);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.llml-meta-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(167, 139, 250, 0.45);
}

.llml-meta-item i {
    font-size: 0.8rem;
    color: #a5b4fc !important;
}

.llml-meta-item .fa-star { color: #fbbf24 !important; }
.llml-meta-item .fa-code { color: #fb923c !important; }
.llml-meta-item .fa-balance-scale { color: #7dd3fc !important; }
.llml-meta-item .fa-tag { color: #86efac !important; }

/* 行动按钮 */
.llml-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.llml-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.65rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.llml-btn-primary {
    color: #ffffff !important;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #38bdf8 100%);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.llml-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 38px rgba(99, 102, 241, 0.5);
}

/* 了解详情专用页按钮（青绿渐变，与 GitHub 主按钮区分） */
.llml-btn-site {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 55%, #2dd4bf 100%);
    box-shadow: 0 10px 28px rgba(14, 165, 233, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.llml-btn-site:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 38px rgba(14, 165, 233, 0.5);
}

.llml-btn-ghost {
    color: #c7d2fe !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-line-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-highlight);
}

.llml-btn-ghost:hover {
    transform: translateY(-3px);
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.6);
    color: #ffffff !important;
}

.llml-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ---------- 主体：特性 + 终端 ---------- */
.llml-showcase {
    display: grid;
    grid-template-columns: 1fr 1.04fr;
    gap: 1.75rem;
    align-items: stretch;
    margin-bottom: 1.75rem;
}

.llml-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-content: start;
}

.llml-feature {
    position: relative;
    padding: 1.35rem 1.25rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-line);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    overflow: hidden;
    box-shadow: var(--glass-highlight);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, opacity 0.6s ease;
}

.llml-feature::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(320px circle at var(--llml-mx, 50%) var(--llml-my, 0%), rgba(167, 139, 250, 0.16), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.llml-feature:hover {
    transform: translateY(-6px);
    border-color: var(--glass-line-strong);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: var(--glass-shadow), var(--glass-highlight);
}

.llml-feature:hover::after { opacity: 1; }

.llml-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 0.85rem;
    border-radius: 13px;
    font-size: 1.05rem;
    color: #e0e7ff !important;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.28), rgba(56, 189, 248, 0.16));
    border: 1px solid rgba(167, 139, 250, 0.32);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.llml-feature:hover .llml-feature-icon {
    transform: scale(1.12) rotate(-6deg);
}

.llml-feature h4 {
    font-size: 0.98rem;
    font-weight: 650;
    margin-bottom: 0.5rem;
    color: #ffffff !important;
    letter-spacing: -0.2px;
}

.llml-feature p {
    font-size: 0.8rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.66) !important;
}

.llml-feature code {
    font-family: 'SF Mono', Consolas, 'Courier New', monospace;
    font-size: 0.74rem;
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
    color: #a5b4fc !important;
    background: rgba(129, 140, 248, 0.16);
    border: 1px solid rgba(129, 140, 248, 0.22);
}

/* ---------- 代码终端 ---------- */
.llml-terminal {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid var(--glass-line);
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.45),
        var(--glass-highlight);
    overflow: hidden;
}

.llml-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.7), transparent);
}

.llml-terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--glass-line);
}

.llml-dots {
    display: flex;
    gap: 0.4rem;
}

.llml-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: block;
}

.llml-dot-1 { background: #ff5f57; }
.llml-dot-2 { background: #febc2e; }
.llml-dot-3 { background: #28c840; }

.llml-terminal-title {
    font-family: 'SF Mono', Consolas, 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5) !important;
}

.llml-terminal-live {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: #86efac !important;
}

.llml-terminal-live i {
    font-size: 0.5rem;
    color: #22c55e !important;
    animation: llmlBlink 1.8s ease-in-out infinite;
}

@keyframes llmlBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.llml-tabs {
    display: flex;
    gap: 0.3rem;
    padding: 0.6rem 0.85rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.llml-tabs::-webkit-scrollbar { display: none; }

.llml-tab {
    flex: 0 0 auto;
    padding: 0.42rem 0.9rem;
    font-family: 'SF Mono', Consolas, 'Courier New', monospace;
    font-size: 0.74rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 9px 9px 0 0;
    cursor: pointer;
    background: transparent;
    color: rgba(255, 255, 255, 0.5) !important;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
}

.llml-tab:hover {
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--glass-highlight);
}

.llml-tab.active {
    color: #e0e7ff !important;
    background: rgba(129, 140, 248, 0.16);
    border-color: rgba(167, 139, 250, 0.35);
    border-bottom-color: transparent;
    box-shadow: var(--glass-highlight);
}

.llml-code-wrap {
    flex: 1;
    padding: 1.15rem 0 0.4rem;
    border-top: 1px solid var(--glass-line);
    margin-top: 0.6rem;
}

.llml-pane {
    display: none;
}

.llml-pane.active {
    display: block;
    animation: llmlPaneIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes llmlPaneIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.llml-code {
    margin: 0;
    padding: 0 1.25rem 1.35rem;
    overflow-x: auto;
    font-family: 'SF Mono', 'JetBrains Mono', Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.85;
    tab-size: 4;
    -webkit-font-smoothing: antialiased;
}

.llml-code::-webkit-scrollbar { height: 7px; }
.llml-code::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.35);
    border-radius: 4px;
}
.llml-code::-webkit-scrollbar-track { background: transparent; }

.llml-code code {
    display: block;
    color: rgba(233, 238, 255, 0.92) !important;
    white-space: pre;
}

/* 语法高亮 token
   注意：必须带上 .llml-code 前缀 —— base.css 的 `* { color: white !important }` 与
   `.llml-code code` 都带 !important，裸 .tok-* 的特异性不足以胜出 */
.llml-code .tok-kw   { color: #c084fc !important; font-weight: 600; }
.llml-code .tok-fn   { color: #7dd3fc !important; }
.llml-code .tok-type { color: #5eead4 !important; }
.llml-code .tok-str  { color: #fcd34d !important; }
.llml-code .tok-num  { color: #fda4af !important; }
.llml-code .tok-com  { color: rgba(148, 163, 184, 0.75) !important; font-style: italic; }
.llml-code .tok-builtin { color: #93c5fd !important; }
.llml-code .tok-cmd  { color: #a5b4fc !important; font-weight: 600; }
.llml-code .tok-flag { color: #5eead4 !important; }
.llml-code .tok-ok   { color: #4ade80 !important; font-weight: 600; }
.llml-code .tok-warn { color: #fb923c !important; }
.llml-code .tok-dim  { color: rgba(203, 213, 225, 0.55) !important; }

/* ---------- 编译流水线 ---------- */
.llml-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.75rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--glass-line);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-highlight);
    position: relative;
    z-index: 4;
}

.llml-step {
    padding: 0.35rem 0.85rem;
    font-family: 'SF Mono', Consolas, 'Courier New', monospace;
    font-size: 0.74rem;
    font-weight: 500;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-highlight);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    animation: llmlStepGlow 4s ease-in-out infinite;
    white-space: nowrap;
}

.llml-step:hover {
    transform: translateY(-3px);
    background: rgba(129, 140, 248, 0.2);
    border-color: rgba(167, 139, 250, 0.5);
    color: #ffffff !important;
}

.llml-step.llml-step-src {
    color: #c7d2fe !important;
    background: rgba(129, 140, 248, 0.16);
    border-color: rgba(167, 139, 250, 0.3);
}

.llml-step.llml-step-out {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(56, 189, 248, 0.28));
    border-color: rgba(167, 139, 250, 0.5);
    font-weight: 650;
}

.llml-arrow {
    font-size: 0.7rem;
    color: rgba(167, 139, 250, 0.65) !important;
}

@keyframes llmlStepGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(129, 140, 248, 0); }
    50%      { box-shadow: 0 0 14px rgba(129, 140, 248, 0.28); }
}

/* ---------- 数据指标 ---------- */
.llml-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    position: relative;
    z-index: 4;
}

.llml-stat {
    padding: 1.5rem 1.25rem;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-line);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-highlight);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, opacity 0.6s ease;
}

.llml-stat:hover {
    transform: translateY(-6px);
    border-color: var(--glass-line-strong);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: var(--glass-shadow), var(--glass-highlight);
}

.llml-stat-num {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    color: #e0f2fe !important;
    margin-bottom: 0.35rem;
    font-variant-numeric: tabular-nums;
}

.llml-stat-num i {
    font-size: 1rem;
    margin-right: 0.25rem;
    color: #a78bfa !important;
}

.llml-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88) !important;
    margin-bottom: 0.25rem;
}

.llml-stat-sub {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55) !important;
    line-height: 1.6;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .llml-showcase {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .llml-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .llml-section .section-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    .llml-section {
        padding: 85px 0 90px;
    }
    .llml-features {
        grid-template-columns: 1fr;
    }
    .llml-code {
        font-size: 0.74rem;
    }
    .llml-pipeline {
        gap: 0.35rem;
        padding: 0.85rem 0.75rem;
    }
    .llml-step {
        font-size: 0.68rem;
        padding: 0.3rem 0.6rem;
    }
    .llml-arrow {
        display: none;
    }
    .llml-section .section-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .llml-stats {
        grid-template-columns: 1fr;
    }
    .llml-btn {
        width: 100%;
        justify-content: center;
    }
    .llml-stat-num {
        font-size: 1.6rem;
    }
}

/* 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
    .llml-orb,
    .llml-step,
    .llml-badge-pill,
    .llml-terminal-live i {
        animation: none !important;
    }
}
