/* 内联 SVG 图标样式（替代 Font Awesome 字体图标） */
.fa-icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

/* 回到顶部按钮样式 */
.btnbacktop {
    font-size: 1.5rem;
    width: 3.33rem;
    height: 3.33rem;
    line-height: 0;
    color: #333;
    background-color: #cceae5;
    border: 1px solid #e3e8ee;
    border-radius: 90%;
    box-shadow: 0 0 5px rgba(0, 0, 0, .05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 添加移动端触摸优化 */
    touch-action: manipulation;
    /* 确保在高DPI屏幕上清晰显示 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 弹窗公告样式 */
#popup {
    position: fixed;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 460px;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(205, 239, 250, 0.9), rgba(163, 217, 255, 0.9));
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    user-select: none;
    animation: fadeIn 0.5s ease-in-out;
    max-width: 400px;
    border: 1px solid #ccc;
}

#popup p {
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.6;
    color: rgba(51, 51, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#notice-button {
    display: block;
    margin: 0 auto;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #0077cc;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color .3s ease-in-out, transform .3s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#notice-button:hover {
    background-color: #005fa3;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

#notice-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 导航链接样式 */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    outline: none;
}

.nav-link:hover {
    background-color: transparent;
}

/* 下拉列表样式 */
.droplist {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 1);
    box-shadow: none;
    border-radius: 8px;
    padding: 8px 0;
    min-width: 120px;
    z-index: 1000;
    overflow: hidden;
    border: none;
    outline: none;
    clip-path: inset(0 round 8px);
}

.droplist li {
    float: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
}

.droplist a {
    height: auto;
    padding: 12px 20px;
    font-size: 16px;
    justify-content: flex-start;
    color: #444;
    background: transparent;
    border-radius: 0;
}

.droplist a:hover {
    background-color: rgba(32, 159, 233, 0.1);
    transform: none;
    border-radius: 0;
}

.nav-link:hover .droplist {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

.nav-link:hover .droplist a {
    display: block;
    /* 悬停时显示 */
}

.droplist a:hover::after {
    display: none;
}

/* 个性化设置按钮样式 */
.settings-button {
    font-size: 2rem;
    width: 3.33rem;
    height: 3.33rem;
    color: #333;
    background-color: #cceae5;
    border: 1px solid #e3e8ee;
    border-radius: 90%;
    box-shadow: 0 0 5px rgba(0, 0, 0, .05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 添加移动端触摸优化 */
    touch-action: manipulation;
    /* 确保在高DPI屏幕上清晰显示 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 设置面板样式 */
.settings-panel {
    position: fixed;
    right: 8rem;
    bottom: 2em;
    width: 300px;
    max-width: 90vw;
    height: 400px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    user-select: none;
}

/* 自定义滚动条样式 - Webkit内核浏览器 */
.settings-panel::-webkit-scrollbar {
    width: 6px;
    margin-right: 2px;
}

.settings-panel::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    background-clip: content-box;
}

.settings-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-panel h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
    cursor: move;
    user-select: none;
}

/* 设置面板中不可选择的元素 */
.settings-section,
.settings-section h4,
.settings-options,
.settings-option {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.settings-section {
    margin-bottom: 1rem;
}

.settings-section h4 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    text-align: left;
    padding: 0;
}

.settings-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.settings-option {
    flex: 1 1 calc(50% - 0.5rem);
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.settings-option:hover {
    background-color: #e9e9e9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 滚动选项按钮样式 - 更接近notice-button的样式 */
.scroll-option {
    padding: 0.8rem 1rem;
    /* 保持与settings-option一致的padding */
    border-radius: 20px;
    /* 接近notice-button的圆角效果 */
    font-weight: 500;
    /* 适中的字体粗细 */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.scroll-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    /* 更强的阴影效果，类似notice-button */
}

.scroll-option:active {
    transform: translateY(0);
    /* 恢复原始位置 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* 减弱阴影效果 */
}

.theme-option {
    flex: 1 1 calc(33.333% - 0.5rem);
    font-weight: bold;
}

/* 弹窗选项选中状态 */
.popup-option.selected {
    background-color: #007bff;
    color: white;
}

/* 滚动文本容器样式 */
.scroll-container {
    overflow: hidden;
    white-space: nowrap;
    width: 300px;
    height: 40px;
    z-index: 99;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 4px 8px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin: 0 auto 8px;
    /* 确保文本垂直居中 */
    display: flex;
    align-items: center;
    /* 初始隐藏 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    position: relative;
}

/* 滚动文本包装容器 */
.scroll-text-wrapper {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    /* 移除padding-right，不再需要为克隆文本预留空间 */
}

/* 滚动文本内容 */
.scroll-text {
    display: flex;
    font-weight: bold;
    color: #5d9cdb;
    font-size: 14px;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
    position: relative;
    white-space: nowrap;
    /* 优化文本间距 */
    letter-spacing: 0.5px;
    /* 确保文本块可以自由移动 */
    width: fit-content;
    /* 移除动画属性，将由JavaScript控制 */
    /* animation: scroll 20s linear infinite; */
}

/* 显示状态的类 */
.scroll-container.visible {
    opacity: 1;
    visibility: visible;
}

/* 滚动文本链接样式 */
.scroll-text a {
    color: #ff6b6b;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: bold;
}

.scroll-text a:hover {
    color: #ff8e8e;
    text-decoration: underline;
}

.scroll-container:hover .scroll-text {
    animation-play-state: paused;
}

/* 移动端禁用滚动文本链接的hover效果 */
@media (max-width: 768px) {
    .scroll-text a:hover {
        color: #ff6b6b !important;
        text-decoration: none !important;
    }
}





/* Details/Summary元素样式 */
details {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    margin-top: 20px;
    background-color: #f9f9f9;
}

details[open] summary {
    color: #0056b3;
}

summary {
    list-style: none;
    cursor: pointer;
    font-weight: bold;
    color: #007BFF;
}

summary::-webkit-details-marker {
    display: none;
}

summary:active {
    font-style: oblique;
}

/* 更多按钮和链接容器样式 */
.more {
    margin-top: 20px;
    padding: 15px 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.more:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.more p {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

/* 链接容器样式 */
.more-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    padding: 5px 0;
}

.more a {
    transition: all 0.3s ease;
    padding: 8px 12px;
    display: block;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.more a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.more a:link {
    color: #4a6cf7;
}

.more a:visited {
    color: #7b61ff;
}

.more a:hover {
    background: rgba(74, 108, 247, 0.08);
    color: #3254f7;
    text-decoration: none;
    transform: translateY(-2px);
}

.more a:hover::after {
    width: 100%;
}

.more a:active {
    color: #1f46e0;
    transform: translateY(0);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}