body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #273a49;
  color: #273c4c;
}

.header {
  background: #1d2c38;
  color: white;
  padding: 10px 20px;
}

.header .main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 40px;
}

.menu-list {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.menu-item {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  background: #318b81;
}

.menu-item.actived,
.menu-item:hover {
 background: #318b81;
}


.lottery-main {
  padding: 5px;
  max-width: 1000px;
  margin: auto;
}

.lottery-group {
  margin-bottom: 30px;
}

.lottery-group h2 {
  font-size: 20px;
  margin-bottom: 10px;
  border-left: 4px solid #d32f2f;
  padding-left: 10px;
  color: #fff;
}

.lottery-item {
  background: #2d4561;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-left: 4px solid #2196f3;
  margin-bottom: 10px;
  border-radius: 4px;
  transition: box-shadow 0.2s;
}

.lottery-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lottery-name {
  font-weight: 600;
  font-size: 16px;
  color: #61ffeb;
}

.lottery-result {
  text-align: right;
}

.numbers {
  display: inline-block;
  font-family: monospace;
  font-size: 18px;
  color: #4caf50;
  margin-right: 10px;
}

.countdown {
  display: inline-block;
  font-size: 14px;
  color: #ff5722;
  font-weight: bold;
}

.footer {
  margin-top: 0px;
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 15px;
}

.history-wrapper {
  padding: 0.5rem;
}
.history-item {
  background: #2d4561;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 2px solid #ddd;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.history-item .history-date,
.history-item .history-time {
  font-size: 0.9rem;
  color: #ffffff;
}
.history-item .history-numbers {
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

    .date-info {
      text-align: center;
      margin: 10px 0 20px;
      font-size: 15px;
      color: #a0c4dc;
      font-weight: 500;
    }
.history-item {
  background: #2d4561;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  text-align: center;
}
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 6px;
}
.history-title {
  flex-grow: 1;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #61ffeb;
  position: relative;
  padding: 8px 0;
}
.detail-inline {
  flex-shrink: 0;
}

.detail-inline button {
  background-color: #4d5f6f;
  color: white;
  padding: 6px 12px;
  font-size: 13px;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: 12px;
}

.detail-inline button:hover {
  background-color: #4a8981;
}
.history-title::before,
.history-title::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  top: -10px;
}

/* 不同彩票的图标设置 */
.title-miba::before,
.title-miba::after {
  background-image: url('icons/mienbac.png');
}
.title-tigi::before,
.title-tigi::after {
  background-image: url('icons/tiengiang.png');
}
.title-platwingo1m::before,
.title-platwingo1m::after {
  background-image: url('icons/wingo.png');
}
.title-hnvip::before,
.title-hnvip::after {
  background-image: url('icons/vip.png');
}

.history-title::before {
  left: calc(50% - 36px);
}

.history-title::after {
  left: calc(50% + 12px);
}

.history-time {
  color: #a0c4dc;
  margin: 10px 0 5px;
  font-size: 15px;
}

.number-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.numbers {
  display: flex;
  justify-content: center; /* ✅ 居中对齐 */
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.numbers span {
  width: 34px;
  height: 34px;
  line-height: 34px;
  border-radius: 50%;
  background: #408a81;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  font-family: monospace;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.countdown {
  color: #ffc107;
  font-size: 14px;
  margin: 6px 0;
  font-weight: bold;
}

.detail-button {
  margin-top: 10px;
  background-color: #1e7469;
  color: #fff;
  padding: 6px 14px;
  border: 2px solid #dddddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.detail-button:hover {
  background-color: #1976d2;
}
.detail-link {
  flex-shrink: 0;
}

.detail-link button {
  background-color: #1e88e5;
  color: white;
  padding: 6px 12px;
  font-size: 13px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.detail-link button img {
  width: 16px;
  height: 16px;
}

.faq-section {
  background-color: #1d2c38;
  padding: 20px;
  border-radius: 8px;
  margin: 30px 10px;
  color: #fff;
}

.faq-section h2 {
  font-size: 20px;
  color: #61ffeb;
  text-align: center;
  margin-bottom: 16px;
}

.faq-item {
  margin-bottom: 10px;
  border-bottom: 1px solid #3a526c;
  padding-bottom: 10px;
}

.faq-question {
  background: none;
  border: none;
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #90e8ff;
}

.faq-icon {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.faq-question.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  margin-top: 6px;
  font-size: 15px;
  color: #e0f7fa;
  line-height: 1.6;
}

.footer-info {
  background-color: #1b1b1b;
  color: #eee;
  padding: 40px 20px;
  font-size: 14px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}
.footer-column {
  flex: 1 1 220px;
}
.footer-column h4 {
  color: #f4c542;
  margin-bottom: 10px;
  font-size: 16px;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li {
  margin-bottom: 8px;
}
.footer-column ul li a {
  color: #ccc;
  text-decoration: none;
}
.footer-column ul li a:hover {
  color: #fff;
}
.social-links i {
  margin-right: 6px;
}
@media (max-width: 768px) {
  .footer-grid {
    flex-direction: column;
  }
}

/* History */


.lottery-container h2 {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  color: #61ffeb; 
  margin: 20px 0;
  position: relative;
}
  .history-item {
    background: #2d4561;
    border-left: 4px solid #2196f3;
    padding: 8px 5px;
    margin-bottom: 8px;
    border-radius: 6px;
  }

  .history-date {
    color: #61ffeb;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
  }

  .history-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0;
    justify-content: center;
  }

  .history-numbers span {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    background-color: #e5434a;
    color: #fff;
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: monospace;
  }

  .history-time {
    font-size: 14px;
    font-weight: bold;
    color: #ff9800;
    margin-top: 5px;
  }

  .history-detail {
    margin-top: 10px;
    font-size: 14px;
    color: #e0f7fa;
  }

  .prize-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    border: 1px solid #5e7b99;
  }

 .prize-table td {
  border: 1px solid #5e7b99;
  padding: 8px;
  vertical-align: top;
}

.prize-label {
  color: #90caf9;
  font-weight: bold;
  white-space: nowrap;
  width: 100px; 
  background-color: #1c2b3a;
  padding: 6px 8px;
}

.prize-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px; /* 减小行距与列距 */
  margin-top: 6px;
}
.ball {
  background-color: #408a81;
  color: white;
  font-weight: bold;
  font-family: monospace;
  padding: 5px 8px;       /* 缩小按钮大小 */
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  flex: 0 0 auto;
}

.ball {
  padding: 4px 10px;
  min-width: 60px;
  max-width: 70px;
  font-family: monospace;
  border-radius: 8px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

 @media (max-width: 480px) {
  .ball {
    font-size: 14px;
    padding: 6px 6px;
    min-width: 40px;
  }
} /* Giải Đặc Biệt 独立样式（居中，放大） */
  .prize-row:first-child .prize-balls {
    justify-content: center;
  }

  .prize-row:first-child .prize-balls .ball {
    flex: 0 0 auto;
    max-width: none;
    font-size: 18px;
    padding: 8px 20px;
    background-color: #e91e63;
  }

  /* 响应式调整 - 小屏改为每行最多 2 个 */
  @media (max-width: 400px) {
    .ball {
      flex: 1 1 calc(10% - 10px);
      max-width: calc(50% - 10px);
    }
  }

  .pagination {
    text-align: center;
    margin: 20px auto;
  }

  .pagination button {
    background: #4a8981;
    border: 2px solid #dddddd;
    color: white;
    padding: 8px 14px;
    margin: 0 5px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
  }

  .pagination button.disabled {
    background: #888;
    cursor: not-allowed;
  }
  
  @keyframes numberFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.history-numbers span {
  animation: numberFadeInUp 0.4s ease forwards;
}

/* 可选：为每个号码增加不同延迟 */
.history-numbers span:nth-child(1) { animation-delay: 0.35s; }
.history-numbers span:nth-child(2) { animation-delay: 1.10s; }
.history-numbers span:nth-child(3) { animation-delay: 1.35s; }
.history-numbers span:nth-child(4) { animation-delay: 1.55s; }
.history-numbers span:nth-child(5) { animation-delay: 2.0s; }
.history-numbers span:nth-child(6) { animation-delay: 2.30s; }

.history-numbers {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.swiper-slide span {
  display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 50px;
  background-color: #408a81;
  color: white;
  font-size: 18px;
  font-weight: bold;
  font-family: monospace;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  text-align: center;
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #1e293b; /* 深蓝灰背景 */
  color: #ffd700; /* 金黄色文字 */
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  margin-top: 8px;
  transition: all 0.3s ease;
}

.countdown i {
  color: #ffcc00;
  font-size: 1.2rem;
}

.flip-countdown {
  display: inline-flex;
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: bold;
  color: #e53935;
  gap: 4px;
  background: #f8f9fa;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.flip-countdown .digit {
  background: #fff;
  border-radius: 4px;
  padding: 4px 8px;
  min-width: 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.flip-countdown .colon {
  padding: 0 4px;
}