/* 基础样式 - 从css.css复制 */
html {
    overflow-y: scroll; /*始终为页面预留滚动条宽度，避免页面抖动*/
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
@font-face{
	font-family:mono;src:url(mono.ttf) format("opentype");font-weight:400;
}
body {
    font-family: "Helvetica Neue", "Luxi Sans", "Segoe UI", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, "Apple Logo";
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 搜索框相关样式 */
.search-container {
    display: flex;
    align-items: center;
    height: 37px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #cccccc;
    overflow: visible;
    position: relative;
    z-index: 1000;
    margin-left: 20px;
    box-sizing: border-box;
    width: 390px;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
    padding: 0 8px;
}

.search-suggestions {
    width: calc(100% + 2px);
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #cccccc;
    display: none;
    position: absolute;
    left: 0;
    transform: none;
    margin-top: -3px;
    z-index: 999;
    box-sizing: border-box;
    top: 45px;
}

.search-suggestions.active {
    display: block;
    position: absolute;
    width: calc(100% + 2px);
    
    border-radius: 0 0 10px 10px;
    border: 1px solid #444;
    border-top: none;
    top: 39px;
    margin-top: -3px;
    left: -1px;
    transform: none;
    background: #ffffff;overflow: hidden;
}

.search-container.suggestions-active {
    border-color: #444;
    border-radius: 10px 10px 0 0;
    border-bottom: none;background-color: #fff;
}

.suggestions-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px 0px 10px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.clear-history {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 5px;
}

.clear-history:hover {
    color: #666;
}

.history-list, .suggestions-list {
    padding:   0;
}

.history-item, .suggest-item {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;font-size: 14px;
    align-items: center;    border-bottom: 1px solid #eee;
}
body.dark-mode .history-item, body.dark-mode .suggest-item {
    border-bottom: 1px solid #444;
}

.history-item:hover, .suggest-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.history-item i, .suggest-item i {
    color: #999;
    font-size: 14px;
}

.search-engine-selector {
    position: relative;
    padding-left: 10px;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.current-engine-icon {
    margin-right: 5px;
    vertical-align: middle;
    width: 16px;
    height: 16px;
}

.dropdown-arrow {
    fill: #666;
    margin-right: 5px;
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.search-engine-selector:hover .dropdown-arrow {
    fill: #333;
}

.engine-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 4px;
    display: none;
    width: 150px;
    z-index: 1000;
    margin-top: 5px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #cccccc;
    border-radius: 5px;
    overflow: hidden;
}

.engine-option {font-size: 14px;
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.engine-option img {
    margin-right: 8px;
    vertical-align: middle;
    width: 16px;
    height: 16px;
}

.engine-option:hover {
    background-color: #f5f5f5;
}

#searchInput {
    flex-grow: 1;
    height: 100%;
    border: none;
    padding: 0px;
    font-size: 14px;
    background: none;
    outline: none;
    width: 100%;
}

.search-button {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button .icon-search {
    color: #666;
    width: 18px;
    height: 18px;
}

body.dark-mode .search-button .icon-search {
    color: #aaa;
}

.search-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    cursor: pointer;
    display: none;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
}

.clear-search-btn:hover {
    color: #666;
}

.delete-history-item {
    margin-left: auto;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
}

.delete-history-item:hover {
    color: #666;
}

.engine-group-title {
    padding: 6px 10px;
    background-color: #f5f5f5;
    color: #999;
    font-size: 12px;
    font-weight: bold;
}

.engine-group {
    border-bottom: 1px solid #eee;
}

.engine-group:last-child {
    border-bottom: none;
}

/* 暗黑模式适配 */
body.dark-mode .search-container {
    background: #333;
    border-color: #444;
}

body.dark-mode #searchInput {
    color: #eee;
}

body.dark-mode .search-suggestions {
    background: #333;
    border-color: #444;
}

body.dark-mode .search-suggestions.active {
    border-color: #555;
    background: #333;
}

body.dark-mode .search-container.suggestions-active {
    border-color: #555;
}

body.dark-mode .suggestions-title {
    border-bottom: 1px solid #444;
    color: #ccc;
}

body.dark-mode .clear-history {
    color: #888;
}

body.dark-mode .clear-history:hover {
    color: #aaa;
}

body.dark-mode .history-item, 
body.dark-mode .suggest-item {
    color: #ddd;
}

body.dark-mode .history-item:hover, 
body.dark-mode .suggest-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .engine-dropdown {
    background: #2c2c2c;
    border-color: #555;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

body.dark-mode .engine-option {
    color: #ddd;
}

body.dark-mode .engine-option:hover {
    background-color: #444;
}

body.dark-mode .engine-group-title {
    background-color: #222;
    color: #888;
}

body.dark-mode .engine-group {
    border-bottom: 1px solid #444;
}

body.dark-mode .clear-search-btn {
    color: #888;
}

body.dark-mode .clear-search-btn:hover {
    color: #aaa;
}

body.dark-mode .delete-history-item {
    color: #888;
}

body.dark-mode .delete-history-item:hover {
    color: #aaa;
}

header {
    text-align: center;
    margin-bottom: 15px!important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

/* Logo样式 */
.logo {
    display: flex;
    justify-content: flex-start;
    width: auto;
    font-size: 18px;
    height: 30px;
    line-height: 30px;
    min-width: 123px;
    text-align: left;
}
.logo img {
    width: 15px;
    height: 28px;
    margin: 0px 5px 0px 0px;
    float: left;
}
#normal-logo {
    text-align: left;
    width: 100%;
}
#normal-logo a {
    color: #333;
    text-decoration: none;
}
body.dark-mode #normal-logo a {
    color: #ccc;
    text-decoration: none;
}

/* 控制按钮容器 */
.controls-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* 暗黑模式切换按钮 */
.dark-mode-container {
    background: none !important;
    position: static !important;
}
.dark-mode-toggle {
    background: none !important;
    border: none;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.dark-mode-toggle svg {
    width: 18px;
    height: 18px;
    stroke: #666;
}
.dark-mode .dark-mode-toggle svg {
    stroke: #ccc !important;
}

/* 设置按钮样式 */
.settings-container {
    position: relative;
    background: none !important;
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.settings-toggle, .dark-mode-toggle {
    height: 40px;
    border-radius: 50%;
    background: none !important;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
}
.settings-toggle svg {
    transition: all 0.3s;
    width: 18px;
    height: 18px;
    stroke: #666;
}
.dark-mode .settings-toggle svg {
    stroke: #ccc !important;
}

/* 搜索切换按钮 */
.search-toggle {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: none; /* 默认不显示，移动端才显示 */
    align-items: center;
    justify-content: center;
    padding: 0;
}
.search-toggle img {
    width: 18px;
    height: 18px;
    color: #666;
}
body.dark-mode .search-toggle img {
    filter: invert(0.7);
}

/* 搜索背景遮罩 */
.search-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1050;
}
body.search-open .search-backdrop {
    display: block;
}
body.search-open .search-container {
    display: flex;
}

body.search-open .search-toggle {
    color: #1890ff;
}

/* 隐藏平台管理按钮 */
.hidden-platforms-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    display: none;
    padding: 0;
    width: 24px;
    height: 24px;
    margin-right: 5px;
}
body.dark-mode .hidden-platforms-btn {
    color: #ddd;
}
body.sorting-mode .hidden-platforms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin: 20px 10px 20px 10px;
    color: #999;
    font-size: 11px;
    line-height: 24px;
}
footer a {
    color: #999;
    font-size: 11px;
    text-decoration: none;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 37px;
    right: 18px;
    width: 29px;
    height: 29px;
    border-radius: 30%;
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.back-to-top.visible {
    opacity: 1;
}
.back-to-top svg {
    width: 29px;
    height: 29px;
}
.dark-mode .back-to-top {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 暗黑模式基本样式 */
body.dark-mode {
    background-color: #222;
    color: #eee;
}

/* 卡片样式 - 保留原有的card.css内容 */
.container {
    max-width: 1600px !important;
    margin: 0 auto;
    padding: 20px;
    position: relative;
 
}
 /* 卡片样式 */
 .platform-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 10px;
}

.platform-card {
    flex: 1 0 300px;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #fff;
    overflow: visible; /* 修改为visible以便hide-card-btn可以显示在外部 */
    transition: none; /* 移除过渡动画 */
}

/* Use CSS Grid for desktop to prevent last row stretching */
@media (min-width: 1400px) {
    .platform-cards {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding-top: 10px;
    }
    .platform-card {
        max-width: 100%;
        width: auto;
        flex: none;
    }
}
@media (min-width: 1100px) and (max-width: 1399px) {
    .platform-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding-top: 10px;
    }
    .platform-card {
        max-width: 100%;
        width: auto;
        flex: none;
    }
}
@media (min-width: 769px) and (max-width: 1019px) {
    .platform-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding-top: 10px;
    }
    .platform-card {
        max-width: 100%;
        width: auto;
        flex: none;
    }
}
@media (max-width: 768px) {
    .platform-cards {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        padding-top: 10px;
    }
    .platform-card {
        flex: 1 0 100%;
        max-width: 100%;
    }
}

.platform-card:hover {
    transform: none; /* 移除悬停时的上移效果 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* 保持与普通状态相同的阴影 */
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px 6px 8px; font-weight: normal;
     
}

body.sorting-mode .card-header {
    padding:6px;
}

.card-header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.card-title {
    display: flex;
    align-items: center;
    margin:0px 6px;
    font-size: 14px;
    
}

.card-title img {
    margin-right: 5px;
width: auto;
height: 15px;
}


/* 卡片标题右侧提示文字样式 */
.card-btts {
    margin-left: 5px;
    font-size: 12px;
    color: #999;
    background-color: #f5f5f5;
    padding: 1px 5px;
    border-radius: 3px;
}

body.dark-mode .card-btts {
    color: #aaa;
    background-color: #333;
}

/* 排序容器样式 */
.sort-container {
    display: flex;
    font-size: 12px;
    background: none !important;
}

.sortnone {
    display: none !important;
}

.sort-btn {
    padding: 0;
    margin: 0 4px;
    cursor: pointer;
     
    color: #999;
    user-select: none;
}

.sort-btn.active {
   
    color: #111;
    border-bottom: solid 1px #ccc;
}

.dark-mode .sort-btn.active {
    color: #eee;
}

/* 更多按钮样式 */
.more-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;font-size: 16px;
}

.more-btn:hover {
    color: #1890ff;
}

/* 刷新按钮样式 */
.refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    position: relative;
}

/* 全局已更新提示样式 */
.global-updated-tip {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(103, 103, 103, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    transition: opacity 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.global-updated-tip.fade-out {
    opacity: 0;
    transform: translate(-50%, 10px);
}

 

 

.refresh-btn:hover {
    color: #1890ff;
}

.refresh-btn.refreshing {
    animation: rotating 1s linear infinite;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.card-content {
    padding: 0;
    max-height: 440px; /* 设置为显示10.5条内容的高度 */
    overflow-y: auto; /* 保持可滚动 */
    position: relative; /* 为渐变遮罩添加定位基础 */
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

 

/* 隐藏WebKit浏览器的滚动条 */
.card-content::-webkit-scrollbar {
    display: none;
}

/* 渐变遮罩容器 */
.platform-card {
    position: relative;
}

/* 添加底部渐变遮罩效果 - 重新实现为固定位置 */
.card-fade {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none; /* 确保不会影响点击 */
    z-index: 2;
    transition: opacity 0.2s ease;border-radius: 12px;
}

/* 暗黑模式下的渐变遮罩 */
.dark-mode .card-fade {
    background: linear-gradient(to bottom, rgba(31,31,31,0) 0%, rgba(31,31,31,0.9) 100%);
}

/* 当滚动到底部时隐藏渐变遮罩 */
.card-fade.hidden {
    opacity: 0;
}

.card-item {
    display: flex;
    margin: 0px 15px;
    align-items: flex-start;
    padding: 7px 0px;
    position: relative;
}

.card-item:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: #eee;
    transform: scaleY(0.5);
    transform-origin: 0 0;
}

body.dark-mode .card-item:after {
    background: #444;
}

/* 最后一个item不需要边框 */
.card-item:last-child:after {
    display: none;
}

.card-item:hover {
    background-color: #f9f9f9;
}

.card-item-rank {
   
    color: #999;
    display: flex;
    align-items: flex-start; /* 改为顶部对齐 */
    justify-content: center;
    margin: 2px 8px 0px 0px;
    font-size: 12px;
   
}

.card-item-rank-1 {
     color: #ff4d4f;
   
}

.card-item-rank-2 {
     color: #ff7a45;
     
}

.card-item-rank-3 {
     color: #ffa940;
    
}

.dark-mode .card-item-rank-1 {
    color: #ff4d4f !important;
  
}

.dark-mode .card-item-rank-2 {
    color: #ff7a45 !important;
    
}

.dark-mode .card-item-rank-3 {
    color: #ffa940 !important;
   
}

.card-item-title {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* 改为 normal 允许换行 */
    word-wrap: break-word; /* 允许单词内换行 */
    word-break: break-word; /* 在合适的位置断行 */
    display: flex;
    align-items: flex-start; /* 改为顶部对齐 */
    flex-wrap: wrap;
}

.card-item-title a {
    color: #333;
    font-size: 15px;
    text-decoration: none;
    flex: 1;
    min-width: 0; /* 允许文字缩小 */
}

.card-item-hot {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .platform-card {
        flex: 1 0 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .platform-card {
        flex: 1 0 100%;
    }
    
}

/* 暗黑模式适配 */
.dark-mode .platform-card {
    background-color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}



 

.dark-mode .card-item:hover {
    background-color: #2a2a2a;
}

.dark-mode .card-item-title a {
    color: #ddd;
}

.dark-mode .card-item-rank {
   
    color: #bbb;
}
 

/* 拖拽相关样式 */
.platform-card {
    cursor: default; /* 默认不显示可拖动指针 */
    
}

/* 排序模式样式 */
body.sorting-mode .platform-card {
    cursor: move; /* 排序模式下显示可拖动指针 */
    border: 1px dashed #a3a0a0;
}

body.sorting-mode .card-content {
    display: none; /* 排序模式下隐藏卡片内容 */
}

/* 排序模式下隐藏底部渐变 */
body.sorting-mode .card-fade {
    display: none;
}

/* 排序模式下隐藏排序控制器和刷新按钮 */
body.sorting-mode .sort-container,
body.sorting-mode .refresh-btn,
body.sorting-mode .card-btts,
body.sorting-mode .manage-btn {
    display: none;
}

/* 排序模式下调整卡片宽度 */
body.sorting-mode .platform-cards {
    gap: 15px !important;
    padding: 20px 16px 0px 16px !important;
}
body.sorting-mode .platform-card {
    flex: 0 0 auto;
    width: auto;
 
 
}
body.sorting-mode .platform-filter-btn{display: none !important;}
/* 卡片隐藏按钮 */
.hide-card-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 99999; /* 大幅增加z-index确保不被覆盖 */
    transition: background-color 0.2s ease;
    user-select: none; /* 防止文本选择 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    overflow: visible; /* 确保按钮不会被父元素的overflow:hidden裁剪 */
}

.hide-card-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

/* 移动端优化：增大按钮尺寸便于点击 */
@media (max-width: 768px) {
    .hide-card-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
        top: -10px;
        right: -10px;
    }
}

body.sorting-mode .platform-card {
    position: relative;
    overflow: visible; /* 确保卡片的子元素不会被裁剪 */
}

body.sorting-mode .hide-card-btn {
    display: flex;
}

.dark-mode .hide-card-btn {
    background-color: rgba(255, 255, 255, 0.3);
}

.dark-mode .hide-card-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* 添加触摸反馈效果 */
.hide-card-btn:active {
    transform: scale(0.9);
    background-color: rgba(255, 0, 0, 0.8);
}

.dark-mode .hide-card-btn:active {
    background-color: rgba(255, 100, 100, 0.8);
}

/* 确保在所有情况下都能显示在最顶层 */
.sorting-mode .hide-card-btn {
    z-index: 99;
}

/* 拖拽克隆元素 */
.drag-clone {
    position: absolute;
    background-color: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10000;
    pointer-events: none;
    width: auto;
    max-width: 200px;
    min-width: 120px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

/* 拖动克隆元素中的图标样式 */
.drag-clone img {
    width: 12px !important;
    height: 12px !important;
    margin-right: 6px !important;
    flex-shrink: 0;
}

/* 拖动克隆元素中的文字样式 */
.drag-clone span {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark-mode .drag-clone {
    background-color: #1f1f1f;
    color: #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* 排序模式提示 */
.sorting-tip {
    display: none;
    position: fixed;
    bottom: 20px; /* 改为底部显示 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(24, 144, 255, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    text-align: center;
    min-width: 300px;
}

body.sorting-mode .sorting-tip {
    display: block;
}

/* 暗黑模式下的排序提示 */
.dark-mode .sorting-tip {
    background-color: rgba(45, 120, 213, 0.9);
}

.platform-card.dragging {
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    z-index: 100;
    user-select: none; /* 禁止文本选择 */
}

.platform-card.dragging .card-content {
    display: none; /* 拖动时隐藏卡片内容 */
}

/* 在拖动状态添加禁止文本选择样式 */
.platform-card.dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.platform-card.drag-over {
    border: 2px dashed #1890ff;
}

.dark-mode .platform-card.drag-over {
    border: 2px dashed #177ddc;
}

/* 卡片拖动提示 */
.drag-handle {
    cursor: move;
    margin-right: 8px;
    color: #999;
    display: flex;
    align-items: center;
    user-select: none; /* 禁止把手文本被选择 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 隐藏卡片管理按钮 */
.hidden-cards-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    display: none;
    padding: 0;
    width: 24px;
    height: 24px;
    margin-right: 5px;
}

.dark-mode .hidden-cards-btn {
    color: #ddd;
}

/* 添加主页按钮样式 */
.home-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 24px;
    height: 24px;
    margin-right: 5px;
}

.dark-mode .home-btn {
    color: #ddd;
}

body.sorting-mode .hidden-cards-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.upts1{
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}
.card-item-platform img{
    width: auto;
    height: 15px;
    border-radius: 2px;
    padding-left: 10px;padding-top: 2px;

}

/* 平台筛选面板样式 */
.platform-filter-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    background-color: white;
    border-radius: 12px; /* 增加圆角 */
    box-shadow: 0 15px 50px rgba(0,0,0,0.3), 0 0 0 1000px rgba(0,0,0,0.2); /* 大面积阴影效果 */
    z-index: 1001;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: filterPanelFadeIn 0.3s ease; /* 添加淡入动画 */
    border: 1px solid rgba(0,0,0,0.1); /* 添加细边框 */
}

@keyframes filterPanelFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2), 0 0 0 1000px rgba(0,0,0,0);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 15px 50px rgba(0,0,0,0.3), 0 0 0 1000px rgba(0,0,0,0.2);
    }
}

.dark-mode .platform-filter-panel {
    background-color: #1f1f1f;
    color: #ddd;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 15px 50px rgba(0,0,0,0.6), 0 0 0 1000px rgba(0,0,0,0.5); /* 暗黑模式下更强的阴影 */
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    position: relative; /* 为添加底部阴影做准备 */
}

.filter-header::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent);
    pointer-events: none;
}

.dark-mode .filter-header {
    border-bottom: 1px solid #333;
    background-color: #2a2a2a;
}

.dark-mode .filter-header::after {
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
}

.filter-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500; /* 稍微加粗标题 */
    color: #333;
}

.dark-mode .filter-header h4 {
    color: #eee;
}

.close-filter-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* 圆形按钮 */
    transition: all 0.2s ease;
}

.close-filter-btn:hover {
    color: #666;
    background-color: rgba(0,0,0,0.05);
}

.dark-mode .close-filter-btn:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}

.filter-content {
    padding: 16px 16px 0px 16px;
    overflow-y: auto;
    flex-grow: 1; /* 内容区域自适应高度 */
}

.filter-actions {
    display: none; /* 隐藏原来位置的按钮 */
    gap: 8px;
    margin-bottom: 16px;
}

.filter-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px; /* 增加间距 */
    margin-bottom: 16px;
}

.platform-option {
    display: flex;
    align-items: center;
    padding: 10px; /* 增加内边距 */
    background-color: #f8f9fa;
    border-radius: 6px; /* 增加圆角 */
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #eee; /* 添加边框 */
}

.dark-mode .platform-option {
    background-color: #2a2a2a;
    border-color: #333;
}

.platform-option:hover {
    background-color: #e9ecef;
    transform: translateY(-1px); /* 悬停时微微上移 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* 悬停时添加阴影 */
}

.dark-mode .platform-option:hover {
    background-color: #353535;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 美化复选框 */
.platform-option input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #1890ff; /* 设置复选框选中颜色 */
    width: 16px;
    height: 16px;
}

.platform-option span {
    font-size: 14px;
    user-select: none;
}

.filter-footer {
    display: flex;
    justify-content: space-between; /* 两端对齐 */
    align-items: center;
    padding: 14px 16px; /* 增加内边距 */
    border-top: 1px solid #eee;
    background-color: #f8f9fa;
    position: sticky;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); /* 添加上方阴影 */
}

.dark-mode .filter-footer {
    border-top: 1px solid #333;
    background-color: #2a2a2a;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

/* 新增底部操作按钮容器 */
.footer-actions {
    display: flex;
    gap: 8px;
}

/* 底部操作按钮样式 */
.footer-actions button {
    padding: 6px 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.2s ease;
}

.dark-mode .footer-actions button {
    background-color: #333;
    border-color: #444;
    color: #ddd;
}

.footer-actions button:hover {
    background-color: #e9ecef;
    border-color: #ccc;
}

.dark-mode .footer-actions button:hover {
    background-color: #404040;
    border-color: #555;
}

.apply-filter-btn {
    padding: 8px 16px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(24,144,255,0.3); /* 添加按钮阴影 */
}

.apply-filter-btn:hover {
    background-color: #40a9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(24,144,255,0.4);
}

.dark-mode .apply-filter-btn {
    box-shadow: 0 2px 5px rgba(24,144,255,0.2);
}

.dark-mode .apply-filter-btn:hover {
    box-shadow: 0 4px 8px rgba(24,144,255,0.3);
}

/* 筛选按钮样式 */
.platform-filter-btn {
    background: none !important;
    color: #666 !important;
}

.dark-mode .platform-filter-btn {
    color: #ddd !important;
}

/* all平台卡片中的内联平台图标 */
.platform-icon-inline {
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border-radius: 2px;
    flex-shrink: 0;
    align-self: flex-start; /* 修改为顶部对齐 */
    margin-top: 5px; /* 添加顶部边距使其与第一行文字对齐 */
}

/* 卡片项中的时间显示样式 */
.card-item-time {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 3px; /* 添加顶部边距使其与第一行文字对齐 */
}

.dark-mode .card-item-time {
    color: #bbb;
}

/* 移动端卡片样式 */
@media (max-width: 767px) {
    body {
        background-color: #fff !important;
    }
    
    body.dark-mode {
        background-color: #333 !important;
        color: #eee !important;
    }
    
    .container {
        padding: 5px 0px 0px 0px; /* 增加底部padding为固定导航留出空间 */
    }
    
    header {
        padding: 0px 20px 2px 16px;
        border-bottom: 1px solid #eee;
        margin-bottom: 3px !important;
    }
    
    body.dark-mode header {        
        border-bottom: 1px solid #444 !important;
    }
    
    /* 移动端搜索相关样式 */
    .search-toggle {
        display: flex !important; /* 移动端显示搜索图标按钮 */
    }
    
    .search-container {
        display: none; /* 默认隐藏搜索框 */
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        width: calc(100% - 20px);
        margin: 0 auto;
        z-index: 1100;
        height: 45px !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        border: 1px solid #fff;
    }
    
    body.dark-mode .search-container {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    }
    
    /* 搜索展开时，添加一个半透明背景遮罩 */
    .search-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 1050;
    }
    
    body.search-open .search-backdrop {
        display: block;
    }
    
    .search-suggestions.active {
        margin-top: 0px !important;
    }
    
    /* 平台卡片容器样式 */
    .platform-cards {
        padding: 0;box-shadow: none !important;
        gap: 15px;
    }
    .platform-card.active .card-content {
        max-height: none;
    }
    .card-fade{background: none !important;}

    .platform-card {
       box-shadow: none !important;
   
    }

    /* 移动端底部导航栏 */
    .mobile-platforms {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 10px 15px 12px;
        margin: 0;
        z-index: 1000;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        gap: 8px;
        background-color: rgba(255, 255, 255, 0.4);
    }
    
    /* 暗黑模式下的底部导航样式 */
    body.dark-mode .mobile-platforms {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
        background-color: rgba(31, 31, 31, 0.4);
    }
    
    .mobile-platforms::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    /* 移动端平台按钮样式 */
    .mobile-platform-btn {
        border: 0px !important;
        flex-shrink: 0;
        padding: 8px !important;
        font-size: 0;
        background: none !important;
        white-space: nowrap;
        /* 移动端只显示图标，不显示文字 */
        width: 40px !important;
        height: 36px !important;
        overflow: visible; /* 修改为visible以显示关闭按钮 */
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative; /* 添加相对定位，作为关闭按钮的定位参考 */
        cursor: pointer;
        margin-right: 2px;
    }
    
    .mobile-platform-btn img {
        width: auto !important;
        height: 28px !important;
        margin: 0 !important;
        position: relative;
        z-index: 1;
        text-indent: 0 !important;
        max-width: 28px !important;
    }
    
    .mobile-platform-btn.active {
        background-color: #efefef !important;    border-radius: 12px;
    }
    
    body.dark-mode .mobile-platform-btn.active {
        background-color: #333 !important;
    }
    
    /* 默认隐藏所有卡片 */
    .platform-card {
        display: none;
    }
    
    /* 只显示当前选中的卡片 */
    .platform-card.active {
        display: block;
        flex: 1 0 100%;
        max-width: 100%;
    }
    
    /* 排序模式下显示所有卡片 */
    body.sorting-mode .platform-card {
        display: block !important; /* 添加!important确保覆盖内联样式 */
        flex: 0 0 auto;
        width: auto;        
        min-width: auto;
        max-width: 200px;
    }
    
    /* 排序模式下隐藏底部导航 */
    body.sorting-mode .mobile-platforms {
        display: none;
    }
    
    /* 调整底部间距，避免内容被底部导航遮挡 */
    footer {
        margin-bottom: 60px;
    }
    
    /* 返回顶部按钮位置调整 */
    .back-to-top {
        bottom: 70px !important; /* 调整到底部导航栏上方 */
    }
    .add-favorite-btn,.more-btn{display: none !important;}
    .global-updated-tip {
        bottom: 120px; /* 移动端底部有导航栏，需要调高位置 */
    }
}
.manage-btn{
 
font-size: 12px;
padding: 2px 8px;
background: none;
border-radius: 5px;
color: #444;
cursor: pointer;
border: 1px solid #ddd;
}

.dark-mode .manage-btn{
    border: 1px solid #444; 
    color: #eee !important;

}

.loading {
    text-align: center;
    padding: 20px 10px;
    color: #999;
}

/* 添加关注按钮样式 */
.add-favorite-btn {
    background: none;
    border: 1px solid #222;
    border-radius: 5px;
    padding: 5px 10px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    transition: all 0.3s ease;
}

.add-favorite-btn:hover {
    background-color: #f0f0f0;
}

body.dark-mode .add-favorite-btn {
    border-color: #444;
    color: #ddd;
}

body.dark-mode .add-favorite-btn:hover {
    background-color: #333;
}

/* 隐藏"我的关注"卡片样式 */
.favorite-card-hidden {
    display: none !important;
}

/* 排序模式下的按钮样式 */
body.sorting-mode .add-favorite-btn {
    display: none;
}
body.sorting-mode .more-btn{
    display: none !important;
}




/*添加Logo动画样式 */
 
.logo-animation {
    position: relative;
    display: flex;
    color: #333;
    font-family: "GeistMono", monospace;
    text-align: center;

    justify-content: center;
}



body.dark-mode .logo-animation {
    color: #eee;
}

.logo-animation .char {


    display: inline-block; 
    opacity: 1;
    transition: opacity 0.5s, transform 0.5s;
    text-align: center;
}

.char.hide {
    opacity: 0;
    transform: translateY(-10px);
}

.char.show {
    opacity: 1;
    transform: translateY(0);
}

.logo-dotcom-hidden {
    display: none !important;
}

#normal-logo {
    text-align: left;
    width: 100%;
}
#normal-logo a  {
  
    color: #333;text-decoration: none;

}
body.dark-mode #normal-logo a  {
  
    color: #ccc;text-decoration: none;

}
/*Logo动画样式结束 */