:root {
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #3498db;
  --text-color: #333;
  --border-color: #ddd;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
  --warning-color: #f1c40f;
  --bg-color: #f5f5f5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin: 1rem 0;
  color: var(--primary-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
  font-size: 0.9rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.video-card:hover {
  transform: translateY(-5px);
}

.thumbnail {
  position: relative;
  padding-top: 56.25%;
}

.thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info {
  padding: 1rem;
}

.video-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.meta {
  font-size: 0.9rem;
  color: #666;
  display: flex;
  justify-content: space-between;
}

.tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  background: var(--accent-color);
  color: var(--secondary-color);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* 表格容器 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 表格样式 */
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px; /* 确保表格有最小宽度 */
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table th {
  background-color: var(--primary-color);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* 移动端表格样式 */
@media (max-width: 768px) {
  .table th,
  .table td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .form-select {
    font-size: 0.9rem;
  }
}

/* 种族标签样式 */
.race-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.race-o {
  background-color: #f39c12;
  color: white;
}
.race-n {
  background-color: #27ae60;
  color: white;
}
.race-u {
  background-color: #8e44ad;
  color: white;
}
.race-h {
  background-color: #3498db;
  color: white;
}

/* 结果标签样式 */
.result-label {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.result-win {
  background-color: var(--success-color);
  color: white;
}
.result-lose {
  background-color: var(--danger-color);
  color: white;
}
.result-null {
  background-color: var(--warning-color);
  color: black;
}

/* 视频链接样式 */
.video-link {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.video-link:hover {
  background-color: var(--secondary-color);
}

/* 加载状态 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* 错误提示 */
.error-message {
  padding: 1rem;
  margin: 1rem 0;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

/* 赞助区域 */
.sponsor {
  text-align: center;
  margin: 2rem 0;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sponsor h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.sponsor-qr {
  max-width: 200px;
  height: auto;
  margin: 0 auto;
}
/* 分页控件样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.pagination button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background-color: white;
  color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 40px;
  text-align: center;
}

.pagination button:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

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

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 表格提示样式 */
.table-hint {
  text-align: center;
  margin: 1rem 0;
  color: var(--text-color);
  font-size: 0.9rem;
}

/* 移动端分页样式 */
@media (max-width: 768px) {
  .pagination {
    gap: 0.25rem;
  }

  .pagination button {
    padding: 0.25rem 0.5rem;
    min-width: 30px;
    font-size: 0.9rem;
  }
}
