/* ========================================
   网盘搜索 - 简洁版样式
   配色：专业灰白 + 深蓝主色调
======================================== */

/* 基础样式 */
* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

:root {
   --primary: #1a73e8;
   --primary-hover: #1557b0;
   --success: #34a853;
   --text-primary: #202124;
   --text-secondary: #5f6368;
   --bg-primary: #ffffff;
   --bg-secondary: #f8f9fa;
   --border: #e0e0e0;
   --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
   --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
   --radius: 8px;
   --transition: all 0.3s ease;
}

body {
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
   color: var(--text-primary);
   background: var(--bg-secondary);
   line-height: 1.6;
   font-size: 16px;
}

.container {
   max-width: 1350px;
   margin: 0 auto;
   padding: 0 20px;
   width: 100%;
   box-sizing: border-box;
}

/* 响应式容器 padding */
@media (max-width: 1400px) {
   .container {
      padding: 0 20px;
   }
}

@media (max-width: 1024px) {
   .container {
      padding: 0 16px;
   }
}

@media (max-width: 768px) {
   .container {
      padding: 0 12px;
   }
}

@media (max-width: 480px) {
   .container {
      padding: 0 10px;
   }
}

/* ========================================
  导航栏
======================================== */
.navbar {
   background: var(--bg-primary);
   border-bottom: 1px solid var(--border);
   position: sticky;
   top: 0;
   z-index: 1000;
   box-shadow: var(--shadow);
}

.navbar .container {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 16px 20px;
}

.logo {
   display: flex;
   align-items: center;
   gap: 8px;
   font-size: 20px;
   font-weight: 600;
   color: var(--text-primary);
   text-decoration: none;
   transition: var(--transition);
}

.logo svg {
   color: var(--primary);
}

.logo:hover {
   color: var(--primary);
}

.nav-links {
   display: flex;
   gap: 24px;
   align-items: center;
}

/* 导航栏内所有链接统一样式（默认状态） */
.nav-links a {
   color: #5f6368;
   text-decoration: none !important;
   padding: 8px 16px;
   border-radius: var(--radius);
   transition: var(--transition);
   font-weight: 500;
}

/* nav-link 类继承 nav-links a 的样式 */
.nav-link {
   color: #5f6368;
   text-decoration: none !important;
}

/* 悬停状态：所有导航链接变蓝色 */
.nav-links a:hover,
.nav-link:hover {
   color: var(--primary);
   background: var(--bg-secondary);
   text-decoration: none !important;
}

/* 高亮状态（active）：保持蓝色背景 */
.nav-link.active,
.nav-links a.active {
   color: var(--primary) !important;
   background: rgba(26, 115, 232, 0.1);
   text-decoration: none !important;
}

.mobile-toggle {
   display: none;
   flex-direction: column;
   gap: 4px;
   background: none;
   border: none;
   cursor: pointer;
   padding: 8px;
}

.mobile-toggle span {
   width: 24px;
   height: 2px;
   background: var(--text-primary);
   transition: var(--transition);
}

/* ========================================
  主内容
======================================== */
.main-content {
   min-height: calc(100vh - 200px);
}

.page-content {
   display: none;
}

.page-content.active {
   display: block;
}

/* ========================================
  搜索区域
======================================== */
.search-section {
   text-align: center;
   padding: 0px 0 0px;
}

.search-title {
   font-size: 36px;
   font-weight: 600;
   margin-bottom: 24px;
   color: var(--text-primary);
}

.search-box {
   max-width: 720px;
   margin: 0 auto 24px;
   display: flex;
   gap: 12px;
   background: var(--bg-primary);
   padding: 8px;
   border-radius: 24px;
   box-shadow: var(--shadow-lg);
}

.search-input {
   flex: 1;
   border: none;
   outline: none;
   font-size: 16px;
   padding: 12px 20px;
   background: transparent;
   color: var(--text-primary);
}

.search-input::placeholder {
   color: var(--text-secondary);
}

.search-btn {
   display: flex;
   align-items: center;
   gap: 8px;
   background: var(--primary);
   color: white;
   border: none;
   padding: 12px 32px;
   border-radius: 20px;
   font-size: 16px;
   font-weight: 500;
   cursor: pointer;
   transition: var(--transition);
   white-space: nowrap;
}

.search-btn:hover {
   background: var(--primary-hover);
   transform: translateY(-1px);
   box-shadow: var(--shadow-lg);
}

/* 热门标签 */
.hot-tags {
   display: flex;
   align-items: center;
   justify-content: center;
   flex-wrap: wrap;
   gap: 10px;
   margin-bottom: 20px;
   padding: 0 16px;
}

.tag-label {
   color: var(--text-secondary);
   font-size: 14px;
   font-weight: 500;
}

.tag {
   display: inline-block;
   padding: 8px 18px;
   background: var(--bg-primary);
   color: #ffffff;
   text-decoration: none;
   border-radius: 18px;
   font-size: 14px;
   border: none;
   transition: all 0.3s ease;
   cursor: pointer;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
   animation: fadeInUp 0.5s ease-out;
   animation-fill-mode: both;
}

@keyframes fadeInUp {
   from {
       opacity: 0;
       transform: translateY(10px);
   }
   to {
       opacity: 1;
       transform: translateY(0);
   }
}

.tag:hover {
   transform: translateY(-2px) scale(1.05);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
   .hot-tags {
       gap: 8px;
       padding: 0 12px;
   }
   
   .tag {
       padding: 6px 14px;
       font-size: 13px;
   }
}

/* 公告栏 */
.notice-bar {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   padding: 12px 24px;
   background: rgba(26, 115, 232, 0.05);
   border-radius: var(--radius);
   color: var(--primary);
   font-size: 14px;
   max-width: 720px;
   margin: 0 auto;
}

.notice-text {
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

/* ========================================
  搜索结果
======================================== */
.results-section {
   margin-top: 24px;
}

.results-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 16px;
}

.results-title {
   font-size: 24px;
   font-weight: 600;
}

.results-count {
   color: var(--text-secondary);
   font-size: 14px;
}

.results-list {
   display: flex;
   flex-direction: column;
   gap: 15px;
   list-style: none;
   padding: 0;
   margin: 0;
}

/* 大厅标题样式 */
.hall-header {
   margin: 24px 0 16px;
   padding: 16px 20px;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   border-radius: 12px;
   box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hall-header:first-child {
   margin-top: 0;
}

.hall-title {
   display: flex;
   align-items: center;
   gap: 12px;
   flex-wrap: wrap;
}

.hall-number {
   font-size: 20px;
   font-weight: 700;
   color: #fff;
   text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
   letter-spacing: 0.5px;
}

.hall-desc {
   font-size: 14px;
   color: rgba(255, 255, 255, 0.9);
   font-weight: 500;
}

.hall-count {
   margin-left: auto;
   padding: 4px 12px;
   background: rgba(255, 255, 255, 0.25);
   border-radius: 20px;
   font-size: 13px;
   color: #fff;
   font-weight: 600;
   backdrop-filter: blur(10px);
}

.result-item {
   margin: 0;
   list-style: none;
   width: 100%;
}

/* 资源卡片 - 参考原版设计 */
.resource-card {
   background-color: #fff;
   border-radius: 8px;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
   padding: 20px;
   display: flex;
   flex-direction: column;
   align-items: stretch;
   transition: all 0.2s ease;
   border: 1px solid #eaeaea;
}

.resource-card:hover {
   transform: translateY(-2px);
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
   border-color: #d0d0d0;
}

/* 结果标题 */
.result-title {
   font-size: 16px;
   font-weight: 400;
   color: #333;
   margin: 0 0 15px 0;
   padding: 0;
   overflow: hidden;
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   line-height: 1.5;
   text-align: left;
}

.resource-card:hover .result-title {
   color: #1a73e8;
}

/* 自定义资源标识 */
.custom-resource-badge {
   display: inline-block;
   padding: 2px 8px;
   background: linear-gradient(147deg, #b82dff, #f265ff);
   color: white;
   border-radius: 4px;
   font-size: 12px;
   margin-right: 6px;
   font-weight: 500;
}

/* 网盘类型标识 */
.result-badge {
   display: inline-flex;
   align-items: center;
   gap: 4px;
   padding: 4px 12px;
   background: var(--bg-secondary);
   color: var(--text-secondary);
   border-radius: 12px;
   font-size: 12px;
   white-space: nowrap;
   margin-right: 8px;
}

.result-badge.baidu { background: #e3f2fd; color: #1976d2; }
.result-badge.quark { background: #f3e5f5; color: #7b1fa2; }
.result-badge.xunlei { background: #fff3e0; color: #f57c00; }

/* 资源信息 */
.resource-info {
   display: block;
   font-size: 14px;
   color: #666;
   margin-bottom: 15px;
   padding: 10px;
   background-color: #f9f9f9;
   border-radius: 8px;
   border-left: 3px solid #e6d8ff;
}

/* 按钮容器 */
.resource-buttons {
   display: flex;
   justify-content: center;
   gap: 10px;
   width: 100%;
}

/* 资源按钮 */
.resource-btn {
   flex: 1;
   padding: 10px 24px;
   border: none;
   border-radius: 4px;
   font-size: 14px;
   font-weight: 400;
   cursor: pointer;
   transition: all 0.3s ease;
   text-align: center;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 4px;
   min-width: 120px;
}

/* 通用按钮样式 */
.btn-primary,
.btn-secondary {
   padding: 10px 24px;
   border: none;
   border-radius: 4px;
   font-size: 14px;
   font-weight: 500;
   cursor: pointer;
   transition: all 0.3s ease;
   text-align: center;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   min-width: 100px;
   outline: none;
}

.btn-primary {
   background: linear-gradient(147deg, #b82dff, #f265ff);
   color: white;
   box-shadow: 0 2px 5px rgba(184, 45, 255, 0.2);
}

.btn-primary:hover {
   transform: translateY(-2px);
   box-shadow: 0 4px 10px rgba(184, 45, 255, 0.3);
}

/* 百度网盘按钮 */
.baidu-btn {
   background: #2196f3;
   color: white;
}

.baidu-btn:hover {
   background: linear-gradient(135deg, #1557b0, #083a8a);
   transform: translateY(-2px);
   box-shadow: 0 4px 8px rgba(26, 115, 232, 0.4);
}

/* 夸克网盘按钮 */
.quark-btn {
   background: #9c27b0;
   color: white;
}

.quark-btn:hover {
   background: linear-gradient(135deg, #8a17d0, #e552f5);
   transform: translateY(-2px);
   box-shadow: 0 4px 8px rgba(155, 26, 232, 0.4);
}

/* 迅雷网盘按钮 */
.xunlei-btn {
   background: #e03e00;
   color: white;
}

.xunlei-btn:hover {
   background: linear-gradient(135deg, #ff6b35, #e03e00);
   transform: translateY(-2px);
   box-shadow: 0 4px 8px rgba(224, 62, 0, 0.4);
}

.btn-secondary {
   background: #f5f5f5;
   color: #666;
   border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
   background: #e8e8e8;
   border-color: #d0d0d0;
}

.results-footer {
   text-align: center;
   margin-top: 32px;
}

/* ========================================
  最新资源页面
======================================== */
.page-header {
   margin-bottom: 40px;
   text-align: center;
   padding: 32px 0;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   border-radius: 12px;
   box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.page-header h1 {
   font-size: 36px;
   font-weight: 700;
   margin-bottom: 20px;
   color: #ffffff;
   text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-box-small {
   max-width: 500px;
   margin: 0 auto;
}

.search-input-small {
   width: 100%;
   padding: 12px 20px;
   border: 2px solid rgba(255, 255, 255, 0.3);
   border-radius: 50px;
   font-size: 14px;
   background: rgba(255, 255, 255, 0.95);
   transition: all 0.3s ease;
}

.search-input-small:focus {
   outline: none;
   border-color: rgba(255, 255, 255, 0.8);
   background: #ffffff;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
   outline: none;
   transition: var(--transition);
}

.search-input-small:focus {
   border-color: var(--primary);
   box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* 页面头部控件 */
.header-controls {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 16px;
   margin-top: 20px;
}

.view-controls {
   display: flex;
   gap: 8px;
}

.sort-btn {
   display: flex;
   align-items: center;
   gap: 6px;
   padding: 8px 16px;
   background: var(--bg-primary);
   color: var(--text-secondary);
   border: 1px solid var(--border);
   border-radius: 8px;
   font-size: 14px;
   cursor: pointer;
   transition: var(--transition);
   white-space: nowrap;
}

.sort-btn:hover {
   color: var(--primary);
   border-color: var(--primary);
   background: rgba(26, 115, 232, 0.05);
}

.sort-btn.active {
   background: var(--primary);
   color: white;
   border-color: var(--primary);
}

.sort-btn svg {
   transition: transform 0.3s;
}

.sort-btn.desc svg {
   transform: rotate(180deg);
}

.category-tabs {
   display: flex;
   gap: 8px;
   margin-bottom: 10px;
   overflow-x: auto;
   padding-bottom: 8px;
}

.category-tab {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 10px 20px;
   background: var(--bg-primary);
   color: var(--text-secondary);
   border: 1px solid var(--border);
   border-radius: 8px;
   font-size: 14px;
   cursor: pointer;
   transition: var(--transition);
   white-space: nowrap;
}

.category-tab svg {
   opacity: 0.7;
}

.category-tab:hover {
   color: var(--primary);
   border-color: var(--primary);
   background: rgba(26, 115, 232, 0.05);
}

.category-tab:hover svg {
   opacity: 1;
}

.category-tab.active {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: white;
   border-color: transparent;
   box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.category-tab.active svg {
   opacity: 1;
}

/* 简约列表样式 */
.simple-table-wrapper {
   background: var(--bg-primary);
   border-radius: 12px;
   overflow: hidden;
   box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
   margin-top: 20px;
}

.simple-table {
   width: 100%;
   border-collapse: collapse;
   background: white;
}

.simple-table thead {
   background: #f8f9fa;
   border-bottom: 2px solid #e0e0e0;
}

.simple-table thead th {
   padding: 16px 20px;
   text-align: left;
   font-weight: 600;
   font-size: 14px;
   color: #666;
   white-space: nowrap;
}

.simple-table tbody tr {
   border-bottom: 1px solid #f0f0f0;
   transition: all 0.2s;
}

.simple-table tbody tr:last-child {
   border-bottom: none;
}

.simple-table tbody tr:hover {
   background: #f8f9ff;
}

.simple-table tbody td {
   padding: 16px 20px;
   vertical-align: middle;
}

.col-icon {
   width: 50px;
   text-align: center;
   font-size: 18px;
}

.col-name {
   min-width: 200px;
}

.col-disk {
   width: 200px;
}

.col-time {
   width: 140px;
   text-align: right;
}

.resource-name-cell {
   font-size: 15px;
   color: #333;
   font-weight: 500;
   line-height: 1.5;
}

.resource-disk-cell {
   display: flex;
   gap: 8px;
   flex-wrap: wrap;
}

.disk-badge-simple {
   display: inline-block;
   padding: 4px 12px;
   border-radius: 20px;
   font-size: 12px;
   font-weight: 500;
   background: linear-gradient(135deg, #667eea, #764ba2);
   color: #fff;
   cursor: pointer;
   transition: all 0.3s;
   text-decoration: none;
   white-space: nowrap;
}

.disk-badge-simple:hover {
   transform: translateY(-2px);
   box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.resource-time-cell {
   color: #999;
   font-size: 13px;
   white-space: nowrap;
}

.table-loading,
.table-empty {
   padding: 40px 20px;
   text-align: center;
   color: #999;
}

.loading-spinner {
   width: 40px;
   height: 40px;
   margin: 0 auto 20px;
   border: 4px solid #f0f0f0;
   border-top-color: #667eea;
   border-radius: 50%;
   animation: spin 1s linear infinite;
}

@keyframes spin {
   to { transform: rotate(360deg); }
}

.table-empty svg {
   opacity: 0.3;
   margin-bottom: 16px;
}

.table-empty p {
   font-size: 16px;
   color: #999;
}

/* ========================================
  翻页组件
======================================== */
.pagination-wrapper {
   margin-top: 32px;
   padding: 24px 20px;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 16px;
   border-top: 1px solid var(--border);
}

.pagination {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   flex-wrap: wrap;
}

.pagination-btn {
   min-width: 40px;
   height: 40px;
   padding: 0 12px;
   border: 1px solid var(--border);
   background: var(--bg-primary);
   color: var(--text-primary);
   border-radius: var(--radius);
   font-size: 14px;
   font-weight: 500;
   cursor: pointer;
   transition: var(--transition);
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 4px;
}

.pagination-btn:hover:not(.disabled):not(.active) {
   border-color: var(--primary);
   color: var(--primary);
   background: var(--bg-secondary);
}

.pagination-btn.active {
   background: var(--primary);
   color: white;
   border-color: var(--primary);
   cursor: default;
}

.pagination-btn.disabled {
   opacity: 0.5;
   cursor: not-allowed;
   pointer-events: none;
}

.pagination-btn svg {
   width: 16px;
   height: 16px;
}

.pagination-ellipsis {
   padding: 0 8px;
   color: var(--text-secondary);
   font-size: 14px;
   user-select: none;
}

.pagination-info {
   font-size: 14px;
   color: var(--text-secondary);
   text-align: center;
}

/* 移动端适配 */
@media (max-width: 767px) {
   .pagination-wrapper {
       margin-top: 24px;
       padding: 20px 16px;
   }
   
   .pagination {
       gap: 6px;
   }
   
   .pagination-btn {
       min-width: 36px;
       height: 36px;
       padding: 0 10px;
       font-size: 13px;
   }
   
   .pagination-btn svg {
       width: 14px;
       height: 14px;
   }
   
   .pagination-info {
       font-size: 13px;
   }
   
   /* 移动端隐藏省略号，简化显示 */
   .pagination-ellipsis {
       display: none;
   }
}

/* 超小屏幕（小于480px） */
@media (max-width: 480px) {
   .pagination-btn {
       min-width: 32px;
       height: 32px;
       padding: 0 8px;
       font-size: 12px;
   }
   
   .pagination-btn svg {
       width: 12px;
       height: 12px;
   }
   
   .pagination-info {
       font-size: 12px;
   }
}

/* ========================================
  底部
======================================== */
.footer {
   background: var(--bg-primary);
   border-top: 1px solid var(--border);
   padding: 32px 0;
   /* margin-top: 40px; */
}

.footer-content {
   text-align: center;
}

.disclaimer h4 {
   font-size: 18px;
   font-weight: 600;
   margin-bottom: 12px;
}

.disclaimer p {
   color: var(--text-secondary);
   font-size: 14px;
   margin-bottom: 8px;
}

.contact {
   margin-top: 16px;
   color: var(--text-secondary);
   font-size: 14px;
}

/* ========================================
  弹窗
======================================== */
.modal {
   display: none;
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(0, 0, 0, 0.5);
   z-index: 2000;
   align-items: center;
   justify-content: center;
   padding: 20px;
}

.modal.active {
   display: flex;
}

.modal-content {
   background: var(--bg-primary);
   border-radius: var(--radius);
   max-width: 500px;
   width: 100%;
   max-height: 80vh;
   overflow-y: auto;
   box-shadow: var(--shadow-lg);
   position: relative;
   pointer-events: auto;
}

.modal-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 20px;
   border-bottom: 1px solid var(--border);
}

.modal-header h3 {
   font-size: 18px;
   font-weight: 600;
}

.modal-close {
   background: none;
   border: none;
   font-size: 28px;
   color: var(--text-secondary);
   cursor: pointer;
   width: 32px;
   height: 32px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   transition: var(--transition);
   pointer-events: auto;
   z-index: 1;
}

.modal-close:hover {
   background: var(--bg-secondary);
   color: var(--text-primary);
}

/* 弹窗内的按钮 */
.modal-body button,
.modal-actions button {
   cursor: pointer;
   pointer-events: auto;
   user-select: none;
}

.modal-body {
   padding: 20px;
}

/* 协议弹窗 - 增强兼容性 */
.protocol-modal {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(0, 0, 0, 0.5);
   z-index: 3000;
   display: none;
   align-items: center;
   justify-content: center;
   padding: 20px;
}

.protocol-modal.active {
   display: flex;
   display: -webkit-flex;  /* Safari兼容 */
}

.protocol-content {
   background: #ffffff;    /* 使用固定颜色替代CSS变量 */
   border-radius: 8px;
   max-width: 600px;
   width: 100%;
   max-height: 80vh;
   overflow-y: auto;
   -webkit-overflow-scrolling: touch;  /* iOS滚动优化 */
   position: relative;
   pointer-events: auto;
   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.protocol-body {
   padding: 32px;
   font-size: 14px;
   line-height: 1.8;
   color: #333333 !important;  /* 强制文字颜色 */
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;  /* 字体降级 */
}

/* 强制富文本内容样式 */
.protocol-body * {
   color: inherit !important;  /* 继承父元素颜色 */
   font-family: inherit !important;  /* 继承字体 */
}

.protocol-body p {
   margin: 0 0 12px 0;
   color: #333333 !important;  /* 段落颜色 */
}

.protocol-body h1,
.protocol-body h2,
.protocol-body h3,
.protocol-body h4,
.protocol-body h5,
.protocol-body h6 {
   color: #222222 !important;  /* 标题颜色 */
   margin: 16px 0 12px 0;
}

.protocol-body a {
   color: #1a73e8 !important;  /* 链接颜色 */
   text-decoration: underline;
}

.protocol-body strong,
.protocol-body b {
   font-weight: 600;
   color: #222222 !important;
}

.protocol-body ul,
.protocol-body ol {
   margin: 12px 0;
   padding-left: 24px;
   color: #333333 !important;
}

.protocol-body li {
   margin: 6px 0;
   color: #333333 !important;
}

.protocol-footer {
   display: flex;
   gap: 12px;
   padding: 20px 32px;
   border-top: 1px solid #e0e0e0;  /* 使用固定颜色 */
   justify-content: flex-end;
}

/* 移动端适配 */
@media (max-width: 768px) {
   .protocol-content {
       max-width: 95%;
       max-height: 90vh;
       margin: 0 10px;
       border-radius: 12px;
   }

   .protocol-body {
       padding: 20px;
       font-size: 13px;
   }

   .protocol-footer {
       padding: 16px 20px;
       flex-direction: column-reverse;
   }

   .protocol-footer button {
       width: 100%;
       margin: 0;
   }
}

.protocol-footer button {
   padding: 10px 24px;
   border: none;
   border-radius: 4px;
   font-size: 14px;
   cursor: pointer;
   transition: all 0.3s ease;
   pointer-events: auto;
}

/* ========================================
  加载动画
======================================== */
.loading-overlay {
   display: none;
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(255, 255, 255, 0.9);
   z-index: 2500;
   align-items: center;
   justify-content: center;
}

.loading-overlay.active {
   display: flex;
}

.loading-spinner {
   display: none; /* 仅文字提示，不显示图标 */
}

.loading-overlay .loading-text {
   padding: 14px 22px;
   background: rgba(26, 115, 232, 0.08);
   border: 1px solid rgba(26, 115, 232, 0.15);
   border-radius: 12px;
   color: #0f3d91;
   font-size: 18px;
   font-weight: 600;
   letter-spacing: 0.4px;
   box-shadow: 0 10px 30px rgba(26, 115, 232, 0.12);
   backdrop-filter: blur(6px);
   animation: fadePulse 1.4s ease-in-out infinite;
}

@keyframes fadePulse {
   0% { opacity: 0.75; transform: translateY(0); }
   50% { opacity: 1; transform: translateY(-3px); }
   100% { opacity: 0.75; transform: translateY(0); }
}

/* ========================================
  返回顶部
======================================== */
.back-to-top {
   position: fixed;
   right: 20px;
   bottom: 20px;
   width: 48px;
   height: 48px;
   background: var(--primary);
   color: white;
   border: none;
   border-radius: 50%;
   cursor: pointer;
   display: none;
   align-items: center;
   justify-content: center;
   box-shadow: var(--shadow-lg);
   transition: var(--transition);
   z-index: 1500;
}

.back-to-top.visible {
   display: flex;
}

.back-to-top:hover {
   background: var(--primary-hover);
   transform: translateY(-2px);
}

/* ========================================
  响应式设计
======================================== */
@media (max-width: 768px) {
   .search-title {
       font-size: 28px;
   }

   .search-box {
       flex-direction: column;
       gap: 8px;
   }

   .search-btn {
       width: 100%;
       justify-content: center;
   }

   .mobile-toggle {
       display: flex;
   }

   .nav-links {
       position: absolute;
       top: 100%;
       left: 0;
       right: 0;
       background: var(--bg-primary);
       flex-direction: column;
       gap: 0;
       padding: 16px 0;
       border-bottom: 1px solid var(--border);
       display: none;
   }

   .nav-links.active {
       display: flex;
   }

   .nav-link,
   .nav-links a {
       padding: 12px 20px;
       border-radius: 0;
       width: 100%;
       text-decoration: none !important;
       color: #5f6368;
   }
   
   .nav-links a:hover,
   .nav-link:hover {
       color: var(--primary);
       text-decoration: none !important;
   }
   
   .nav-links a.active,
   .nav-link.active {
       color: var(--primary) !important;
       text-decoration: none !important;
   }

   .results-header {
       flex-direction: column;
       align-items: flex-start;
       gap: 8px;
   }

   .result-header {
       flex-direction: column;
       align-items: flex-start;
       gap: 8px;
   }

   .result-meta {
       flex-wrap: wrap;
   }

   /* 简约列表移动端适配 */
   .header-controls {
       flex-direction: column;
       align-items: stretch;
   }

   .view-controls {
       width: 100%;
       justify-content: stretch;
   }

   .sort-btn {
       flex: 1;
       justify-content: center;
   }

   .simple-table-wrapper {
       overflow-x: auto;
       -webkit-overflow-scrolling: touch;
   }

   .simple-table {
       min-width: 600px;
   }

   .simple-table thead th {
       padding: 12px 10px;
       font-size: 13px;
   }

   .simple-table tbody td {
       padding: 12px 10px;
   }

   .col-icon {
       width: 40px;
       font-size: 16px;
   }

   .col-name {
       min-width: 150px;
   }

   .col-disk {
       width: 150px;
   }

   .col-time {
       width: 100px;
   }

   .resource-name-cell {
       font-size: 14px;
   }

   .disk-badge-simple {
       padding: 3px 10px;
       font-size: 11px;
   }

   .resource-time-cell {
       font-size: 12px;
   }

   .category-tabs {
       -webkit-overflow-scrolling: touch;
   }

   /* 移动端资源卡片优化 */
   .resource-card {
       padding: 15px;
   }

   .result-title {
       font-size: 14px;
       line-height: 1.6;
       margin-bottom: 12px;
       display: flex;
       flex-wrap: wrap;
       align-items: center;
       gap: 6px;
   }

   .custom-resource-badge,
   .result-badge {
       font-size: 11px;
       padding: 2px 6px;
       margin-right: 0;
       margin-bottom: 4px;
   }

   /* 移动端按钮优化 */
   .resource-buttons {
       flex-direction: column;
       gap: 8px;
   }

   .resource-btn {
       width: 100%;
       padding: 12px 20px;
       font-size: 14px;
       min-width: auto;
   }

   /* 大厅标题移动端优化 */
   .hall-title {
       flex-direction: column;
       align-items: flex-start;
       gap: 8px;
   }

   .hall-count {
       margin-left: 0;
   }

   /* 移动端弹窗优化 */
   .modal {
       padding: 10px;
       align-items: flex-start;
       padding-top: 20px;
   }

   .modal-content {
       max-height: 90vh;
       max-width: 100%;
       margin: 0 auto;
   }

   .modal-header {
       padding: 15px;
   }

   .modal-header h3 {
       font-size: 16px;
   }

   .modal-body {
       padding: 15px;
   }

   .modal-close {
       width: 28px;
       height: 28px;
       font-size: 24px;
   }

   /* 转存成功弹窗移动端优化 */
   .transfer-success {
       padding: 20px 15px !important;
   }

   .transfer-success h3 {
       font-size: 18px !important;
   }

   .transfer-success .file-name {
       font-size: 13px !important;
   }

   .share-link {
       font-size: 13px !important;
       padding: 10px !important;
   }

   .modal-actions {
       flex-direction: column !important;
       width: 100%;
   }

   .modal-actions button {
       width: 100% !important;
       padding: 12px 20px !important;
   }
}

@media (min-width: 769px) and (max-width: 1024px) {
   .archive-list {
       grid-template-columns: repeat(2, 1fr);
   }
}

/* ========================================
  表单样式
======================================== */
.form-group {
   margin-bottom: 20px;
}

.form-group label {
   display: block;
   margin-bottom: 8px;
   font-weight: 500;
   color: var(--text-primary);
}

.form-input,
.form-textarea {
   width: 100%;
   padding: 10px 12px;
   border: 1px solid var(--border);
   border-radius: var(--radius);
   font-size: 14px;
   transition: var(--transition);
   font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
   outline: none;
   border-color: var(--primary);
   box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-textarea {
   resize: vertical;
   min-height: 80px;
}

.form-actions {
   display: flex;
   gap: 12px;
   justify-content: flex-end;
   margin-top: 24px;
}

/* ========================================
  工具类
======================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mt-3 { margin-top: 16px; }

/* ========================================
  手机端卡片样式（替换表格）
======================================== */
@media (max-width: 767.98px) {
   /* 隐藏表格，显示卡片 */
   .simple-table {
       display: none !important;
   }
   
   /* 手机端卡片容器 */
   .mobile-card-container {
       display: block;
   }
   
   .mobile-card-container .resource-card {
       background: var(--bg-primary);
       border-radius: 12px;
       padding: 16px;
       margin-bottom: 12px;
       box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
       border: 1px solid var(--border);
       transition: var(--transition);
   }
   
   .mobile-card-container .resource-card:hover {
       box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
       transform: translateY(-2px);
   }
   
   .mobile-card-container .resource-card:last-child {
       margin-bottom: 0;
   }
   
   .mobile-card-header {
       display: flex;
       align-items: center;
       margin-bottom: 12px;
   }
   
   .mobile-card-icon {
       font-size: 20px;
       margin-right: 12px;
       color: var(--primary);
   }
   
   .mobile-card-title {
       flex: 1;
       font-size: 16px;
       font-weight: 500;
       color: var(--text-primary);
       line-height: 1.4;
       word-break: break-word;
   }
   
   .mobile-card-actions {
       display: flex;
       flex-wrap: wrap;
       gap: 8px;
       margin-bottom: 8px;
   }
   
   .mobile-card-time {
       font-size: 12px;
       color: var(--text-secondary);
       text-align: right;
   }
   
   /* 手机端按钮样式 */
   .disk-badge-simple {
       background: var(--primary);
       color: white;
       border: none;
       border-radius: 6px;
       padding: 8px 12px;
       font-size: 14px;
       font-weight: 500;
       cursor: pointer;
       transition: var(--transition);
       min-width: 80px;
       text-align: center;
   }
   
   .disk-badge-simple:hover {
       background: var(--primary-hover);
       transform: translateY(-1px);
       box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
   }
   
   .disk-badge-simple:active {
       transform: translateY(0);
   }
   
   /* 空状态优化 */
   .table-empty {
       padding: 40px 20px;
       text-align: center;
   }
   
   .table-empty svg {
       width: 48px;
       height: 48px;
       margin-bottom: 16px;
       opacity: 0.6;
   }
   
   .table-empty p {
       font-size: 16px;
       color: var(--text-secondary);
   }
   
   /* 加载状态优化 */
   .table-loading {
       padding: 40px 20px;
       text-align: center;
   }
   
   .loading-spinner {
       width: 32px;
       height: 32px;
       border: 3px solid var(--border);
       border-top: 3px solid var(--primary);
       border-radius: 50%;
       animation: spin 1s linear infinite;
       margin: 0 auto 16px;
   }
   
   .table-loading p {
       font-size: 16px;
       color: var(--text-secondary);
   }
}

/* 桌面端隐藏卡片容器 */
@media (min-width: 768px) {
   .mobile-card-container {
       display: none;
   }
}

/* ========================================
  广告区域样式
======================================== */
.ad-container {
   background: var(--bg-secondary);
   border-bottom: none;
   padding: 10px 0 0 0;
   margin-bottom: 0;
}

/* 文字广告容器 */
.text-ads-container {
   margin-bottom: 10px;
}

.text-ads-grid {
   display: grid;
   grid-template-columns: repeat(5, 1fr);
   gap: 12px;
}

.text-ad-item {
   display: block;
   padding: 10px 16px;
   background: var(--bg-secondary);
   color: var(--text-primary);
   text-decoration: none;
   border-radius: var(--radius);
   text-align: center;
   font-size: 14px;
   transition: var(--transition);
   border: 1px solid var(--border);
   word-break: break-all;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.text-ad-item:hover {
   background: var(--primary);
   color: white;
   border-color: var(--primary);
   transform: translateY(-2px);
   box-shadow: var(--shadow);
   text-decoration: none;
}

/* 图片广告容器 */
.image-ads-container {
   margin-top: 10px;
   margin-bottom: 10px;
}

.image-ads-grid {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   list-style: none;
   padding: 0;
   margin: 0;
}

.image-ads-grid li {
   position: relative;
   overflow: hidden;
   flex: 1 1 calc(50% - 5px);
   min-width: 0;
   height: 90px;
   border-radius: 5px;
   list-style-type: none;
}

.image-ad-item {
   display: block;
   border-radius: var(--radius);
   overflow: hidden;
   transition: var(--transition);
   border: 1px solid var(--border);
   background: var(--bg-secondary);
   width: 100%;
   height: 90px;
   position: relative;
}

.image-ad-item img {
   width: 100%;
   height: 100%;
   display: block;
   /* object-fit: cover; */
   object-position: center;
   background: var(--bg-secondary);
}

.image-ad-item:hover {
   transform: translateY(-2px);
   box-shadow: var(--shadow-lg);
   border-color: var(--primary);
   text-decoration: none;
}

/* 平板和小屏幕适配 */
@media (max-width: 1024px) {
   .image-ads-grid li {
       flex: 1 1 100%;
   }
}

/* 移动端适配 */
@media (max-width: 768px) {
   /* 手机端隐藏文字广告 */
   .text-ads-container {
       display: none;
   }
   
   /* 手机端图片广告单列显示 */
   .image-ads-grid {
       gap: 0.5rem;
   }
   
   .image-ads-grid li {
       flex: 1 1 100%;
       height: auto;
       margin: 0;
   }
   
   .image-ad-item {
       height: 60px;
   }
   
   .ad-container {
       padding: 10px 0;
   }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
   .image-ad-item {
       height: 50px;
   }
   
   .image-ads-container {
       margin-top: 5px;
       margin-bottom: 5px;
   }
}

