/* 全局样式 */
:root {
  --primary-color: #ff6b35;
  --primary-dark: #e55a2b;
  --primary-light: #ff8e63;
  --secondary-color: #ffa62b;
  --dark-color: #333;
  --light-color: #f8f9fa;
  --gray-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #fff8f1 0%, #fff0e6 100%);
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color), #ff8a00);
  color: white;
}

/* 导航栏 */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 700;
}

.logo i {
  margin-right: 10px;
  font-size: 28px;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 25px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.nav-menu a i {
  margin-right: 8px;
}

.nav-menu a:hover, .nav-menu a.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary-color);
  cursor: pointer;
}

/* 英雄区域 */
.hero {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 166, 43, 0.1));
  padding: 80px 0;
  margin-bottom: 40px;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1;
  min-width: 300px;
}

.hero h1 {
  font-size: 42px;
  color: var(--dark-color);
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero p {
  font-size: 18px;
  color: var(--gray-color);
  margin-bottom: 30px;
}

.hero-stats {
  display: flex;
  gap: 30px;
  margin-top: 30px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: var(--gray-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.image-placeholder {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--border-radius);
  padding: 40px;
  color: white;
  box-shadow: var(--box-shadow);
}

.image-placeholder i {
  font-size: 80px;
  margin-bottom: 20px;
}

.image-placeholder p {
  font-size: 18px;
  font-weight: 500;
  color: white;
}

/* 最新数据区域 */
.latest-data {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 32px;
  color: var(--dark-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-header h2 i {
  margin-right: 10px;
  color: var(--primary-color);
}

.section-header p {
  color: var(--gray-color);
  font-size: 16px;
}

.data-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.update-time {
  color: var(--gray-color);
  font-size: 14px;
}

.table-container {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.data-table th {
  padding: 18px 15px;
  text-align: center;
  font-weight: 600;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th:last-child {
  border-right: none;
}

.data-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background-color: rgba(255, 107, 53, 0.05);
}

.data-table td {
  padding: 16px 15px;
  text-align: center;
  font-weight: 500;
}

.data-table .period {
  color: var(--primary-color);
  font-weight: 700;
}

.data-table .numbers {
  font-weight: 700;
  color: var(--dark-color);
}

.data-table .sum {
  font-weight: 700;
  color: var(--primary-dark);
}

.data-table .size {
  font-weight: 700;
}

.data-table .size.big {
  color: var(--success-color);
}

.data-table .size.small {
  color: var(--danger-color);
}

.data-table .parity {
  font-weight: 700;
}

.data-table .parity.odd {
  color: var(--primary-color);
}

.data-table .parity.even {
  color: var(--info-color);
}

.loading-row td {
  text-align: center;
  padding: 50px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.data-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.summary-item {
  background: white;
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.summary-item h4 {
  margin-bottom: 20px;
  color: var(--dark-color);
  font-size: 20px;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 10px;
}

.summary-stats {
  display: flex;
  justify-content: space-around;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  display: block;
  font-size: 14px;
  color: var(--gray-color);
  margin-top: 5px;
}

#prediction-tip {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 166, 43, 0.1));
  padding: 15px;
  border-radius: var(--border-radius);
  font-style: italic;
  color: var(--dark-color);
  border-left: 4px solid var(--primary-color);
}

/* 功能入口 */
.features {
  padding: 60px 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 166, 43, 0.05));
}

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

.feature-card {
  background: white;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-decoration: none;
  color: var(--dark-color);
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-icon i {
  font-size: 30px;
  color: white;
}

.feature-card h3 {
  margin-bottom: 15px;
  color: var(--dark-color);
}

.feature-card p {
  color: var(--gray-color);
  font-size: 14px;
  line-height: 1.6;
}

/* 页脚 */
.footer {
  background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: white;
  display: flex;
  align-items: center;
}

.footer-section h3 i {
  margin-right: 10px;
  color: var(--primary-color);
}

.footer-section p {
  color: #aaa;
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: #aaa;
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #444;
  color: #888;
  font-size: 14px;
}

/* 弹窗 */
.popup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.popup-content {
  background: white;
  width: 90%;
  max-width: 500px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.popup-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h3 {
  margin: 0;
  font-size: 22px;
}

.popup-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.popup-body {
  padding: 30px;
  font-size: 16px;
  line-height: 1.6;
}

.popup-footer {
  padding: 20px;
  text-align: right;
  border-top: 1px solid #eee;
}

.popup-footer .btn {
  margin-left: 10px;
}
/* 英雄区域图片样式 */
.hero-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

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

/* 确保在不同设备上的显示效果 */
@media (min-width: 768px) {
    .hero-image {
        flex: 1;
        min-width: 300px;
    }
    
    .hero-img {
        max-height: 400px;
        object-position: center;
    }
}

@media (min-width: 1200px) {
    .hero-img {
        max-height: 450px;
    }
}

/* 移动端优化 */
@media (max-width: 767px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-image {
        order: -1; /* 图片放在内容上方 */
        margin-bottom: 30px;
    }
    
    .hero-img {
        max-height: 250px;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
}