/* 历史查询页面专用样式 */

.page-header {
  position: relative;
  margin-bottom: 25px;
}

.back-btn {
  display: inline-block;
  color: white;
  text-decoration: none;
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 12px;
  transition: background 0.2s;
}

.back-btn:hover {
  background: rgba(255,255,255,0.35);
}

/* 加载动画 */
.loading-box {
  background: white;
  border-radius: 16px;
  padding: 50px 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

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

/* 错误提示 */
.error-box {
  background: #fdecea;
  border: 1px solid #e74c3c;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: #c0392b;
}

.error-detail {
  font-size: 0.85rem;
  color: #666;
  margin: 10px 0;
  word-break: break-all;
}

.retry-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 8px;
}

/* 统计栏 */
.stats-bar {
  background: white;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-size: 1.3rem;
  font-weight: bold;
  color: #667eea;
}

.stat-label {
  font-size: 0.8rem;
  color: #888;
}

/* 工具栏 */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
}

.search-input:focus {
  border-color: #667eea;
}

.filter-select {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  outline: none;
}

/* 记录列表 */
.records-section {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
  flex-wrap: wrap;
}

.record-row:last-child {
  border-bottom: none;
}

.record-row:hover {
  background: #f8f9fa;
}

.record-issue {
  font-weight: bold;
  color: #e74c3c;
  min-width: 80px;
  font-size: 0.95rem;
}

.record-date {
  color: #666;
  font-size: 0.85rem;
  min-width: 130px;
}

.record-balls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* 每个号码球 + 正下方生肖的竖排组合 */
.ball-with-zodiac-sm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.record-ball-zodiac {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: #f3e5f5;
  color: #8e44ad;
  font-size: 0.65rem;
  font-weight: bold;
  border: 1px solid #d7bde2;
}

.record-pet {
  color: #9b59b6;
  font-size: 0.85rem;
  margin-left: auto;
}

/* 回放按钮 */
.play-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}


/* 回放按钮 */
.play-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.play-btn:hover {
  background: #c0392b;
}

/* 视频播放弹窗 */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.video-box {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.video-box video {
  width: 100%;
  display: block;
  max-height: 80vh;
}

.video-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #333;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.video-close:hover {
  background: white;
}

/* 历史页的小号球体 */
.draw-ball-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.18);
}

.draw-ball-sm.red { background: linear-gradient(145deg, #ff6b6b, #c0392b); }
.draw-ball-sm.blue { background: linear-gradient(145deg, #74b9ff, #2980b9); }
.draw-ball-sm.green { background: linear-gradient(145deg, #55efc4, #27ae60); }
.draw-ball-sm.gray { background: #95a5a6; }
