::-webkit-scrollbar-track {
    background: transparent; /* 滚动条轨道背景色透明 */
}
::-webkit-scrollbar {
    width: 10px; /* 滚动条宽度 */
}
::-webkit-scrollbar-thumb {
    background: #888; /* 滚动条滑块颜色 */
    border-radius: 6px; /* 滑块圆角 */
}

::-webkit-scrollbar-thumb:hover {
    background: #555; /* 滑块悬停颜色 */
}
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #555;
    scroll-behavior: smooth;
}
a {
    text-decoration: none;
}
a:visited{
    color: #555;
}
a:link {
    color: #555;
}
.nav {
    background-color: #555;
    color: white;
    position: fixed;
    top: 30%;
    transform: translateY(-50%);
    padding: 1em;
    overflow-y: auto;
    margin-left: 3%;
    border-radius: 1.2em;
    z-index: 10;
}
.nav div {
    text-align: center;
    cursor: pointer;
}
.nav ul {
    list-style-type: none;
    padding: 0;
}
.nav ul li {
    margin: 20px 0;
}
.nav ul li a {
    color: white;
    text-decoration: none;
}
.content {
    margin-left: 10%;
    width: 80%;
    padding: 20px;
}
.group-container {
    margin-bottom: 20px;
}
.card-wrapper {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, 1fr);
}
.card-container {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* width: calc(25% - 10px); */
    box-sizing: border-box;
    position: relative;
}
.footer {
    text-align: center;
    margin: 20px;
}
@media (max-width: 1200px) {
    .card-wrapper {
        grid-template-columns: repeat(3, 1fr); /* 每行3个项目 */
    }
}

@media (max-width: 900px) {
    .card-wrapper {
        grid-template-columns: repeat(2, 1fr); /* 每行2个项目 */
    }
}

@media (max-width: 600px) {
    .card-wrapper {
        grid-template-columns: 1fr; /* 每行1个项目 */
    }
}
.card-icon {
    font-size: 40px;
    margin-right: 20px;
}
.card-content {
    flex-grow: 1;
}
.card-title {
    font-weight: bold;
    font-size: 1.2em;
}
.card-tag {
    color: #888;
    font-size: 0.9em;
    padding: 0.5em 0;
}
.card-tag span {
    border: 1px solid #ddd; /* 边框宽度、样式和颜色 */
    padding: 2px 4px; /* 内边距 */
    border-radius: 8px; /* 圆角边框 */
    margin: 2px;
    text-wrap: nowrap;
}
.card-summary {
    color: #666;
    font-size: 0.9em;
}
.card-buttons {
    display: none;
    right: 10px;
    top: 10px;
    flex-direction: column;
    position: absolute;
}
.card-container:hover .card-buttons {
    display: flex;
}
.card-button {
    background-color: #555;
    color: white;
    border: none;
    padding: 5px 10px;
    margin: 2px 0;
    cursor: pointer;
    border-radius: 3px;
}
.search label{
    font-size: large;
    padding: 10px;
}
.search label span {
    padding: 4px;
}
.search label span:has(+input[required])::after{
    content: "*";
    color: red;
}
.search input {
    border: 1px solid #ddd; /* 边框宽度、样式和颜色 */
    border-radius: 0.5em;
    padding: 0.5em;
    font-size: 1.6em;
}
.search_button {
    text-align: center;
}
.search_button > button {
    margin: 10px;
}
.search_button.msg {
    color: red;
    padding: 10px;
}
@keyframes colorChange {
    0% {
        background-color: #FFEB3B;
        color: black;
    }
    50% {
        background-color: black;
        color: #FFEB3B;
    }
    100% {
        background-color: #FFEB3B;
        color: black;
    }
}
.search_result {
    background-color: black;
    border: 1px solid #fff;
    border-radius: 5px;
    padding: 2px;
    color: #FFEB3B;
    animation: colorChange 1.5s infinite
}

/* 夜间模式 */
body.night-mode {
    background-color: #2c2c2c;
    color: #ccc;
}
.night-mode .card-container {
    background-color: #444;
    border-color: #555;
}
.night-mode .card-title {
    color: #fff;
}
.night-mode .card-tag {
    color: #bbb;
}
.night-mode .card-summary {
    color: #aaa;
}
.night-mode .nav {
    background-color: #444;
    color: #ccc;
}
.night-mode .nav ul li a {
    color: #ccc;
}
.night-mode .card-button {
    background-color: #555;
}
.night-mode .search_button {
    background-color: #444;
    color: #ccc;
}
.night-mode dialog{
    background-color: #444;
    color: #ccc;
}
.night-mode dialog input {
    background-color: #ddd;
}
dialog {
    border: 1px solid #ddd; /* 边框宽度、样式和颜色 */
    border-radius: 1em;
}
dialog::backdrop {
    backdrop-filter: blur(1px);
}
dialog input {
    outline: none;
    box-shadow: none;
}
dialog button {
    font-size: 1.5em;
}
.shake {
    animation: shake 0.5s;
    animation-iteration-count: 1;
}

@keyframes shake {
0% { transform: translate(1px, 1px) rotate(0deg); }
10% { transform: translate(-1px, -2px) rotate(-1deg); }
20% { transform: translate(-3px, 0px) rotate(1deg); }
30% { transform: translate(3px, 2px) rotate(0deg); }
40% { transform: translate(1px, -1px) rotate(1deg); }
50% { transform: translate(-1px, 2px) rotate(-1deg); }
60% { transform: translate(-3px, 1px) rotate(0deg); }
70% { transform: translate(3px, 1px) rotate(-1deg); }
80% { transform: translate(-1px, -1px) rotate(1deg); }
90% { transform: translate(1px, 2px) rotate(0deg); }
100% { transform: translate(1px, -2px) rotate(-1deg); }
}