body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
}

.container {
    display: flex;
    position: fixed;
    height: 100vh;
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: 10px;
    gap: 10px;
}

.sidebar {
    width: 20%;
    background: var(--sidebar-bg);
    padding: 10px;
    border-radius: 20px;
    transition: width 0.3s ease; /* 平滑过渡效果 */
}

.sidebar.hidden {
    width: 0;
    visibility: hidden;
}

.content {
    flex: 1;
    font-family: "Times New Roman", "Songti SC", "STSongti", "Songti", "宋体", sans-serif;
    padding: 8px;
    font-size: 20px;
    overflow-y: scroll;
    transition: flex-basis 0.3s ease; /* 平滑过渡效果 */
}

.annotations {
    visibility: visible;
    width: 28%;
    background: var(--sidebar-bg);
    padding: 10px;
    border-radius: 20px;
    height: 95%;
    transition: width 0.3s ease; /* 平滑过渡效果 */
}

.annotations.hidden {
    width: 0;
    visibility: hidden;
}


/* 列表样式 */
.sidebar ul,
.annotations ul {
    list-style: none;
    /* 去掉默认的列表点 */
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    height: 78vh;
}

/* 列表项样式 */
.sidebar li {
    margin-bottom: 5px;
    /* 列表项之间的间隔 */
}

/* 链接样式 */
.sidebar li,
.annotations li {
    display: block;
    /* 块级元素，占满整个列表项 */
    padding: 10px;
    /* 内边距 */
    text-decoration: none;
    /* 去掉下划线 */
    color: var(--text-color);
    /* 字体颜色 */
    border-radius: 10px;
    /* 圆角 */
    transition: background-color 0.3s, color 0.3s;
    /* 平滑过渡效果 */
}

/* 鼠标悬停效果 */
.sidebar li:hover,
.annotations li:hover {
    background-color: var(--active-item-bg);
    /* 悬停时的背景色 */
    color: var(--text-color);
    /* 悬停时的字体颜色 */
    .anno-content {
        color: var(--active-item-bg);
    }
    .anno-content.show {
        color: var(--text-color);
    }
}

.sidebar li:hover {
    cursor: pointer;
}

/* 选中状态样式 */
.sidebar li.active {
    background-color: var(--active-item-bg);
    /* 选中时的背景色 */
    color: var(--text-color);
    /* 选中时的字体颜色 */
    font-weight: bold;
    /* 加粗字体 */
}

h2 {
    font-weight: 900;
}

.body-text {
    line-height: 2.0;
    /* 设置行距为1.5倍 */
    text-indent: 2em;
    color: var(--text-color);
}

#text.translation-state {
    text-indent: 0;
}

#text.hidden-state {
    sup {
        display: none;
    }
    .highlight {
        background-color: var(--bg-color);
        border: none;
        padding: 0;
        text-decoration: none;
        font-weight: normal;
    }
}

.body-text h3 {
    text-indent: 0;
    font-weight: 800;
    margin-block-start: 0px;
    margin-block-end: 0px;
}

.body-text p {
    margin-block-start: 0px;
    margin-block-end: 0.5em;
}

/* 高亮部分的样式 */
.highlight {
    font-weight: bold;
    background-color: #ffdead;
    /* 淡橙色背景 */
    border-radius: 8px;
    /* 设置圆角，可根据需要调整 */
    padding: 3px 5px;
    /* 为高亮部分添加一些内边距 */
}

.tooltip {
    position: absolute;
    background: black;
    opacity: 70%;
    color: white;
    padding: 5px;
    border-radius: 5px;
    font-size: 14px;
    display: none;
}

/* #toggle-annotations, #toggle-sidebar {
    font-family: 'SF Pro';
    padding: 5px 10px;
    background-color: var(--active-item-bg);
    color: var(--text-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    z-index: 1000;
    transition: background-color 0.3s, color 0.3s;
} */

#toggle-annotations {
    position: fixed;
    top: 20px;
    right: 20px;
}

#toggle-sidebar {
    position: fixed;
    top: 20px;
    right: 70px;
}

.anno-content {
    color: var(--sidebar-bg);
    font-family: 'Kaiti SC', '楷体', 'Kaiti', 'STKaiti', 'STKaiti SC';
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.anno-content.show {
    color: var(--text-color);
}

#toggle-anno-content {
    color: var(--text-color);
    padding: 0px 7px;
    cursor: pointer;
}

.filter-menu {
    display: inline-block;
    height: 40px;
}

.type-menu, .filter-menu {
    color: color(--text-color);
    padding: 5px;
    border-radius: 5px;
    display: flex;
    gap: 4px;
    justify-content: space-between; /* 按钮之间均匀分布 */
    align-items: center; /* 垂直居中 */
    padding: 10px;
    transition: height 0.3s ease;
    button {
        display: block;
        transition: box-shadow 0.3s;
    }
    .red-underline {
        background-color: var(--bg-color);
    }
}

.type-menu.unshow {
    padding: 0;
    height: 0;
    button {
        display: none;
    }
    /* display: none;*/
}

.type-menu button, .filter-menu button {
    font-family: 'Fira Code', 'SF Mono', monospace;
    /* font-size: 14px;*/
    display: block;
    border: none;
    color: var(--text-color);
    border-radius: 10px;
    padding: 2px 5px;
    cursor: pointer;
    width: 40px;
    height: 30px;
}

.gray {
    background-color: var(--gray-bg);
}

.yellow {
    background-color: var(--yellow-bg);
}

.green {
    background-color: var(--green-bg);
}

.red {
    background-color: var(--red-bg);
}

.red-underline {
    /* background-color: #e0e0e0;*/
    text-decoration: red underline;
}

.circle-capsule {
    color: var(--text-color);
    font-family: Helvetica, Arial, sans-serif;
    text-align: center;
    display: inline-block;
    width: 30px;
    height: 20px;
    border-color: var(--border-color);
    border-width: 0px; 
    border-style: solid;
    border-radius: 15px;
    margin-right: 5px;
}

.circle-capsule.red-underline {
    font-weight: bold;
    width: 28px;
    height: 18px;
    border-width: 2px;
    text-decoration: none !important;
}

.type-menu button.bordered, .filter-menu button.bordered {
    font-weight: bold;
    border-style: solid;
    border-width: 2px;
    border-color: var(--border-color);
    box-shadow: 1px 1px 2px rgba(80, 80, 80, 0.5);
}

.red-underline.bordered {
    border-color: rgb(150, 0, 0) !important;
}

.global-btn {
    height: 28px;
    display: inline-block;
    font-family: 'SF Pro';
    padding: 7px 10px;
    background-color: var(--active-item-bg);
    color: var(--text-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s, color 0.3s;

    img {
        height: 100%;
    }
}

#edit-btn {
    margin-left: 5px;
}

.global-btn:hover {
    background-color: var(--active-btn-bg);
    color: var(--text-color);
}

#annotext-title {
    display: inline-block;
    padding: 5px;
    font-size: 24px;
    font-family: 'SF Mono', monospace;
    color: var(--text-color);
}


@keyframes flash {
    0% { background-color: rgb(255, 239, 0); box-shadow: 0 0 20px rgb(255, 60, 0); }
    40% { background-color: rgb(255, 239, 0); box-shadow: 0 0 50px rgb(255, 60, 0); }
    50% { background-color: rgb(255, 239, 0); box-shadow: 0 0 50px rgb(255, 60, 0); }
    100% { background-color: rgb(255, 239, 0); box-shadow: 0 0 0px rgb(255, 60, 0)}
}

.flash-highlight {
    animation: flash 0.5s ease-in-out;
}

#filter-label {
    color: var(--text-color);
    display: inline;
}

#text-title {
    display: inline-block;
    color: var(--text-color);
}

/* 右键菜单 */

.context-menu {
    display: none;
    position: absolute;
    background-color: var(--bg-color);
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.context-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.context-menu li {
    color: var(--text-color);
    font-size: smaller;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 10px;
}

.context-menu li:last-child {
    border-bottom: none;
}

.context-menu li:hover {
    background-color: var(--active-item-bg);
}

/* 遮罩层 - 弹出时模糊背景 */
#overlay {
    visibility: hidden;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px); /* 模糊效果 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 编辑框样式 */
#editorContainer {
    width: 50%;
    height: 60%;
    background-color: var(--sidebar-bg);
    color: var(--text-color);
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    transition: 0.3s;
}

#textEditor {
    resize: none;
    height: 80%;
    font-family: monospace; /* 等宽字体 */
    font-size: 16px;
    background-color: var(--sidebar-bg);
    color: var(--text-color);
    padding: 10px;
    border: none;
}

#editorContainer button {
    margin-top: 10px;
}

#testContainer {
    position: relative;
    width: 30%;
    height: 30%;
    background-color: var(--sidebar-bg);
    color: var(--text-color);
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    transition: 0.3s;
}

#test-cnt {
    font-size: 12px;
    font-weight: normal;
    color: var(--bad-text-color);
    font-family: monospace;
    display: inline;
}

.btn-container {
    position: absolute;
    bottom: 20px;
}

#dockbar {
    display: flex;
    flex-direction: row;      /* 从左到右排列（默认） */
    justify-content: flex-start; /* 从左开始，不留空隙 */
    align-items: center;      /* 垂直居中（可选） */
    gap: 10px;               /* 按钮之间的间距 */
    position: sticky;
    bottom: 10px;
    margin: auto;
    width: fit-content;
    background: var(--sidebar-bg);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#dockbar-text {
    font-size: 12px;
    text-align: right;
    font-style: italic;
    color: var(--bad-text-color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.divider {
    width: 1px;                 /* 细线 */
    height: 24px;               /* 高度和 dock 栏子项一致 */
    background-color: #ccc;     /* 分隔线颜色 */
    margin: 0 0px;             /* 左右间距 */
}

.translation-text {
    line-height: 1.5;
    font-size: 18px;
    color: var(--bad-text-color);
    font-family: 'Kaiti SC', '楷体', 'Kaiti', 'STKaiti', 'STKaiti SC';
}