/* 搜索按钮 */
.search-bar .search-btn {
  background-color: #1a73e8 !important;
  color: #ffffff !important;
  border: none !important;
  cursor: pointer !important;
}
.search-bar .search-btn:hover {
  background-color: #0d61d4 !important;
}

/* 暗模式 */
body.dark-mode .search-bar .search-btn {
  background-color: rgba(255,255,255,0.05) !important;
  color: #ffffff !important;
}
body.dark-mode .search-bar .search-btn:hover {
  background-color: rgba(255,255,255,0.1) !important;
}

/* 手机端布局排序 */
@media (max-width: 768px) {
  .logo .logo-icon,
  .logo .logo-text {
    display: none !important;
  }
  .logo {
    display: flex !important;
    position: relative;
    z-index: 999;
    padding: 0 8px;
  }
  .header-inner {
    position: relative !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0 !important;
  }
  .header-actions {
    display: flex !important;
    flex: 1 !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  .mobile-menu-btn { order:1 !important; margin-right:auto !important; }
  #theme-toggle    { order:2 !important; margin-left:auto !important; }
  .login-btn       { order:3 !important; flex-shrink:0 !important; }
}

/* 分页样式 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
        padding: 0 5px;
    }
    .pagination .page-link {
        padding: 4px 8px !important;
        font-size: 13px;
    }
}
.pagination .page-link {
    color: #333;
    background-color: #fff;
    border: 1px solid #dee2e6;
}
.pagination .page-item.active .page-link {
    background-color: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: #fff !important;
}
.pagination .page-link:hover {
    background-color: #e9ecef;
    color: #1a73e8;
}
body.dark-mode .pagination .page-link {
    color: #e5e7eb;
    background-color: #1f2937;
    border-color: #374151;
}
body.dark-mode .pagination .page-item.active .page-link {
    background-color: #1e3a8a !important;
    border-color: #1e3a8a !important;
    color: #fff !important;
}
body.dark-mode .pagination .page-link:hover {
    background-color: #374151;
    color: #fff;
}

/* 分页跳转 */
#jumpPage {
    color: #333;
    background: #fff;
    border: 1px solid #ced4da;
}
.pagination-jump button {
    background: #1a73e8;
    color: #fff;
    border: none;
}
.pagination-jump button:hover {
    background: #0d61d4;
}
body.dark-mode #jumpPage {
    color: #e5e7eb;
    background: #1f2937;
    border-color: #374151;
}
body.dark-mode .pagination-jump button {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
body.dark-mode .pagination-jump button:hover {
    background: rgba(255,255,255,0.1);
}
html:not(.page-loaded) .float-wrap,
html:not(.page-loaded) .float-card,
html:not(.page-loaded) .sidebar-btn,
html:not(.page-loaded) .footer-link-item,
html:not(.page-loaded) .friendly-item,
html:not(.page-loaded) .qrcode-box,
html:not(.page-loaded) .more-link-btn {
    transition: none !important;
}

/* PC/平板 默认：右侧垂直居中 */
.float-wrap {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 994;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* 手机端：右下角摆放 */
@media (max-width:768px){
    .float-wrap{
        right:12px;
        bottom: 24px;
        top: auto;
        transform: none;
        gap:10px;
    }
}

/* 内部卡片样式 */
.float-card {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: auto;
}
body.dark-mode .float-card {
    background: rgba(30, 34, 51, 0.92);
    border-color: #374151;
}

.sidebar-main-group {
    gap: 8px;
}

/* 返回、回到顶部默认隐藏 */
.sidebar-back-wrap,
.sidebar-backtotop-wrap {
    height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    padding:0;
}
.sidebar-back-wrap.show,
.sidebar-backtotop-wrap.show {
    height: auto;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    padding:6px;
}

.sidebar-wrap {
    display: flex;
    justify-content: center;
}
.sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    transition: background-color 0.24s ease;
}
@media (max-width:768px){
    .sidebar-btn{
        width:38px;
        height:38px;
    }
}

/* 亮色模式按钮 */
.float-card .sidebar-btn {
    color:#1e88e5;
    background: transparent;
}
.float-card .sidebar-btn:hover{
    background:rgba(0,0,0,0.07);
    color:#1e88e5;
}
.float-card .sidebar-btn.active{
    background:#1e88e5;
    color:#ffffff;
}

/* 暗色模式按钮 */
body.dark-mode .float-card .sidebar-btn {
    color:#c5cde0;
}
body.dark-mode .float-card .sidebar-btn:hover{
    background:rgba(255,255,255,0.09);
    color:#c5cde0;
}
body.dark-mode .float-card .sidebar-btn.active{
    background:rgba(255,255,255,0.09);
    color:#ffffff;
}

.friendly-link-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
.friendly-item {
    font-size: 14px;
    color: #555;
    transition: color 0.2s ease;
}
.friendly-item:hover {
    color: #1a73e8;
}
body.dark-mode .friendly-item {
    color: #aeb7c2;
}
body.dark-mode .friendly-item:hover {
    color: #4285f4;
}

.more-link-btn {
    font-size:14px;
    color:#1a73e8;
    transition: color 0.2s ease;
}
.more-link-btn:hover {
    color:#0d5bbd;
}
body.dark-mode .more-link-btn {
    color:#4285f4;
}
body.dark-mode .more-link-btn:hover {
    color:#70a8ff;
}

.qrcode-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.qrcode-item {
    text-align: center;
}
.qrcode-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.qrcode-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.qrcode-box:hover {
    border-color: #1a73e8;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(26, 115, 232, 0.18);
}
.qrcode-name {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
}
body.dark-mode .qrcode-box {
    background: #1e2235;
    border-color: #374151;
}
body.dark-mode .qrcode-box:hover {
    border-color: #4285f4;
    box-shadow: 0 8px 18px rgba(66, 133, 244, 0.18);
}
body.dark-mode .qrcode-name {
    color: #aeb7c2;
}

.footer { margin-top: 70px; }
.footer-title { color: #222; }
.footer-link-list li { margin-bottom: 8px; }
.footer-link-item { color: #555; transition: color 0.2s ease; font-size:14px; }
.footer-link-item:hover { color: #1a73e8; }
body.dark-mode .footer-title { color: #eee; }
body.dark-mode .footer-link-item { color: #b8c2cc; }
body.dark-mode .footer-link-item:hover { color: #4285f4; }
body.dark-mode .footer .border-bottom { border-color: #374151 !important; }
