/* 基础样式 */
body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #f0f2f5;
}

/* 最新开奖结果头部样式 */
.current-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 5px 15px 0 15px;
}

.history-btn {
  background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
}

.history-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #207cca 0%, #1e5799 100%);
}

.history-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 历史页面头部样式 */
.history-page-header {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.history-page-header h1 {
  margin: 0 0 1rem 0;
  font-size: 2.1rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.history-page-header p {
  margin: 0;
  font-size: 1.2rem;
  opacity: 0.9;
}



/* 历史页面筛选器样式 */
.history-filters {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-container {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.year-selector,
.page-size-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.year-selector span,
.page-size-selector span {
  font-weight: bold;
  color: #333;
}

.year-selector select,
.page-size-selector select {
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.year-selector select:focus,
.page-size-selector select:focus {
  outline: none;
  border-color: #1e5799;
  box-shadow: 0 0 0 3px rgba(30, 87, 153, 0.1);
}

/* 历史结果区域样式 */
.history-results {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 图库样式 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-preview-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-preview-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-preview-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.gallery-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-preview-item:hover .gallery-preview-image img {
  transform: scale(1.1);
}

.gallery-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.7)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-preview-item:hover .gallery-preview-overlay {
  opacity: 1;
}

.gallery-preview-info {
  text-align: center;
  color: white;
  padding: 1rem;
}

.gallery-preview-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.gallery-preview-info p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.gallery-preview-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.8rem;
}

.gallery-preview-caption {
  padding: 1rem;
}

.gallery-preview-caption h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.1rem;
}

.gallery-preview-caption p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* 图库页面样式 */
.gallery-page-header {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.gallery-page-header h1 {
  margin: 0 0 1rem 0;
  font-size: 2.1rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-page-header p {
  margin: 0;
  font-size: 1.2rem;
  opacity: 0.9;
}

.gallery-filters {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-detail {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

.gallery-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.7)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-info {
  text-align: center;
  color: white;
  padding: 1.5rem;
}

.gallery-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  font-weight: bold;
}

.gallery-info p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  opacity: 0.9;
}

.gallery-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.gallery-caption {
  padding: 1.5rem;
}

.gallery-caption h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.2rem;
}

.gallery-caption p {
  margin: 0 0 1rem 0;
  color: #666;
  font-size: 1rem;
  line-height: 1.4;
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #999;
}

/* 全屏图片详情模态框样式 */
.image-modal-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease-out;
}

.image-modal-fullscreen.show {
  opacity: 1;
  transform: scale(1);
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-container {
  position: relative;
  width: 98%;
  height: 98%;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.modal-header-minimal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-controls button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal-controls button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.modal-close {
  font-size: 1.5rem;
  font-weight: bold;
}

.modal-content-area {
  flex: 1;
  display: flex;
  position: relative;
}

.image-viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.image-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.info-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 350px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.info-panel.show {
  transform: translateX(0);
}

.info-content {
  padding: 20px;
}

.zoom-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1001;
}

.zoom-controls .zoom-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.zoom-controls .zoom-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.zoom-controls .zoom-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 原有模态框样式保留用于兼容性 */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 95%;
  max-height: 95%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.8rem;
  font-weight: bold;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  background: #e9ecef;
  color: #333;
  transform: rotate(90deg);
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.zoom-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
}

.zoom-btn:hover:not(:disabled) {
  background: #1e5799;
  color: white;
  border-color: #1e5799;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.zoom-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
  color: #999;
}

.zoom-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.zoom-in {
  font-size: 1.4rem;
}

.zoom-out {
  font-size: 1.4rem;
}

.zoom-reset {
  font-size: 1rem;
}

/* 拖动提示 */
.drag-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.drag-hint.show {
  opacity: 1;
}

/* 图片拖动时的视觉反馈 */
.zoomable-image.dragging {
  transition: none !important;
}

.zoomable-image.dragging::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.modal-body {
  display: flex;
  flex-direction: column;
  max-height: calc(95vh - 120px);
  overflow-y: auto;
}

.modal-image {
  text-align: center;
  padding: 2rem;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.modal-image img {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.modal-image img:hover {
  transform: scale(1.02);
}

.zoomable-image {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

.modal-image {
  overflow: hidden;
  position: relative;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.modal-image:has(.zoomable-image[style*="scale(1)"]) {
  cursor: zoom-in;
}

.modal-image:has(.zoomable-image[style*="scale("]:not([style*="scale(1)"])) {
  cursor: grab;
}

.modal-image:has(
    .zoomable-image[style*="scale("]:not([style*="scale(1)"])
  ):active {
  cursor: grabbing;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .modal-image {
    min-height: 250px;
    padding: 1rem;
  }

  .modal-image img {
    max-height: 40vh;
    max-width: 100%;
  }

  .zoomable-image {
    max-width: 100% !important;
    max-height: 40vh !important;
    object-fit: contain;
  }

  /* 移动端拖动提示优化 */
  .drag-hint {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.8);
  }

  /* 移动端缩放按钮优化 */
  .modal-controls {
    gap: 0.3rem;
  }

  .zoom-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    margin-left: 0.3rem;
  }

  .zoom-in,
  .zoom-out {
    font-size: 1.3rem;
  }

  .zoom-reset {
    font-size: 1rem;
  }

  /* 全屏模态框移动端优化 */
  .image-modal-fullscreen {
    padding: 0;
  }

  .modal-header-minimal {
    padding: 15px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .modal-controls button {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .info-panel {
    width: 100%;
    height: 50vh;
    top: auto;
    bottom: 0;
    transform: translateY(100%);
  }

  .info-panel.show {
    transform: translateY(0);
  }

  .zoom-controls {
    bottom: 15px;
  }

  .zoom-controls .zoom-btn {
    width: 55px;
    height: 55px;
    font-size: 1.8rem;
  }

  .zoom-indicator {
    top: 15px;
    right: 15px;
    font-size: 12px;
    padding: 6px 10px;
  }
}

.modal-info {
  padding: 2rem;
  flex: 1;
}

.modal-info .description {
  margin: 0 0 2rem 0;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #1e5799;
}

.modal-content-text {
  margin: 2rem 0;
  line-height: 1.8;
  color: #333;
}

.modal-content-text h3 {
  color: #1e5799;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.modal-content-text p {
  margin-bottom: 1rem;
  text-align: justify;
}

.modal-content-text ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.modal-content-text li {
  margin-bottom: 0.5rem;
}

.modal-content-text strong {
  color: #1e5799;
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #1e5799;
}

.stat-item .label {
  font-weight: bold;
  color: #666;
}

.stat-item .value {
  color: #333;
  font-weight: 600;
}

/* 现代化页头样式 */
.main-header {
  background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
  color: white;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header.scrolled {
  background: linear-gradient(
    135deg,
    rgba(30, 87, 153, 0.98) 0%,
    rgba(32, 124, 202, 0.98) 100%
  );
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

header {
  background: linear-gradient(
    135deg,
    rgba(30, 87, 153, 0.95) 0%,
    rgba(32, 124, 202, 0.95) 100%
  );
  color: white;
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

header.scrolled {
  background: linear-gradient(
    135deg,
    rgba(30, 87, 153, 0.98) 0%,
    rgba(32, 124, 202, 0.98) 100%
  );
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
  padding: 0.7rem 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
}

header.scrolled .header-container {
  padding: 0.7rem 2rem;
}

/* 汉堡菜单样式 */
.hamburger-menu {
  display: none;
  flex-direction: column;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 4px;
  pointer-events: auto;
  z-index: 999;
  position: relative;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端导航样式 */
.mobile-nav {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
  transform: translateX(-100%);
  transition: transform 0.3s ease, opacity 0.3s;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
}

.mobile-nav.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-container {
  padding: 3.5rem 1.2rem 1.2rem 1.2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: 80vw;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 420px;
}

.mobile-nav-link {
  display: block;
  background: #fff;
  color: #17407e;
  text-decoration: none;
  padding: 1.3rem 1.2rem;
  font-size: 1.22rem;
  font-weight: 700;
  border-radius: 20px;
  margin: 0 auto;
  box-shadow: 0 2px 12px rgba(23,64,126,0.12);
  text-align: center;
  border: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  width: 100%;
  max-width: 420px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: #1e5799;
  color: #fff;
  /* box-shadow: 0 4px 20px rgba(23,64,126,0.20); */
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  position: relative;
  z-index: 999;
}

.main-nav {
  display: flex;
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 0.5rem 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.2rem;
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
  background: transparent;
  overflow: hidden;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.nav-link.active {
  /* background: rgba(255, 255, 255, 0.25); */
  color: #fff;
  font-weight: bold;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); */
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link:hover::before {
  opacity: 1;
}

.logo {
  height: 60px;
  width: auto;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.logo:hover {
  transform: scale(1.05) rotate(2deg);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  color: white;
  position: relative;
  background: linear-gradient(135deg, #fff, #f0f0f0, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

h1::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.4),
    transparent
  );
  border-radius: 2px;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 20% 50%,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  z-index: 1;
}

/* nav 全局样式移除计划：以下为原全局样式，已注释，避免影响主导航体系 */
/*
nav {
    background: linear-gradient(135deg, #0d2b5e 0%,#1257a8 100%);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem auto;
    max-width: 1200px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}
nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    margin: 0;
    flex-wrap: wrap;
    gap: 1rem;
}
nav li {
    margin: 0;
    min-width: 120px;
    text-align: center;
}
nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.8rem 0;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
}
nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}
nav a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    background: linear-gradient(145deg, rgba(255,255,255,0.3), rgba(255,255,255,0.2));
    z-index: 1;
}
nav a:hover::before {
    left: 100%;
}
nav a.active {
    background: linear-gradient(145deg, rgba(255,255,255,0.4), rgba(255,255,255,0.3));
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    z-index: 2;
}
nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: rgb(252, 3, 3);
    border-radius: 3px;
}
*/

/* 响应式下全局nav样式 */
@media (max-width: 768px) {
  /*
    nav {
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    }
    nav ul {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    nav li {
        margin: 0 0.5rem;
        min-width: auto;
        flex: 0 0 auto;
    }
    nav a {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
        white-space: nowrap;
        background: linear-gradient(145deg, rgba(255,255,255,0.3), rgba(255,255,255,0.2));
    }
    */
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  transition: opacity 0.3s ease;
  margin-top: 100px; /* 为固定页头留出空间 */
}

section {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* padding: 0.5rem; */
  margin-bottom: 2rem;
}

.home-content,
.contact-content,
.api-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.home-content h2 {
  color: #1e5799;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-content h2 {
  color: #1e5799;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.contact-content a {
  color: #207cca;
  text-decoration: none;
  font-weight: bold;
}

.contact-content a:hover {
  text-decoration: underline;
}

.api-content h2 {
  color: #1e5799;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.api-content h3 {
  color: #207cca;
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem;
  text-align: left;
}

.api-content p {
  text-align: left;
  margin: 0.5rem 0;
}

.api-content ul {
  text-align: left;
  margin: 0.5rem 0 1.5rem;
  padding-left: 1.5rem;
}

.api-content pre {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1rem 0;
  text-align: left;
}

h2 {
  color: #e74c3c;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 0.5rem;
  margin-top: 0;
}

.year-selector {
  margin: 1rem 0;
}

select {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* 开奖结果样式 */
#current-data,
#history-data {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50%, 1fr));
  gap: 1rem;
}

.lottery-item {
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: 4px;
  border-left: 4px solid #e74c3c;
}

.lottery-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
  justify-content: center;
}

/* 历史数据表格样式 */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background-color: #fff;
}

.history-table th,
.history-table td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.history-table td.period {
  width: 150px;
  text-align: right;
  padding-right: 15px;
}

.history-table td.time {
  width: 160px;
  text-align: left;
}

.history-table td.numbers {
  text-align: left;
  padding-left: 20px;
}

.history-table th {
  background-color: #f5f5f5;
  font-weight: bold;
  color: #333;
}

.history-table tr:hover {
  background-color: #f9f9f9;
}

.history-table .period {
  font-weight: bold;
  color: #e74c3c;
}

.history-table .time {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.history-table .numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.number-circle {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  margin-top: 5px;
}

.number-circle.red {
  border: 2px solid #e74c3c;
}

.number-circle.blue {
  border: 2px solid #3498db;
}

.number-circle.green {
  border: 2px solid #2ecc71;
}

.number-circle .number {
  font-weight: bold;
  font-size: 1rem;
  color: #333;
}

.number-circle .animal {
  display: none; /* 使用新的.zodiac样式替代 */
}

.plus-sign {
  font-size: 1.5rem;
  font-weight: bold;
  color: #555;
  margin: 0 5px;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  gap: 5px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
  background-color: #f5f5f5;
  border-color: #aaa;
}

.pagination button.active {
  background-color: #1e5799;
  color: white;
  border-color: #1e5799;
}

.pagination button:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.pagination .ellipsis {
  padding: 8px 12px;
  color: #777;
}

.pagination-info {
  text-align: center;
  color: #777;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.lottery-ball-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 5px 1.5rem;
}

/* 改进的开奖球样式 */
.ball {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  line-height: 1;
  padding: 0;
  position: relative;
}

.zodiac {
  font-size: 1rem;
  margin-top: 8px;
  color: #d35400;
  font-weight: bold;
  text-align: center;
  background: rgba(255,255,255,0.8);
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-width: 32px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  .ball {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
  .zodiac {
    font-size: 0.8rem;
    margin-top: 4px;
    padding: 1px 4px;
    min-width: 20px;
    min-height: 14px;
  }
}

.loading {
  color: #3498db;
  text-align: center;
  padding: 1.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  /* animation: pulse 1.5s infinite;  // 移除呼吸动画 */
}

.error {
  background-color: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 1.5rem;
  color: #721c24;
  margin: 1rem 0;
}

.error p {
  margin: 0.5rem 0;
}

.error p:first-child {
  font-weight: bold;
  font-size: 1.1rem;
}

.warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  padding: 1rem;
  color: #856404;
  margin: 1rem 0;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

/* 改进的开奖结果容器 */
.lottery-result-container {
  background-color: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.lottery-result-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #e74c3c, #3498db, #2ecc71);
}

.lottery-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.lottery-name {
  font-size: 1.8rem;
  font-weight: bold;
  color: #333;
}

.lottery-period {
  font-size: 1.5rem;
  color: #e74c3c;
  font-weight: bold;
}

.lottery-next-draw {
  text-align: right;
  margin-bottom: 20px;
  color: #3498db;
}

.next-draw-info {
  font-size: 1rem;
  font-weight: bold;
}

.lottery-balls-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 25px 0;
  padding: 0 20px;
}

.lottery-ball-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

/* 改进的倒计时样式 */
.countdown-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.timer-digit {
  height: 50px;
  width: 40px;
  background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  border-radius: 6px;
  margin: 0 3px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.timer-separator {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0 5px;
  color: #1e5799;
}

.plus-symbol {
  font-size: 2.5rem;
  font-weight: bold;
  color: #e74c3c;
  margin: 0 10px;
  align-self: center;
}

.lottery-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.simulate-draw-btn {
  background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.simulate-draw-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 球体动画 */
@keyframes ballAppear {
  0% {
    transform: scale(0.5) translateY(50px);
    opacity: 0;
  }
  80% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.ball {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  color: white;
  font-weight: bold;
  position: relative;
  margin: 0 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: 1.8rem;
  transition: all 0.3s;
  transform: scale(0.9);
  animation: ballAppear 0.5s ease-out forwards;
  animation-delay: calc(var(--order) * 0.1s);
}

.ball:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.ball.red {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.ball.blue {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.ball.green {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.ball::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.1)
  );
  border-radius: 70px 70px 0 0;
}

/* 页脚样式 */
/* 现代化页尾样式 */
.site-footer {
  background: linear-gradient(135deg, #1a4b8c 0%, #1c6fc9 100%);
  color: white;
  margin-top: 3rem;
  position: relative;
  padding: 2rem 0;
}

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

/* 主要页尾内容 */
.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0 0 2rem 0;
  margin-bottom: 2rem;
}

/* 页尾卡片基础样式 */
.footer-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.footer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffcc00, #ff6b35, #ffcc00);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

.footer-card:hover::before {
  opacity: 1;
}

.card-content {
  padding: 1.5rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #ffcc00;
  position: relative;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #ffcc00, #ff6b35);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.footer-card:hover .footer-title::after {
  width: 60px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.footer-links a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.footer-links a::before {
  content: "→";
  position: absolute;
  left: 8px;
  opacity: 0;
  transition: all 0.3s ease;
  font-weight: bold;
  color: #ffcc00;
}

.footer-links a:hover::before {
  opacity: 1;
  left: 12px;
}

/* 联系信息样式 */
.contact-info p {
  margin: 0.8rem 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 0.5rem 0;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.contact-info p:hover {
  background: rgba(255, 255, 255, 0.05);
  padding-left: 0.5rem;
}

.contact-info strong {
  color: #ffcc00;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 页尾底部 */
.footer-bottom {
  margin-bottom: 1.5rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.copyright {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-actions {
  display: flex;
  gap: 1rem;
}

/* 返回顶部按钮 */
.back-to-top {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.back-to-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.back-to-top:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.back-to-top:hover::before {
  left: 100%;
}

.back-to-top:active {
  transform: translateY(-1px) scale(1.02);
}

.back-to-top-icon {
  font-size: 1.4rem;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

/* 免责声明 */
.disclaimer {
  margin-top: 1rem;
}

.disclaimer h4 {
  color: #ffcc00;
  margin: 0 0 1.2rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  padding-left: 1rem;
}

.disclaimer h4::before {
  content: '⚠️';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}

.disclaimer p {
  margin: 0.8rem 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  padding: 0.5rem 0;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.disclaimer p:hover {
  background: rgba(255, 255, 255, 0.05);
  padding-left: 0.5rem;
}

footer {
  background: linear-gradient(135deg, #1a4b8c 0%, #1c6fc9 100%);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 0.8;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 轮播广告样式 */
.carousel-container {
  width: 100%;
  max-width: 1200px;
  margin: 1rem auto;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.carousel-slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slides img {
  width: 100%;
  flex-shrink: 0;
  height: auto;
  object-fit: cover;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.carousel-prev,
.carousel-next {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 4px;
  margin: 0 1rem;
  transition: all 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* 响应式设计 */
@media (max-width: 768px) {
  /* 页头响应式优化 */
  .header-container {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
  }

  header.scrolled .header-container {
    padding: 0.6rem 1rem;
  }

  .logo-title {
    flex-shrink: 0;
  }

  .logo {
    height: 40px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .main-nav {
    display: none;
  }

  .hamburger-menu {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }
  
  .mobile-nav-container {
    padding-top: 5rem;
  }
  
  .mobile-nav-link {
    font-size: 1.2rem;
    padding: 1.3rem 1.5rem;
    margin-bottom: 0.5rem;
  }

  /* 页尾响应式优化 */
  .footer-main {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0 1.5rem 0;
  }

  .footer-card {
    border-radius: 12px;
  }

  .card-content {
    padding: 1.2rem;
  }

  .footer-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .footer-links {
    gap: 0.6rem;
  }

  .footer-links a {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .back-to-top {
    width: 44px;
    height: 44px;
  }

  .back-to-top-icon {
    font-size: 1.2rem;
  }

  .disclaimer h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .disclaimer p {
    font-size: 0.85rem;
    margin: 0.6rem 0;
  }

  .logo-title {
    justify-content: center;
    text-align: center;
  }

  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
  }

  nav {
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  }

  nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  nav li {
    margin: 0 0.5rem;
    min-width: auto;
    flex: 0 0 auto;
  }

  nav a {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    white-space: nowrap;
    background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.3),
      rgba(255, 255, 255, 0.2)
    );
  }

  /* 移动端彩票类型导航优化 */
  .lottery-nav {
    padding: 0.8rem;
    margin: 0.8rem auto;
    border-radius: 6px;
  }

  .lottery-nav ul {
    gap: 0.5rem;
  }

  .lottery-nav li {
    min-width: 80px;
  }

  .lottery-nav a {
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
    border-radius: 20px;
  }

  #current-data,
  #history-data {
    grid-template-columns: 1fr;
  }

  .lottery-item {
    padding: 0.8rem;
    margin-bottom: 1rem;
  }

  .ball {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .carousel-controls {
    top: auto;
    bottom: 10px;
    transform: none;
  }

  .carousel-prev,
  .carousel-next {
    padding: 0.3rem 0.8rem;
    font-size: 1rem;
  }

  /* 移动端开奖结果容器优化 */
  .lottery-result-container {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
  }

  .lottery-header-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .lottery-name {
    font-size: 1.3rem;
    line-height: 1.2;
  }

  .lottery-period {
    font-size: 1.1rem;
    align-self: flex-end;
  }

  .lottery-next-draw {
    text-align: center;
    margin-bottom: 15px;
  }

  .next-draw-info {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .lottery-balls-container {
    gap: 8px;
    margin: 15px 0;
    padding: 0 10px;
    justify-content: center;
  }

  .lottery-ball-container {
    margin-bottom: 8px;
  }

  /* 移动端球体优化 */
  .ball {
    width: 55px;
    height: 55px;
    font-size: 1.4rem;
    margin: 0 3px;
  }

  .zodiac {
    font-size: 0.9rem;
    margin-top: 4px;
    padding: 1px 6px;
  }

  .plus-symbol {
    font-size: 1.8rem;
    margin: 0 5px;
  }

  /* 移动端倒计时优化 */
  .countdown-timer {
    margin: 15px 0;
    padding: 12px;
    border-radius: 6px;
  }

  .timer-digit {
    height: 35px;
    width: 25px;
    font-size: 1.2rem;
    margin: 0 2px;
    border-radius: 4px;
  }

  .timer-separator {
    font-size: 1.2rem;
    margin: 0 3px;
  }

  /* 历史开奖卡片样式 */
  .history-table {
    display: none;
  }

  /* 移动端当前开奖结果头部优化 */
  .current-header {
    flex-direction: column;
    gap: 0.8rem;
    align-items: stretch;
    padding: 0.8rem 1rem 0 1rem;
  }

  .current-header h2 {
    font-size: 1.3rem;
    margin: 0;
    text-align: center;
  }

  .history-btn {
    align-self: center;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
  }

  .history-page-header {
    margin: 1rem 0;
    padding: 1.5rem;
  }

  .history-page-header h1 {
    font-size: 1.8rem;
  }

  .history-page-header p {
    font-size: 1rem;
  }

  .filter-container {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .year-selector,
  .page-size-selector {
    justify-content: space-between;
  }

  /* 移动端图库样式调整 */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .gallery-preview-image {
    height: 150px;
  }

  .gallery-preview-info h3 {
    font-size: 1rem;
  }

  .gallery-preview-info p {
    font-size: 0.8rem;
  }

  .gallery-detail-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .gallery-image {
    height: 200px;
  }

  .gallery-info h3 {
    font-size: 1.1rem;
  }

  .gallery-info p {
    font-size: 0.9rem;
  }

  .modal-content {
    max-width: 98%;
    max-height: 98%;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }

  .modal-image {
    padding: 1rem;
  }

  .modal-image img {
    max-height: 40vh;
  }

  .modal-info {
    padding: 1rem;
  }

  .modal-content-text {
    margin: 1rem 0;
  }

  .modal-content-text h3 {
    font-size: 1.2rem;
  }

  .modal-content-text p {
    font-size: 0.95rem;
  }

  .modal-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .modal-controls {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .zoom-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    margin-left: 0.3rem;
  }

  .zoom-in,
  .zoom-out {
    font-size: 1.2rem;
  }

  .zoom-reset {
    font-size: 0.9rem;
  }

  .history-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-bottom: 15px;
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
  }

  .card-period {
    font-weight: bold;
    color: #e74c3c;
  }

  .card-time {
    color: #7f8c8d;
    font-size: 0.9rem;
  }

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

  .history-card .ball {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    margin-bottom: 5px;
  }

  .history-card .zodiac {
    font-size: 0.8rem;
    margin-top: 4px;
  }
}

/* 九宫格导航区样式 */
.nav-grid-section {
  margin: 2rem 0 2.5rem 0;
  display: flex;
  justify-content: center;
}
.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem 0.8rem;
  width: 100%;
  /* max-width: 700px; */
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 1.5rem 1rem;
}
.nav-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #f7fafd;
  border-radius: 12px;
  padding: 1.1rem 0.2rem 0.7rem 0.2rem;
  box-shadow: 0 1px 4px rgba(30, 87, 153, 0.04);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  position: relative;
  min-width: 80px;
  min-height: 80px;
}
.nav-grid-item:hover {
  box-shadow: 0 4px 16px rgba(30, 87, 153, 0.12);
  transform: translateY(-3px) scale(1.04);
}
.nav-icon {
  width: 40px;
  font-size: 2.1rem;
  margin-bottom: 0.4rem;
  display: block;
}
.nav-title {
  font-size: 1.05rem;
  color: #333;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.1rem;
}
.nav-badge {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.badge-hot {
  background: #ff4d4f;
}
.badge-must {
  background: #ff9800;
}
.badge-info {
  background: #1e90ff;
}

@media (max-width: 900px) {
  .nav-grid {
    grid-template-columns: repeat(3, 1fr);
    /* max-width: 420px; */
  }
}
@media (max-width: 600px) {
  .nav-grid {
    grid-template-columns: repeat(2, 1fr);
    /* max-width: 98vw; */
    padding: 1rem 0.2rem;
  }
  .nav-grid-item {
    min-width: 90px;
    min-height: 90px;
    font-size: 0.98rem;
  }
}

/* 老黄历页面样式 */
.calendar-section {
  max-width: 480px;
  margin: 2.5rem auto 2.5rem auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem 2.5rem 1.5rem;
}
.calendar-date-picker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}
#calendar-date {
  font-size: 1.1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #d0d0d0;
}
.calendar-info {
  background: #f7fafd;
  border-radius: 10px;
  padding: 1.2rem 1rem;
  font-size: 1.08rem;
  color: #333;
  line-height: 2.1;
  box-shadow: 0 1px 4px rgba(30, 87, 153, 0.04);
}
.calendar-info strong {
  color: #1e90ff;
  font-weight: 600;
  margin-right: 0.2em;
}
.calendar-yi {
  color: #43a047;
  font-weight: bold;
}
.calendar-ji {
  color: #e53935;
  font-weight: bold;
}
@media (max-width: 600px) {
  .calendar-section {
    padding: 1.2rem 0.3rem 1.5rem 0.3rem;
  }
  .calendar-info {
    font-size: 0.98rem;
    padding: 0.8rem 0.3rem;
  }

  /* 小屏幕开奖结果进一步优化 */
  .lottery-result-container {
    padding: 10px;
    margin-bottom: 15px;
  }

  .lottery-header-row {
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .lottery-name {
    font-size: 1.2rem;
  }

  .lottery-period {
    font-size: 1rem;
  }

  .next-draw-info {
    font-size: 0.85rem;
  }

  .lottery-balls-container {
    gap: 6px;
    margin: 12px 0;
    padding: 0 8px;
  }

  .ball {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    margin: 0 2px;
  }

  .zodiac {
    font-size: 0.8rem;
    margin-top: 3px;
    padding: 1px 4px;
  }

  .plus-symbol {
    font-size: 1.6rem;
    margin: 0 3px;
  }

  .countdown-timer {
    margin: 12px 0;
    padding: 10px;
  }

  .timer-digit {
    height: 32px;
    width: 22px;
    font-size: 1.1rem;
    margin: 0 1px;
  }

  .timer-separator {
    font-size: 1.1rem;
    margin: 0 2px;
  }
}

/* 超小屏幕优化 (320px-480px) */
@media (max-width: 480px) {
  .lottery-result-container {
    padding: 8px;
    margin-bottom: 12px;
  }

  .lottery-header-row {
    gap: 4px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .lottery-name {
    font-size: 1.1rem;
  }

  .lottery-period {
    font-size: 0.9rem;
  }

  .next-draw-info {
    font-size: 0.8rem;
  }

  .lottery-balls-container {
    gap: 4px;
    margin: 10px 0;
    padding: 0 5px;
  }

  .ball {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    margin: 0 1px;
  }

  .zodiac {
    font-size: 0.75rem;
    margin-top: 2px;
    padding: 1px 3px;
  }

  .plus-symbol {
    font-size: 1.4rem;
    margin: 0 2px;
  }

  .countdown-timer {
    margin: 10px 0;
    padding: 8px;
  }

  .timer-digit {
    height: 28px;
    width: 20px;
    font-size: 1rem;
    margin: 0 1px;
  }

  .timer-separator {
    font-size: 1rem;
    margin: 0 1px;
  }

  /* 超小屏幕当前开奖结果头部优化 */
  .current-header {
    gap: 0.5rem;
    padding: 0.5rem 0.6rem 0 0.6rem;
  }

  .current-header h2 {
    font-size: 1.1rem;
  }

  .history-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  /* 超小屏幕加载和错误状态优化 */
  .loading {
    padding: 1rem;
    font-size: 0.85rem;
  }

  .error {
    padding: 0.6rem;
    margin: 0.5rem 0;
  }

  .error p {
    font-size: 0.8rem;
  }

  .error p:first-child {
    font-size: 0.9rem;
  }

  /* 超小屏幕趣味内容优化 */
  .fun-quotes {
    padding: 0.6rem;
    border-radius: 4px;
  }

  .quote-text {
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0.25rem 0;
  }

  /* 超小屏幕模态框头部优化 */
  .modal-header-minimal {
    padding: 10px;
    gap: 8px;
  }

  .modal-title {
    font-size: 1rem;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .modal-controls {
    gap: 5px;
    flex-shrink: 0;
  }

  .modal-controls button {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .zoom-indicator {
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 4px 8px;
  }

  /* 小屏幕彩票导航进一步优化 */
  .lottery-nav {
    padding: 0.6rem;
    margin: 0.6rem auto;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  /* 隐藏Webkit浏览器的滚动条 */
  .lottery-nav::-webkit-scrollbar {
    display: none;
  }

  .lottery-nav ul {
    gap: 0.3rem;
    /* 确保内容不会被滚动条遮挡 */
    padding-bottom: 2px;
  }

  .lottery-nav li {
    min-width: 70px;
    flex-shrink: 0; /* 防止项目被压缩 */
  }

  .lottery-nav a {
    font-size: 0.8rem;
    padding: 0.5rem 0.4rem;
    white-space: nowrap; /* 防止文字换行 */
  }

  /* 小屏幕当前开奖结果头部进一步优化 */
  .current-header {
    gap: 0.6rem;
    padding: 0.6rem 0.8rem 0 0.8rem;
  }

  .current-header h2 {
    font-size: 1.2rem;
  }

  .history-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  /* 小屏幕加载和错误状态进一步优化 */
  .loading {
    padding: 1.2rem;
    font-size: 0.9rem;
  }

  .error {
    padding: 0.8rem;
    margin: 0.6rem 0;
  }

  .error p {
    font-size: 0.85rem;
  }

  .error p:first-child {
    font-size: 0.95rem;
  }

  /* 小屏幕趣味内容进一步优化 */
  .fun-quotes {
    padding: 0.8rem;
    border-radius: 6px;
  }

  .quote-text {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.3rem 0;
  }
}

/* 新增样式 - 优化页面显示 */

/* 英雄区域样式 */
.hero-section {
  margin-bottom: 2rem;
}

/* 轮播指示器样式 */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: white;
  transform: scale(1.2);
}

/* 彩票导航样式 */
.lottery-nav {
  background: linear-gradient(135deg, #0d2b5e 0%, #1257a8 100%);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem auto;
  max-width: 1200px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 加载状态样式 */
.loading {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* 移动端加载和错误状态优化 */
@media (max-width: 768px) {
  .loading {
    padding: 1.5rem;
    font-size: 0.95rem;
  }

  .error {
    padding: 1rem;
    margin: 0.8rem 0;
    border-radius: 6px;
  }

  .error p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
  }

  .error p:first-child {
    font-size: 1rem;
  }
}

/* 趣味内容区域样式 */
.fun-content {
  margin: 2rem 0;
}

.fun-quotes {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #ff6b6b;
}

.quote-text {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  font-style: italic;
}

/* 区域标题样式 */
.section-title {
  text-align: center;
  color: #333;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #1e5799, #207cca);
  border-radius: 2px;
}

/* 图库预览区域样式 */
.gallery-preview {
  margin: 3rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.8rem;
}

.view-more-btn {
  background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.view-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .carousel-indicators {
    bottom: 10px;
  }

  .indicator {
    width: 10px;
    height: 10px;
  }

  .section-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .fun-quotes {
    padding: 1rem;
    border-radius: 8px;
  }

  .quote-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.4rem 0;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* 组件容器样式 */
#header-container,
#footer-container {
  min-height: 1px;
}

/* 页面过渡动画 */
main {
  animation: fadeInUp 0.6s ease-out;
}

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

/* 卡片悬停效果增强 */
.nav-grid-item:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(30, 87, 153, 0.2);
}

/* 按钮点击效果 */
.btn:active,
.history-btn:active,
.view-more-btn:active {
  transform: translateY(0) scale(0.98);
}

/* 图片懒加载优化 */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* 无障碍优化 */
.carousel-prev:focus,
.carousel-next:focus,
.indicator:focus {
  outline: 2px solid #1e5799;
  outline-offset: 2px;
}

/* 打印样式 */
@media print {
  .carousel-container,
  .fun-content,
  .nav-grid-section {
    display: none;
  }

  main {
    max-width: none;
    margin: 0;
    padding: 0;
  }
}

/* 外部链接图库样式 */
.external-gallery-preview {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.external-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.external-gallery-preview-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid #f0f0f0;
}

.external-gallery-preview-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #1e5799;
}

.external-gallery-preview-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.external-gallery-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.external-gallery-preview-item:hover .external-gallery-preview-image img {
  transform: scale(1.1);
}

.external-gallery-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.7)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.external-gallery-preview-item:hover .external-gallery-preview-overlay {
  opacity: 1;
}

.external-gallery-preview-info {
  text-align: center;
  color: white;
  padding: 1rem;
}

.external-gallery-preview-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.external-gallery-preview-info p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.external-gallery-preview-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.8rem;
}

.external-gallery-preview-stats span {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  backdrop-filter: blur(5px);
}

.external-gallery-preview-caption {
  padding: 1rem;
}

.external-gallery-preview-caption h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.1rem;
}

.external-gallery-preview-caption p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* 外部链接图库响应式样式 */
@media (max-width: 768px) {
  .external-gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
  }

  .external-gallery-preview-image {
    height: 150px;
  }

  .external-gallery-preview-info h3 {
    font-size: 1rem;
  }

  .external-gallery-preview-info p {
    font-size: 0.8rem;
  }

  .external-gallery-preview-caption h4 {
    font-size: 1rem;
  }

  .external-gallery-preview-caption p {
    font-size: 0.8rem;
  }
}

/* 紧凑型球样式 */
.ball {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  margin: 0 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.ball.red {
  background: #ff4d4f;
  color: #fff;
}
.ball.blue {
  background: #1890ff;
  color: #fff;
}
.ball.green {
  background: #52c41a;
  color: #fff;
}
.ball .zodiac {
  font-size: 12px;
  font-weight: normal;
  margin-top: 2px;
  color: #fff;
}
.lottery-ball-container {
  display: inline-block;
  vertical-align: top;
}
.plus-symbol {
  display: inline-block;
  font-size: 20px;
  margin: 0 4px;
  color: #888;
}

/* Tab紧凑样式 */
.lottery-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.lottery-tab {
  padding: 6px 16px;
  border-radius: 16px 16px 0 0;
  background: #f5f5f5;
  color: #333;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid #e0e0e0;
  border-bottom: none;
  transition: background 0.2s;
}
.lottery-tab.active {
  background: #fff;
  color: #ff4d4f;
  font-weight: bold;
  border-bottom: 2px solid #ff4d4f;
}

/* 倒计时与开奖时间 */
.next-draw-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  margin: 8px 0 0 0;
}
#next-draw-time,
#countdown-timer {
  font-weight: bold;
  color: #1890ff;
  margin-left: 2px;
}

/* 历史记录按钮 */
.history-btn {
  background: #ff4d4f;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 14px;
  margin-left: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.history-btn:hover {
  background: #d9363e;
}

@media (max-width: 600px) {
  .ball {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .ball .zodiac {
    font-size: 10px;
  }
  .lottery-tabs {
    gap: 4px;
  }
  .lottery-tab {
    padding: 4px 8px;
    font-size: 13px;
  }
  .next-draw-info {
    font-size: 13px;
    gap: 8px;
  }
  .history-btn {
    font-size: 12px;
    padding: 3px 8px;
  }
}

/* 广告图片样式 */
.adv-img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
}

.adv-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 广告图片响应式样式 */
@media (max-width: 768px) {
  .adv-img {
    margin: 15px auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .adv-img:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }
}

@media (max-width: 480px) {
  .adv-img {
    margin: 10px auto;
    border-radius: 4px;
  }

  /* 小屏幕页尾优化 */
  .footer-main {
    gap: 0.8rem;
  }

  .footer-card {
    border-radius: 10px;
  }

  .card-content {
    padding: 1rem;
  }

  .footer-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .footer-links a {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
  }

  .contact-info p {
    font-size: 0.85rem;
    margin: 0.6rem 0;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
  }

  .back-to-top-icon {
    font-size: 1.1rem;
  }

  .disclaimer h4 {
    font-size: 0.95rem;
  }

  .disclaimer p {
    font-size: 0.8rem;
  }
}

/* 彩种切换导航美化增强 */
.lottery-nav {
  background: rgba(255,255,255,0.13);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(30,87,153,0.10);
  padding: 0.7rem 1.2rem;
  margin: 1.2rem auto 1.5rem auto;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18);
}
.lottery-nav ul {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lottery-nav li {
  min-width: 90px;
  text-align: center;
}
.lottery-nav a {
  display: block;
  color: #fff;
  background: linear-gradient(135deg, rgba(30,87,153,0.85) 0%, rgba(32,124,202,0.85) 100%);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem 1.1rem;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(30,87,153,0.08);
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  border: 1px solid rgba(255,255,255,0.13);
}
.lottery-nav a:hover,
.lottery-nav a.active {
  background: linear-gradient(135deg, #207cca 0%, #1e5799 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(30,87,153,0.16);
  transform: translateY(-2px) scale(1.04);
  font-weight: bold;
  z-index: 2;
}

/* 彩种切换导航左对齐与选中高亮增强 */
.lottery-nav {
  justify-content: flex-start;
}
.lottery-nav a.active {
  position: relative;
  font-weight: bold;
}
.lottery-nav a.active::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 7px;
  height: 4px;
  background: linear-gradient(90deg, #ffcc00 0%, #207cca 100%);
  border-radius: 2px;
  z-index: 3;
}

@media (max-width: 768px) {
  .lottery-nav {
    max-width: 100vw;
    padding: 0.5rem 0.2rem;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(30,87,153,0.08);
    overflow-x: auto;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  /* 隐藏Webkit浏览器的滚动条 */
  .lottery-nav::-webkit-scrollbar {
    display: none;
  }
  .lottery-nav ul {
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* 确保内容不会被滚动条遮挡 */
    padding-bottom: 2px;
  }
  .lottery-nav li {
    min-width: 70px;
    flex-shrink: 0; /* 防止项目被压缩 */
  }
  .lottery-nav a {
    font-size: 0.92rem;
    padding: 0.5rem 0.7rem;
    border-radius: 12px;
    white-space: nowrap; /* 防止文字换行 */
  }
  .lottery-nav a.active::after {
    left: 20%;
    right: 20%;
    bottom: 4px;
    height: 3px;
  }
}

/* 主导航选中高亮条增强 */
.main-nav .nav-link.active {
  position: relative;
  font-weight: bold;
}
.main-nav .nav-link.active::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 7px;
  height: 4px;
  background: linear-gradient(90deg, #ffcc00 0%, #207cca 100%);
  border-radius: 2px;
  z-index: 3;
}
@media (max-width: 768px) {
  .main-nav .nav-link.active::after {
    left: 20%;
    right: 20%;
    bottom: 4px;
    height: 3px;
  }
}

/* 攪珠+中/号码揭晓动画样式 */
.draw-balls-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin: 24px 0 12px 0;
}
.draw-ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e0e0e0;
  box-shadow: 0 0 16px 2px #bbb, 0 0 0 0 #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  color: #222;
  animation: ball-bounce 1.1s infinite alternate, ball-glow 2.2s infinite alternate;
  position: relative;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.draw-ball:nth-child(1) { animation-delay: 0s, 0s; }
.draw-ball:nth-child(2) { animation-delay: 0.1s, 0.2s; }
.draw-ball:nth-child(3) { animation-delay: 0.2s, 0.4s; }
.draw-ball:nth-child(4) { animation-delay: 0.3s, 0.6s; }
.draw-ball:nth-child(5) { animation-delay: 0.4s, 0.8s; }
.draw-ball:nth-child(6) { animation-delay: 0.5s, 1.0s; }
.draw-ball.plus {
  background: #fffbe6;
  color: #b71c1c;
  box-shadow: 0 0 24px 6px #ffe082;
}
.draw-ball.final {
  background: #fffbe6;
  color: #b71c1c;
  box-shadow: 0 0 32px 8px #ffd54f;
}
@keyframes ball-bounce {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-8px) scale(1.05); }
  100% { transform: translateY(0); }
}
@keyframes ball-glow {
  0%   { box-shadow: 0 0 8px 2px #bbb, 0 0 0 0 #fff; }
  50%  { box-shadow: 0 0 24px 6px #fff, 0 0 0 0 #fff; }
  100% { box-shadow: 0 0 8px 2px #bbb, 0 0 0 0 #fff; }
}
.drawing-tip {
  text-align: center;
  color: #888;
  font-size: 1.1rem;
  margin-top: 8px;
}

/* 号码揭晓阶段样式 */
.reveal-ball {
  background: #f5f5f5;
  color: #1976d2;
  animation: ball-bounce 1.1s infinite alternate, ball-glow 2.2s infinite alternate;
}
.revealed {
  background: #fffbe6 !important;
  color: #b71c1c !important;
  box-shadow: 0 0 32px 8px #ffd54f !important;
  animation: none !important;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

@media (max-width: 600px) {
  .draw-ball {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
  .draw-balls-row {
    gap: 8px;
  }
}

.ball.pending {
  background: #f0f0f0 !important;
  color: #bbb !important;
  border: 1.5px dashed #ccc;
  opacity: 1 !important;
}
.ball.rolling {
  background: linear-gradient(135deg, #b3e5fc 0%, #81d4fa 100%) !important;
  color: #1976d2 !important;
  animation: ball-bounce 1.1s infinite alternate, ball-glow 2.2s infinite alternate;
  border: 2px solid #4fc3f7;
  opacity: 1 !important;
}

/* Reveal 阶段已揭晓球样式，确保与正常开奖一致 */
.ball.revealed-ball {
  width: 70px !important;
  height: 70px !important;
  font-size: 1.8rem !important;
  font-weight: bold;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
  margin: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* background: inherit;  // 移除此行，避免覆盖彩球色 */
  transition: all 0.3s;
  transform: scale(0.9);
  /* animation: ballAppear 0.5s ease-out forwards;  // 移除动画，防止闪烁 */
  animation: none !important;
}
/* 保证 reveal 阶段生肖排版一致 */
.lottery-ball-container .revealed-ball + .zodiac {
  font-size: 1rem;
  margin-top: 8px;
  color: #d35400;
  font-weight: bold;
  text-align: center;
  background: rgba(255,255,255,0.8);
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-width: 32px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* reveal 阶段容器专属布局，防止被其它样式影响 */
.lottery-balls-container.reveal-mode {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 25px 0;
  padding: 0 20px;
}
@media (max-width: 600px) {
  .ball.revealed-ball {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.3rem !important;
    margin: 0 2px;
  }
  .lottery-ball-container .revealed-ball + .zodiac {
    font-size: 0.8rem;
    margin-top: 4px;
    padding: 1px 4px;
    min-width: 20px;
    min-height: 14px;
  }
  .lottery-balls-container.reveal-mode {
    gap: 8px;
    margin: 15px 0;
    padding: 0 10px;
  }
}

/* 未揭晓球（pending）保持 drawing 阶段的大小和样式 */
.ball.pending {
  width: 48px !important;
  height: 48px !important;
  font-size: 2rem !important;
  background: #f0f0f0 !important;
  color: #bbb !important;
  border: 1.5px dashed #ccc;
  opacity: 1 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  box-shadow: 0 0 16px 2px #bbb, 0 0 0 0 #fff;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
@media (max-width: 600px) {
  .ball.pending {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.2rem !important;
    margin: 0 2px;
  }
}
