:root {
    --text-color: rgb(40,40,40);
}
body {
    margin: 0;
    background: rgb(29,161,242);
}
* {
    font-family: 'Cascadia Mono', '微软雅黑';
    transition: all .7s;
}
*::selection {
    background: rgb(29,161,242);
    color: white;
}
.root {
    position: absolute;
    left: 0;
    background: inherit;
    width: 100%;
}
.main {
    position: relative;
    top: 86px;
    width: 100%;
    display: flex;
    margin-bottom: 50px;
}
.menu {
    position: fixed;
    width: 100%;
    background-color: rgb(230,230,230);
    box-shadow: 2px 0px 5px rgb(150,150,150);
    z-index: 100;
}
.content {
    position: relative;
    margin: 21px 21px 21px 0;
    background-color: rgb(250,250,250);
    padding: 30px;
    box-shadow: 2px 2px 5px rgb(200,200,200);
}
.content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(90deg,
            rgba(0, 0, 0, 0.05) 1px,
            transparent 1px),
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 10;
    /* Allow clicking through the pattern layer */
}
.content * {
    position: relative;
    z-index: 20;
}
.red {
    color: rgb(224,36,94);
}
.red::selection {
    background-color: rgb(224,36,94);
    color: white;
}
.yellow {
    color: rgb(255, 251, 0);
}
.yellow::selection {
    background-color: rgb(255, 251, 0);
    color: black;
}
.lightgreen {
    color: rgb(181,230,29);
}
.lightgreen::selection {
    background-color: rgb(181,230,29);
    color: black;
}
.green {
    color: green;
    text-decoration: none;
}
.green::selection {
    background-color: green;
    color: white;
}
.cyan {
    color: rgb(0,255,191);
    text-decoration: none;
}
.cyan::selection {
    background-color: rgb(0,255,191);
    color: black;
}
.lightblue {
    color: rgb(29,161,242);
    text-decoration: none;
}
.lightblue::selection {
    background-color: rgb(29,161,242);
    color: white;
}
.purple {
    color: rgb(150,50,250);
    text-decoration: none;
}
.purple::selection {
    background-color: rgb(150,50,250);
    color: white;
}
.pink {
    color: #ff00bf;
    text-decoration: none;
}
.pink::selection {
    background-color: #ff00bf;
    color: white;
}
header {
    font-size: 150%;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #00ffbf;
}

header::selection {
    background-color: #00ffbf;
    color: black;
}

.colourful {
    display: inline-block;
    padding: 2px 6px;
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

.colourful::selection {
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
    color: black;
}
.lightgray, i, .fangshi a {
    color: inherit;
}
.sticky {
    padding: 10px;
    color: rgb(80,80,80);
    transition: all 1s;
    border-style: solid;
    border-width: 1px;
    border-color: rgb(200,200,200);
    border-radius: 10px;
    position: sticky;
    transition: all 1s;
    background-color: rgb(250,250,250);
    box-shadow: 2px 2px 5px rgb(200,200,200);
}
.sticky:hover {
    color: black;
    border-radius: 25px;
    padding: 25px;
    margin-left: 6%;
}
.sticky[nomove]:hover {
    padding: 10px;
    border-radius: 10px;
}
.stickybox:hover {
    margin-right: 6%;
}
.stickybox[nomove]:hover {
    margin-right: 4%;
}
.stickybox {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 4%;
    margin-top: 21.44px;
    transition: all 1s;
}
.fangshi ul {
    list-style-type: none;
}
.projects, .posts, .diary {
    margin-top: 21.44px;
    color: rgb(100,100,100);
    transition: all 1s;
}
.projects:hover, .posts:hover, .diary:hover {
    color: var(--text-color);
}
a {
    color: var(--text-color);
}
.menu {
    padding: 22px;
    color: rgb(181,230,29);
}
h1 {
    margin: 0;
}
ul {
    list-style-type: none;
    padding-left: 0;
}
.list {
    margin-top: 50px;
}
.diary table, .diary th, .diary td {
    border-style: solid;
    border-width: 1px;
    margin: 20px 0;
    border-spacing: 0;
}
/* From Uiverse.io by cssbuttons-io */
a button {
    --bcolor: rgb(78, 167, 45);
    font-family: inherit;
    display: inline-block;
    width: 8em;
    height: 2.6em;
    line-height: 2.5em;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid var(--bcolor);
    transition: color 0.5s;
    z-index: 1;
    font-size: 17px;
    border-radius: 6px;
    font-weight: 500;
    color: var(--bcolor);
}

a button:before {
    content: "";
    position: absolute;
    z-index: -1;
    background: var(--bcolor);
    height: 150px;
    width: 200px;
    border-radius: 50%;
}

a button:hover {
    color: #fff;
}

a button:before {
    top: 100%;
    left: 100%;
    transition: all 0.7s;
}

a button:hover:before {
    top: -30px;
    left: -30px;
}

a button:active:before {
    background: rgb(48, 137, 15);
    transition: background 0s;
}
.smallavt {
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-style: solid;
    border-color: rgb(200,200,200);
    border-width: 1px;
    overflow: hidden;
}
.llg {
    color: rgb(250,250,250);
}
z {
    font-size: 12px;
    display: block;
}
span {
    color: orange;
    font-weight: bold;
    font-size: 30px;
}
span::selection {
    background-color: orange;
    color: white;
}
.list li {
    margin-bottom: 30px;
}
.kttext {
    font-family: '楷体';
    font-size: 18px;
}
.highbox {
    background-color: rgb(173, 173, 173);
    margin-bottom: 20px;
    border-radius: 20px;
    padding: 20px;
}
tr.esp {
    background-color: rgb(133, 220, 255);
}
#dark-mode-toggle {
    --bcolor: rgb(84, 84, 84);
    font-family: inherit;
    display: inline-block;
    width: 8em;
    height: 2.6em;
    line-height: 2.5em;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid var(--bcolor);
    transition: color 0.5s;
    z-index: 1;
    font-size: 17px;
    border-radius: 6px;
    font-weight: 500;
    color: var(--bcolor);
}

#dark-mode-toggle:before {
    content: "";
    position: absolute;
    z-index: -1;
    background: var(--bcolor);
    height: 150px;
    width: 200px;
    border-radius: 50%;
}

#dark-mode-toggle:hover {
    color: #fff;
}

#dark-mode-toggle:before {
    top: 100%;
    left: 100%;
    transition: all 0.7s;
}

#dark-mode-toggle:hover:before {
    top: -30px;
    left: -30px;
}

#dark-mode-toggle:active:before {
    background: rgb(39, 39, 39);
    transition: background 0s;
}
.popupbtn {
    background-color: rgb(250,250,250);
    border-style: solid;
    border-width: 1px;
    border-color: rgb(200,200,200);
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}
.popupbtn:hover {
    background-color: rgb(220,220,220);
}
.postcard {
    background-color: rgb(250,250,250);
    padding: 20px;
    box-shadow: 2px 2px 5px rgba(200,200,200,0.7);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
pre {
    background-color: rgb(240,240,240);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Cascadia Mono', Consolas, monospace;
}

/* 深色模式样式 */
.dark-mode .content {
    background-color: #121212; /* 背景颜色 */
    color: #ffffff; /* 字体颜色 */
    --text-color: #eee;
}
.dark-mode .content::before {
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.dark-mode .menu {
    background-color: #1e1e1e; /* 菜单背景颜色 */
}

.dark-mode .sticky {
    background-color: #1e1e1e; /* 便签背景颜色 */
    border-color: #444; /* 便签边框颜色 */
    color: #ffffff; /* 便签字体颜色 */
}

.dark-mode #talk-board .tb {
    background-color: #222; /* 留言板背景颜色 */
    color: #ffffff; /* 留言板字体颜色 */
    border-color: #444; /* 留言板边框颜色 */
}
.dark-mode input, .dark-mode textarea {
    background-color: #333; /* 输入框背景颜色 */
    color: #ffffff; /* 输入框字体颜色 */
    border-color: #555; /* 输入框边框颜色 */
}
.dark-mode .popupbtn {
    background-color: #222; /* 弹出按钮背景颜色 */
    color: #ffffff; /* 弹出按钮字体颜色 */
    border-color: #444; /* 弹出按钮边框颜色 */
}
.dark-mode .popupbtn:hover {
    background-color: #666; /* 弹出按钮悬停背景颜色 */
}
.dark-mode tr.esp {
    background-color: rgba(133, 220, 255, 0.75); /* 表格行背景颜色 */
}
.dark-mode .highbox {
    background-color: #ccc; /* 高亮框背景颜色 */
    color: #000; /* 高亮框字体颜色 */
}
.dark-mode .modal-dialog {
    background-color: #1e1e1e; /* 模态对话框背景颜色 */
    color: #ffffff; /* 模态对话框字体颜色 */
    border-color: #444; /* 模态对话框边框颜色 */
}
.dark-mode .modal-header, .dark-mode .mac-titlebar {
    background-color: #2c2c2c; /* 模态对话框标题栏背景颜色 */
    border-bottom-color: #444; /* 模态对话框标题栏边框颜色 */
    color: #ffffff; /* 模态对话框标题栏字体颜色 */
}
.dark-mode pre {
    background-color: #333; /* 代码块背景颜色 */
    color: #ffffff; /* 代码块字体颜色 */
    font-family: 'Cascadia Mono', Consolas, monospace;
}

