/* ===== 字体引入 ===== */
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=Ma+Shan+Zheng&family=ZCOOL+XiaoWei&display=swap");

/* ===== 字体应用 (ChatGPT 风格) ===== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

.md-typeset,
.md-nav,
.md-nav__title,
.md-nav__link,
.md-header__title,
.md-tabs__link {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.md-typeset {
    font-size: 1.15rem !important;
    line-height: 1.65 !important; /* ChatGPT 风格的开阔行间距 */
    -webkit-font-smoothing: antialiased;
}

/* ===== 浅色模式 (OpenAI Light) ===== */
[data-md-color-scheme="default"] {
    --md-default-bg-color: #ffffff;
    --md-default-fg-color: #0d0d0d;
}

[data-md-color-scheme="default"] .md-main__inner {
    background: #ffffff;
}

[data-md-color-scheme="default"] .md-typeset {
    color: #0d0d0d !important; /* ChatGPT 标志性的极深灰 */
}

[data-md-color-scheme="default"] .md-nav__link,
[data-md-color-scheme="default"] .md-nav__title {
    color: #000000 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ===== 深色模式 (OpenAI Dark) ===== */
[data-md-color-scheme="slate"] {
    --md-default-bg-color: #212121;
    --md-default-fg-color: #ececec;
}

[data-md-color-scheme="slate"] .md-main__inner {
    background: #212121;
}

[data-md-color-scheme="slate"] .md-typeset {
    color: #ececec !important; /* ChatGPT 深色模式文字色 */
}

[data-md-color-scheme="slate"] .md-nav__link,
[data-md-color-scheme="slate"] .md-nav__title {
    color: #ffffff !important;
    background: transparent !important;
}

/* ===== 彻底移除背景图干扰 (保持 ChatGPT 的简洁) ===== */
body::before {
    display: none !important;
}

/* 消除侧边栏所有可能的奇怪背景色块 */
.md-nav__item .md-nav__link,
.md-nav__item .md-nav__title,
.md-nav__item label {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* ===== 全局图片底纹（固定视差）===== */
body {
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        url("../assets/money-bg.png"), url("../assets/money-bg.png"),
        url("../assets/money-bg.png");
    background-size: 40%, 30%, 30%;
    background-position:
        top center,
        22% 120px,
        -10% 220px;
    background-repeat: repeat;
    opacity: 0.1; /* 降低透明度 */
    pointer-events: none;
    z-index: 0;
}

/* ===== 隐藏正文顶部标题（左侧导航已有）===== */
.md-content__inner > h1 {
    display: none;
}

/* ===== 去掉右侧 toc 留白，内容撑满 ===== */
.md-sidebar--secondary {
    display: none !important;
}

.md-content {
    max-width: 100% !important;
}

/* ===== 顶部导航横向滚动 ===== */
.md-tabs__list {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.md-tabs__list::-webkit-scrollbar {
    display: none;
}

/* ===== Header 站点名称字体放大 + 浅橙色 ===== */
.md-header__title {
    font-family: "Ma Shan Zheng", serif;
    font-size: 2.05rem;
    font-weight: 400;
    color: #fff8e7;
    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.5),
        0 0 16px rgba(255, 200, 0, 0.4);
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
    fill: #fff8e7;
    color: #fff8e7;
}

/* ===== 导航 tab 字号 + 竖向分隔线 ===== */
.md-tabs__item {
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.15);
}

.md-tabs__item:last-child {
    border-right: none;
    box-shadow: none;
}

.md-tabs__link {
    font-family: "ZCOOL XiaoWei", serif;
    font-size: 1.3rem;
    color: #fff8e7 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* ===== 导航 tab 激活样式 ===== */
.md-tabs__item--active {
    background: rgba(255, 255, 255, 0.15);
}

.md-tabs__link--active {
    font-weight: 700;
    border-bottom: 3px solid #ffd700;
}

/* ===== 主体内容虚线边框 ===== */
.md-main .md-grid {
    border: 1.5px dashed rgba(0, 150, 136, 0.2); /* 从 0.5 降至 0.2 */
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    min-height: calc(100vh - 9rem);
}

/* ===== 左侧边栏导航项分隔 ===== */
.md-sidebar--primary .md-nav__item > .md-nav__link {
    border-bottom: 1px solid rgba(0, 150, 136, 0.08); /* 调淡 */
}

/* ===== 边栏与正文之间的全高虚线分隔（repeating-gradient 实现）===== */
.md-main .md-grid {
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(0, 150, 136, 0.1) 0, /* 从 0.2 降至 0.1 */
        rgba(0, 150, 136, 0.1) 4px,
        transparent 4px,
        transparent 8px
    );
    background-size: 1px 8px;
    background-position: 241px 0;
    background-repeat: repeat-y;
}

/* ===== HOME 页隐藏边栏竖线 ===== */
.md-main .md-grid:has(.hero-image) {
    background-image: none;
}

/* ===== Hero 图片 ===== */
.hero-image {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 1rem;
    position: relative;
    z-index: 1;
}

.hero-image img {
    max-width: 450px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ===== Hero 标语 ===== */
.hero-tagline {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    color: rgba(0, 150, 136, 0.75);
    margin: 0.5rem 0 2rem;
}

/* ===== 卡片样式 ===== */
.md-typeset .grid.cards > ul > li {
    border-left: 4px solid rgba(0, 150, 136, 0.7) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f3 100%);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    animation: fadeInUp 0.5s ease both;
}

.md-typeset .grid.cards > ul > li:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ===== 卡片淡入动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.md-typeset .grid.cards > ul > li:nth-child(1) {
    animation-delay: 0.04s;
}
.md-typeset .grid.cards > ul > li:nth-child(2) {
    animation-delay: 0.08s;
}
.md-typeset .grid.cards > ul > li:nth-child(3) {
    animation-delay: 0.12s;
}
.md-typeset .grid.cards > ul > li:nth-child(4) {
    animation-delay: 0.16s;
}
.md-typeset .grid.cards > ul > li:nth-child(5) {
    animation-delay: 0.2s;
}
.md-typeset .grid.cards > ul > li:nth-child(6) {
    animation-delay: 0.24s;
}
.md-typeset .grid.cards > ul > li:nth-child(7) {
    animation-delay: 0.28s;
}
.md-typeset .grid.cards > ul > li:nth-child(8) {
    animation-delay: 0.32s;
}
.md-typeset .grid.cards > ul > li:nth-child(9) {
    animation-delay: 0.36s;
}
.md-typeset .grid.cards > ul > li:nth-child(10) {
    animation-delay: 0.4s;
}
.md-typeset .grid.cards > ul > li:nth-child(11) {
    animation-delay: 0.44s;
}
.md-typeset .grid.cards > ul > li:nth-child(12) {
    animation-delay: 0.48s;
}
.md-typeset .grid.cards > ul > li:nth-child(13) {
    animation-delay: 0.52s;
}
.md-typeset .grid.cards > ul > li:nth-child(14) {
    animation-delay: 0.56s;
}
.md-typeset .grid.cards > ul > li:nth-child(15) {
    animation-delay: 0.6s;
}

/* ===== 响应式网格 ===== */
@media (max-width: 600px) {
    .md-typeset .grid.cards > ul {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 601px) and (max-width: 960px) {
    .md-typeset .grid.cards > ul {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
