/* MacSur Docs - GitHub 风格优化 */

:root {
    /* GitHub 风格主题色 */
    --theme-color: #7dd3fc;
    --theme-hover: #38bdf8;
    --theme-light: rgba(125, 211, 252, 0.14);
    --border-color: rgba(148, 163, 184, 0.24);
    --bg-canvas: #060b16;
    --bg-subtle: #0c1424;
    --text-primary: #e6eef8;
    --text-secondary: #94a3b8;
    --code-bg: #0b1220;
    --sidebar-width: 300px;
    --sidebar-bg: rgba(6, 11, 22, 0.88);
    --panel-bg: rgba(13, 21, 38, 0.78);
    --panel-border: rgba(125, 211, 252, 0.18);
    --glow-blue: 0 0 0 1px rgba(125, 211, 252, 0.1), 0 18px 50px rgba(14, 165, 233, 0.12);
    --metal-gradient: linear-gradient(135deg, rgba(125,211,252,0.12) 0%, rgba(148,163,184,0.08) 45%, rgba(255,255,255,0.03) 100%);
}

/* 暗黑模式适配 */
@media (prefers-color-scheme: dark) {
    :root {
        --theme-color: #7dd3fc;
        --theme-hover: #bae6fd;
        --theme-light: rgba(125, 211, 252, 0.14);
        --border-color: rgba(148, 163, 184, 0.24);
        --bg-canvas: #060b16;
        --bg-subtle: #0c1424;
        --text-primary: #e6eef8;
        --text-secondary: #94a3b8;
        --code-bg: #0b1220;
        --sidebar-bg: rgba(6, 11, 22, 0.92);
    }

    .sidebar {
        background: var(--sidebar-bg);
        border-right-color: var(--border-color);
    }

    .sidebar a:hover {
        background: rgba(125, 211, 252, 0.08);
    }

    .sidebar a.active {
        background: rgba(125, 211, 252, 0.12);
        color: var(--theme-color);
    }
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* global subtle grid + noise to keep a unified Neo vibe across pages */
    background:
        radial-gradient(circle at 20% 20%, rgba(56,189,248,0.12), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(59,130,246,0.10), transparent 28%),
        linear-gradient(180deg, #07101d 0%, #050914 100%),
        linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px),
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.06) 0 1px, transparent 1px),
        radial-gradient(circle at 70% 35%, rgba(0,0,0,0.10) 0 1px, transparent 1px);
    background-size:
        auto,
        auto,
        auto,
        72px 72px,
        72px 72px,
        4px 4px,
        5px 5px;
    background-blend-mode: normal, normal, normal, overlay, overlay, overlay, overlay;
}

body {
    background: transparent;
    color: var(--text-primary);
}

code, pre, kbd, samp, .code-block {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
}

.sidebar {
    background: var(--sidebar-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid var(--border-color);
    color: var(--text-primary);
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 0;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 16px 0 48px rgba(0, 0, 0, 0.28);
}

.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.35); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.6); }

.sidebar a {
    color: var(--text-secondary);
    display: block;
    padding: 0.42em 1.5em;
    margin: 0.22em 0;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.18s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar a:hover {
    background: rgba(125, 211, 252, 0.08);
    border-left-color: var(--theme-color);
    color: #f8fbff;
}

.sidebar a.active {
    background: rgba(125, 211, 252, 0.12);
    border-left-color: var(--theme-color);
    color: var(--theme-color);
    font-weight: 600;
}

.sidebar > h1,
.sidebar > h2,
.sidebar > h3 {
    padding: 0.8em 1.5em 0.3em;
    margin: 1em 0 0.2em;
    color: #f5fbff;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 80%;
        max-width: 280px;
        box-shadow: 2px 0 30px rgba(0,0,0,0.35);
    }

    .sidebar.open { transform: translateX(0); }

    @media (max-width: 768px) {
        .sidebar { width: 75%; max-width: 240px; }
        .page { padding: 0.8rem !important; }
        .markdown-section h1 { font-size: 1.6em !important; }
        .markdown-section h2 { font-size: 1.3em !important; }
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.62);
        z-index: 99;
    }

    .sidebar-overlay.active { display: block; }

    .page {
        padding: 1rem !important;
        margin-top: 3rem !important;
        margin-left: 0 !important;
    }

    .markdown-section table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .markdown-section th,
    .markdown-section td {
        padding: 0.8em 1em;
        font-size: 0.9em;
    }

    .markdown-section th:first-child,
    .markdown-section td:first-child {
        min-width: 250px;
        width: auto;
    }

    .markdown-section th:nth-child(2),
    .markdown-section td:nth-child(2),
    .markdown-section th:nth-child(3),
    .markdown-section td:nth-child(3),
    .markdown-section th:nth-child(4),
    .markdown-section td:nth-child(4) {
        width: 80px;
        min-width: 70px;
        font-size: 0.85em;
        padding: 0.7em 0.5em;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 260px;
        position: fixed;
        left: 0; top: 0; bottom: 0;
    }

    .page {
        margin-left: 260px;
        padding: 2rem 1.5rem;
        max-width: none;
    }

    .markdown-section table { table-layout: auto; }
    .markdown-section th:first-child,
    .markdown-section td:first-child {
        min-width: 320px;
        width: auto;
        padding: 1em 1.5em;
    }

    .markdown-section th:nth-child(2),
    .markdown-section td:nth-child(2),
    .markdown-section th:nth-child(3),
    .markdown-section td:nth-child(3),
    .markdown-section th:nth-child(4),
    .markdown-section td:nth-child(4) {
        width: 90px;
        min-width: 80px;
        padding: 0.8em 0.6em;
        font-size: 0.95em;
    }

    html { font-size: 16px; }
    .markdown-section { font-size: 0.95rem; line-height: 1.7; }
    .carousel-container { max-width: 100%; }
    .carousel-control { width: 40px; height: 40px; font-size: 1.3em; }
    .menu-button { top: 1rem; left: 1rem; padding: 0.6rem; }
}

.page {
    background: transparent;
    color: var(--text-primary);
    max-width: 1180px;
    margin: 0 auto 0 var(--sidebar-width);
    padding: 2.2rem 3rem 4rem;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .page { padding: 1rem; margin-left: 0 !important; }
}

.markdown-section {
    background: rgba(7, 12, 22, 0.55);
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 24px;
    padding: 2rem 2.4rem 3rem;
    box-shadow: 0 30px 80px rgba(2, 8, 23, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .markdown-section {
        padding: 1.2rem 1rem 2rem;
        border-radius: 18px;
    }
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6 {
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2em;
    margin-bottom: 1em;
    color: #f3f9ff;
    letter-spacing: 0.01em;
}

.markdown-section h1 {
    font-size: 2.2em;
    padding-bottom: 0.38em;
    border-bottom: 1px solid rgba(125, 211, 252, 0.18);
    margin-top: 0;
}

.markdown-section h2 {
    font-size: 1.55em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid rgba(125, 211, 252, 0.14);
}

.markdown-section h3 { font-size: 1.2em; }

.markdown-section p {
    margin: 1.2em 0;
    line-height: 1.78;
    color: #c8d6e5;
}

.markdown-section strong { color: #f8fbff; }

.markdown-section a {
    color: var(--theme-color);
    text-decoration: none;
}

.markdown-section a:hover {
    text-decoration: none;
    color: var(--theme-hover);
    text-shadow: 0 0 18px rgba(125, 211, 252, 0.25);
}

.markdown-section ul,
.markdown-section ol {
    padding-left: 2em;
    margin: 1.2em 0;
}

.markdown-section li {
    margin: 0.5em 0;
    line-height: 1.65;
    color: #cbd5e1;
}

.markdown-section blockquote {
    margin: 1.5em 0;
    padding: 0.8em 1.1em;
    color: #c9d8ea;
    border-left: 0.25em solid var(--theme-color);
    background: linear-gradient(135deg, rgba(125,211,252,0.08), rgba(148,163,184,0.04));
    border-radius: 0 12px 12px 0;
}

.markdown-section blockquote p:last-child { margin-bottom: 0; }

.markdown-section pre {
    background: linear-gradient(180deg, rgba(7,12,22,0.98), rgba(10,16,28,0.96));
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 14px;
    padding: 1em;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.9em;
    line-height: 1.6;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 40px rgba(2,8,23,0.28);
}

.markdown-section pre code {
    background: transparent;
    padding: 0;
    border: none;
    font-size: inherit;
    color: #dbeafe;
}

.markdown-section code {
    background: rgba(125, 211, 252, 0.08);
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 6px;
    padding: 0.2em 0.4em;
    font-size: 0.9em;
    color: #d8f3ff;
}

.markdown-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    display: table;
    table-layout: auto;
    overflow: hidden;
    border-radius: 16px;
}

.markdown-section th,
.markdown-section td {
    padding: 0.88em 1.2em;
    border: 1px solid rgba(148,163,184,0.16);
    text-align: left;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.markdown-section th:first-child,
.markdown-section td:first-child {
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 1.1em 1.6em;
    font-weight: 500;
}

.markdown-section th:nth-child(2),
.markdown-section td:nth-child(2),
.markdown-section th:nth-child(3),
.markdown-section td:nth-child(3),
.markdown-section th:nth-child(4),
.markdown-section td:nth-child(4) {
    width: 80px;
    min-width: 70px;
    max-width: 100px;
    text-align: center;
    padding: 0.8em 0.6em;
    font-size: 0.95em;
}

.markdown-section th {
    background: rgba(125, 211, 252, 0.08);
    font-weight: 700;
    color: #f3fbff;
    position: sticky;
    top: 0;
}

.markdown-section tr:nth-child(2n) {
    background: rgba(148, 163, 184, 0.04);
}

.markdown-section tr:hover {
    background: rgba(125, 211, 252, 0.07);
}

@media (max-width: 768px) {
    .markdown-section table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        table-layout: auto !important;
    }

    .grid { display: block; }
    .col-span-1, .col-span-2, .col-span-3 {
        display: block;
        width: 100% !important;
        margin-bottom: 2em;
    }

    .tutorial-list-table { table-layout: auto !important; }
    .tutorial-list-table th,
    .tutorial-list-table td {
        width: auto !important;
        min-width: 60px;
    }
}

.tutorial-list-table-wrapper table {
    table-layout: fixed !important;
    width: 100% !important;
}

.tutorial-list-table-wrapper table th:nth-child(1),
.tutorial-list-table-wrapper table td:nth-child(1) {
    width: 5% !important;
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--theme-color);
}

.tutorial-list-table-wrapper table th:nth-child(2),
.tutorial-list-table-wrapper table td:nth-child(2) {
    width: 67% !important;
    text-align: left;
}

.tutorial-list-table-wrapper table th:nth-child(3),
.tutorial-list-table-wrapper table td:nth-child(3),
.tutorial-list-table-wrapper table th:nth-child(4),
.tutorial-list-table-wrapper table td:nth-child(4),
.tutorial-list-table-wrapper table th:nth-child(5),
.tutorial-list-table-wrapper table td:nth-child(5) {
    width: 9% !important;
    min-width: 70px;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 1.8em 0;
    border-radius: 18px;
    overflow: hidden;
    background: #050914;
    border: 1px solid rgba(125, 211, 252, 0.16);
    box-shadow: 0 24px 60px rgba(2,8,23,0.35);
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.menu-button {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1200;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 12px;
    background: rgba(8, 15, 27, 0.92);
    color: #eaf6ff;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(2,8,23,0.32);
    backdrop-filter: blur(12px);
}

.menu-button:hover {
    background: rgba(13, 22, 39, 0.98);
    box-shadow: 0 0 0 1px rgba(125,211,252,0.18), 0 16px 42px rgba(56,189,248,0.16);
}

.hero-metal {
    position: relative;
    padding: 2rem 2rem 1.4rem;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(125,211,252,0.14), rgba(255,255,255,0.03)),
        linear-gradient(180deg, rgba(10,17,31,0.96), rgba(7,12,22,0.92));
    border: 1px solid rgba(125, 211, 252, 0.16);
    box-shadow: 0 28px 80px rgba(2,8,23,0.42), inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: hidden;
}

.hero-metal::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at top right, rgba(125,211,252,0.18), transparent 22%),
      linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.04) 35%, transparent 60%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(125,211,252,0.18);
    background: rgba(125,211,252,0.08);
    color: #c8f1ff;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-metal h1 {
    border: none !important;
    margin: 0.2rem 0 0.7rem !important;
    padding: 0 !important;
    font-size: 2.6rem !important;
    line-height: 1.08;
    color: #f6fbff;
    text-shadow: 0 0 28px rgba(125,211,252,0.08);
}

.hero-metal p {
    max-width: 900px;
    color: #bfd1e4;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1.4rem 0 1.6rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    text-decoration: none !important;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hero-btn:hover {
    transform: translateY(-1px);
}

.hero-btn-primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #02131e !important;
    box-shadow: 0 18px 36px rgba(14,165,233,0.28);
}

.hero-btn-secondary {
    background: rgba(125,211,252,0.08);
    color: #dff6ff !important;
    border: 1px solid rgba(125,211,252,0.16);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 1rem;
}

.hero-card,
.portal-card,
.metal-stat {
    background: linear-gradient(180deg, rgba(17,25,40,0.78), rgba(10,16,28,0.86));
    border: 1px solid rgba(125,211,252,0.12);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(2,8,23,0.28);
}

.hero-card {
    padding: 1rem 1rem 0.9rem;
}

.hero-card-label {
    font-size: 0.84rem;
    color: #8aa2bb;
    margin-bottom: 0.4rem;
}

.hero-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #f5fbff;
}

.hero-card-desc {
    margin-top: 0.4rem;
    color: #95a8bd;
    font-size: 0.92rem;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 1.4rem 0 0.8rem;
}

.portal-card {
    display: block;
    padding: 1.1rem 1rem;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.portal-card:hover {
    transform: translateY(-2px);
    border-color: rgba(125,211,252,0.28);
    box-shadow: 0 22px 50px rgba(14,165,233,0.14);
}

.portal-title {
    color: #f4fbff;
    font-size: 1.04rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.portal-desc {
    color: #9db1c5;
    font-size: 0.94rem;
    line-height: 1.7;
}

.metal-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 1.2rem;
}

.metal-stat {
    padding: 1.1rem 0.9rem;
    text-align: center;
}

.metal-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #e9fbff;
}

.metal-stat-label {
    display: block;
    margin-top: 0.35rem;
    color: #96aabd;
}

#giscus-container {
    max-width: 1180px;
    margin: 2rem auto 4rem calc(var(--sidebar-width) + 0px) !important;
    padding: 0 3rem;
}

#giscus-container h3,
#giscus-container p {
    color: #dce9f5 !important;
}

@media (max-width: 1024px) {
    .hero-grid,
    .metal-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-metal {
        padding: 1.2rem 1rem 1rem;
        border-radius: 18px;
    }

    .hero-metal h1 {
        font-size: 1.9rem !important;
    }

    .hero-actions,
    .portal-grid,
    .hero-grid,
    .metal-stats {
        grid-template-columns: 1fr;
        display: grid;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
    }

    .hero-btn {
        width: 100%;
    }

    #giscus-container {
        margin: 1rem auto 3rem !important;
        padding: 0 1rem;
    }
}


/* ===== Homepage portal upgrade ===== */
.home-portal {
  position: relative;
  margin: 0 0 28px 0;
  padding: 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(56,189,248,0.22), transparent 28%),
    radial-gradient(circle at bottom left, rgba(99,102,241,0.18), transparent 22%),
    linear-gradient(135deg, #08111f 0%, #0f172a 48%, #111827 100%);
  color: #e5f3ff;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.35);
}
.home-portal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(125,211,252,0.07), transparent);
  transform: translateX(-100%);
  animation: portalSweep 7s linear infinite;
  pointer-events: none;
}
@keyframes portalSweep {
  100% { transform: translateX(100%); }
}
.home-portal h1,
.home-portal h2,
.home-portal h3,
.home-portal p,
.home-portal a,
.home-portal li,
.home-portal strong,
.home-portal span { color: inherit; }
.home-portal-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: stretch;
}
.home-hero-title {
  font-size: 2.2rem;
  line-height: 1.15;
  margin: 0 0 14px 0;
  font-weight: 800;
}
.home-hero-desc {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 18px;
}
.home-hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148,163,184,0.12);
  border: 1px solid rgba(148,163,184,0.18);
  color: #e2e8f0;
  font-size: 0.92rem;
}
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.home-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none !important;
}
.home-hero-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(56,189,248,0.28);
}
.home-hero-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148,163,184,0.18);
  color: #dbeafe !important;
}
.home-feature-panel,
.home-video-panel,
.home-carousel-panel {
  background: rgba(15,23,42,0.52);
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 20px;
  padding: 18px;
  backdrop-filter: blur(10px);
}
.home-panel-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 800;
  color: #e0f2fe;
}
.home-feature-list {
  margin: 0;
  padding-left: 1.2em;
}
.home-feature-list li {
  margin: 10px 0;
  color: #dbeafe;
}
.home-carousel-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
.home-card {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.12);
  text-decoration: none !important;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(2,6,23,0.26);
  border-color: rgba(125,211,252,0.35);
}
.home-card-cover {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}
.home-card-body {
  padding: 14px 14px 16px 14px;
}
.home-card-tag {
  display: inline-block;
  margin-bottom: 8px;
  font-size: .78rem;
  color: #7dd3fc;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.home-card-title {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 700;
  color: #f8fafc;
}
.home-card-desc {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: .92rem;
  line-height: 1.7;
}
.home-video-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  margin-top: 18px;
}
.home-video-wrap iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(2,6,23,0.3);
}
.home-mini-list {
  display: grid;
  gap: 12px;
}
.home-mini-item {
  display: block;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.12);
  text-decoration: none !important;
}
.home-mini-item strong { color: #f8fafc; display:block; margin-bottom:6px; }
.home-mini-item span { color: #cbd5e1; font-size: .92rem; line-height: 1.7; }
@media (max-width: 980px) {
  .home-portal-grid,
  .home-video-grid,
  .home-carousel-track {
    grid-template-columns: 1fr;
  }
  .home-hero-title { font-size: 1.75rem; }
}


.home-carousel-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.home-carousel-controls {
  display:flex;
  gap:8px;
}
.home-carousel-btn,
.home-slider-dot {
  border:none;
  cursor:pointer;
}
.home-carousel-btn {
  width:42px;
  height:42px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  color:#e0f2fe;
  border:1px solid rgba(148,163,184,0.2);
  font-size:1.3rem;
  transition:all .2s ease;
}
.home-carousel-btn:hover {
  background:rgba(125,211,252,0.16);
  transform:translateY(-1px);
}
.home-slider {
  position:relative;
}
.home-slides {
  position:relative;
  min-height:420px;
}
.home-slide {
  position:absolute;
  inset:0;
  display:grid;
  grid-template-columns:1.15fr 0.85fr;
  gap:0;
  overflow:hidden;
  border-radius:20px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(148,163,184,0.12);
  opacity:0;
  visibility:hidden;
  transform:translateX(20px) scale(.985);
  transition:opacity .45s ease, transform .45s ease, visibility .45s ease;
  pointer-events:none;
  text-decoration:none !important;
}
.home-slide.active {
  opacity:1;
  visibility:visible;
  transform:translateX(0) scale(1);
  pointer-events:auto;
}
.home-slide-cover {
  min-height:420px;
  background-size:cover;
  background-position:center;
}
.home-slide-body {
  padding:26px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:linear-gradient(180deg, rgba(15,23,42,0.92), rgba(15,23,42,0.82));
}
.home-slide-title {
  font-size:1.4rem;
  line-height:1.45;
  font-weight:800;
  color:#f8fafc;
}
.home-slide-desc {
  margin-top:12px;
  color:#cbd5e1;
  font-size:.98rem;
  line-height:1.9;
}
.home-slider-dots {
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:16px;
}
.home-slider-dot {
  width:11px;
  height:11px;
  border-radius:999px;
  background:rgba(255,255,255,0.22);
  transition:all .2s ease;
}
.home-slider-dot.active {
  width:28px;
  background:#7dd3fc;
  box-shadow:0 0 0 4px rgba(125,211,252,0.12);
}
@media (max-width: 980px) {
  .home-slide {
    grid-template-columns:1fr;
  }
  .home-slide-cover,
  .home-slides {
    min-height:260px;
  }
  .home-slide-body {
    padding:18px;
  }
  .home-slide-title {
    font-size:1.12rem;
  }
}

/* ===== SearXNG 首页搜索框 ===== */
.home-search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 18px;
    width: 100%;
    max-width: 540px;
    background: rgba(13, 21, 38, 0.85);
    border: 1px solid rgba(125, 211, 252, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(14, 165, 233, 0.10);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.home-search-bar:focus-within {
    border-color: rgba(125, 211, 252, 0.65);
    box-shadow: 0 4px 32px rgba(14, 165, 233, 0.22);
}
.home-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 11px 16px;
    font-size: 0.97rem;
    color: var(--text-primary);
    font-family: inherit;
    min-width: 0;
}
.home-search-bar input::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}
.home-search-bar button {
    background: linear-gradient(135deg, rgba(56,189,248,0.85), rgba(14,165,233,0.75));
    border: none;
    outline: none;
    cursor: pointer;
    padding: 11px 22px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s, opacity 0.2s;
    white-space: nowrap;
}
.home-search-bar button:hover {
    background: linear-gradient(135deg, rgba(56,189,248,1), rgba(14,165,233,1));
    opacity: 0.92;
}
