:root {
    --color-bg: #ffffff;
    --color-surface: #f9f9f9;
    --color-surface-hover: #d0d0d0;
    --color-border: #e5e5e5;
    --color-shadow: rgba(0, 0, 0, 0.15);
    --color-shadow-hard: rgba(0, 0, 0, 0.7);

    --color-text: #111111;
    --color-text-muted: #666666;
    --color-heading: #000000;

    --color-primary: #4e92f8;
    --color-primary-hover: #1e75f7;

    --color-secondary: #ff9800;

    --color-secondary-gray: #e5e5e5;
    --color-secondary-gray-hover: #d2d0d0;

    --color-danger: #e53935;
    --color-success: #43a047;

    --color-info: #0288d1;
    --color-warning: #f57c00;


    --popup-btn-background: #f1f1f1;
    --popup-btn-background-hover: #e5e5e5;
    --popup-btn-background-active: #b6b5b5;

    /* 版心与排版 */
    --content-max: 760px;
    /* 内容最大宽度 */
    --font-size: 16px;
    /* 正文字号 */
    --line-height: 1.8;
    /* 行高 */
    --letter-spacing: 0px;
    /* 字距 */
    --para-spacing: 0.7em;
    /* 段落间距 */
    --columns: 1;
    /* 分栏数 */
    --column-gap: 2.2rem;
    /* 分栏间距 */

    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .06);

    /* 其他效果 */
    --ruler-height: 36px;
    /* 阅读标尺高度 */
    --progress: 0%;
    /* 滚动进度条 */
    --contrast-boost: 0;
    /* 对比度增强开关（0/1） */

    /* --checkbox-size: 15px; */

    --select-bg-color: #f4f4f4;
    --select-text-color: #41403f;
    --select-border-color: #dfdede;
    --select-hover-bg-color: rgb(227, 226, 225);
    --select-hover-text-color: #3e3a32;
    --draw-color: #90c0f5;
    --draw-bg-color: #eef1f7;
    --color-text-white: #ffffff;


    --summary-bg: #fbf6ed;
    --summary-text: #5c4430;
    --summary-border: #cb4b16;
    --quote-bg: #f8f5ef;
    --quote-border: #cb4b16;
    --note-bg: #f9f5ed;
    --note-border: #b58900;
    --note-text: #8d6e00;
    --separator: #d9c9b3;
    --highlight-bg: #ffe8b3;
    --highlight-color: #a05a2c;
    --button-bg: #eee8d5;
    --button-text: #586e75;
    --button-border: #d9c9b3;
    --button-hover-bg: #d9c9b3;

}

/* 深色主题 */
:root[data-theme="dark"] {
    --color-bg: #121212;
    --color-surface: #1e1e1e;
    --color-surface-hover: #434242;
    --color-border: #545353;
    --color-shadow: rgba(0, 0, 0, 0.6);

    --color-text: #f5f5f5;
    --color-text-muted: #aaaaaa;
    --color-heading: #ffffff;

    --color-primary: #4d7aaf;
    --color-primary-hover: #6c96c6;
    --color-secondary: #ffb74d;
    --color-secondary-gray: #2d2c2c;
    --color-secondary-gray-hover: #585757;
    --color-danger: #ef5350;
    --color-success: #66bb6a;

    --color-info: #29b6f6;
    --color-warning: #ffa726;


    --popup-btn-background: #888787;
    --popup-btn-background-hover: #a5a3a3;
    --popup-btn-background-active: #d0d0d0;

    --select-bg-color: #f5f1e6;
    --select-text-color: #3e3a32;
    --select-border-color: #e0d8c8;
    --select-hover-bg-color: #ceccc7;
    --select-hover-text-color: #3e3a32;
    --draw-color: #298ff5;
    --draw-bg-color: #403f3f;
    --color-text-white: #d9d8d8;

    --card-bg: #1e1e24;
    --text-color: #eee;
    --title-color: #fff;
    --body-bg: #121212;
    --summary-bg: #1a1a28;
    --summary-text: #ccc;
    --summary-border: #4A90E2;
    --quote-bg: #1a1a28;
    --quote-border: #4A90E2;
    --note-bg: #2a2a1a;
    --note-border: #ffe082;
    --note-text: #ffd966;
    --separator: #333;
    --highlight-bg: #444466;
    --highlight-color: #ffd966;
    --button-bg: #2a2a30;
    --button-text: #eee;
    --button-border: #555;
    --button-hover-bg: #3a3a40;

}




html {
    font-size: var(--font-size);
    scrollbar-gutter: stable;
    overscroll-behavior: none; /* 禁止触发浏览器的下拉刷新 */
}

body {
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-surface) 100%);
    margin: 0;
    /* padding: 20px; */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    transition: background 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.dy-article-card {
    width: 90vw;
    max-width: 900px;
    margin: 0 0 30px 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 8px 32px var(--color-shadow);
    color: var(--color-text);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* 折叠状态的卡片，减小padding */
.dy-article-card-close {
    padding: 18px 40px;
}

.dy-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--color-shadow);
}

h2,
h3 {
    color: var(--title-color);
    font-weight: 600;
    /* margin-top: 2em;
    margin-bottom: 1em; */
    /* padding-bottom: .3em; */
    border-bottom: 1px solid var(--separator);
}

.dy-article-title {
    font-size: 1.6rem;
    margin: 0 0 20px 0;
    text-align: center;
    border: none;
    width: 100%;
    padding: 12px 0;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: left;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.dy-article-title:hover {
    transform: translateX(5px);
}

/* 折叠状态下的标题，进一步减小间距 */
.dy-article-title-close {
    padding: 8px 0;
    margin: 0;
}

h3 {
    font-size: 1.3rem;
    color: var(--color-heading);
    margin: 30px 0 15px 0;
    position: relative;
    padding-left: 20px;
}

h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
}

.dy-article-summary {
    background: linear-gradient(135deg, var(--summary-bg) 0%, rgba(78, 146, 248, 0.05) 100%);
    border-left: 4px solid var(--color-primary);
    padding: 20px 25px;
    margin: 30px 0;
    color: var(--summary-text);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 16px rgba(78, 146, 248, 0.1);
}

.dy-article-summary p {
    margin: 0;
}

.dy-article-content {
    margin-top: 50px;
}

.dy-article-content p,
.dy-article-content ul {
    font-size: 1rem;
    /* margin-bottom: 18px; */
    color: var(--text-color);
}

blockquote {
    border-left: 4px solid var(--color-primary);
    background: linear-gradient(135deg, var(--quote-bg) 0%, rgba(78, 146, 248, 0.03) 100%);
    padding: 20px 25px;
    margin: 25px 0;
    color: var(--text-color);
    border-radius: 0 12px 12px 0;
    position: relative;
    box-shadow: 0 2px 12px rgba(78, 146, 248, 0.08);
}

blockquote p {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
}

.dy-article-note {
    background-color: var(--note-bg);
    border: 1px solid var(--note-border);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 24px 0;
    color: var(--note-text);
    font-size: .9rem;
    text-align: center;
}

.dy-article-note p {
    margin: 0;
}

.dy-article-separator {
    border: 0;
    border-top: 1px solid var(--separator);
    margin: 40px 0;
}

ul {
    padding-left: 25px;
    margin: 16px 0;
}

ul li {
    margin-bottom: 10px;
}

ul li::marker {
    color: var(--summary-border) !important;
}

.dy-highlight {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 2px 4px;
    font-weight: 700;
    position: relative;
}

strong {
    font-weight: 600;
    color: var(--title-color);
}

.theme-switcher {
    text-align: center;
    margin-bottom: 20px;
}

.theme-switcher button {
    cursor: pointer;
    border: 1px solid var(--button-border);
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.theme-switcher button:hover {
    background-color: var(--button-hover-bg);
}

/* Header 样式 */
.header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    max-width: 850px;
    margin: 0 auto;
    gap: 10px;
}

.logo {
    width: 250px;
    margin: 30px 0 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotate(-4deg);
    filter: drop-shadow(0 4px 12px var(--color-shadow));
}

.logo a img {
    display: block;
    align-items: center;
    filter: drop-shadow(2px 2px 1px rgba(0, 0, 0, 0.2));
    width: 100%;
}



.arrow {
    display: inline-block;
    width: 6px;
    height: 6px;
    border: solid var(--color-primary);
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(-45deg);
    transition: all 0.3s ease;
    margin: 4px 15px 4px 4px;
}

.dy-article-card-close.open .arrow {
    transform: rotate(45deg);
}


@media screen and (max-width: 768px) {
    body {
        /* padding: 15px; */
    }

    .logo {
        width: 250px;
        margin: 30px 0 40px 0;
    }

    .dy-article-card {
        width: calc(100vw - 30px);
        padding: 20px 25px;
        margin: 0 0 20px 0;
    }

    .dy-article-title {
        font-size: 1.3rem;
        padding: 10px 0;
    }

    .dy-article-title-close {
        padding: 6px 0;
    }

    .dy-article-card-close {
        padding: 12px 25px;
    }

    h3 {
        font-size: 1.1rem;
        margin: 20px 0 10px 0;
    }

    :root {
        --font-size: 18px;
    }
}

/* 图片建议样式 */
.image-suggestion {
    margin: 15px 0;
    padding: 15px 20px;
    background-color: var(--color-surface);
    border-left: 4px solid var(--color-primary);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--color-shadow);
}

.image-suggestion p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.image-suggestion em {
    color: var(--color-primary);
    font-style: normal;
    font-weight: 500;
}

.image-suggestion strong {
    color: var(--color-text);
    font-weight: 600;
}

/* 视频播放器样式 */
.video-container {
    margin: 2em 0;
    padding: 1.5em;
    background-color: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}

.video-container h3 {
    margin-top: 0;
    margin-bottom: 0.8em;
    color: var(--color-heading);
    font-size: 1.2em;
    font-weight: 600;
}

.video-container p {
    margin-bottom: 1em;
    color: var(--color-text-muted);
    font-size: 0.95em;
    line-height: var(--line-height);
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 移动端优化 */
@media (max-width: 640px) {
    .image-suggestion {
        margin: 12px 0;
        padding: 12px 15px;
        font-size: 0.85em;
    }

    .video-container {
        margin: 1.5em 0;
        padding: 1em;
    }

    .video-container h3 {
        font-size: 1.1em;
        margin-bottom: 0.6em;
    }

    .video-container p {
        font-size: 0.9em;
        margin-bottom: 0.8em;
    }
}
