:root {
  --primary-color: #e60012;
  --secondary-color: #f8f8f8;
  --text-color: #333;
  --light-text: #666;
  --border-color: #e0e0e0;
  --shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
  font-size: 1rem;
  /* 16px */
  /* 设置基础字体大小 */
}

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

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: #f5f5f5;
  color: var(--text-color);
  line-height: 1.6;
  font-size: 1rem;
  /* 16px */
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  background-color: #172339;
  min-height: 100vh;
}

.header {
  background: linear-gradient(135deg, var(--primary-color), #c5000f);
  color: white;
  padding: 1.125rem 0;
  /* 18px */
  text-align: center;
  position: relative;
  box-shadow: var(--shadow);
}

.header h1 {
  font-size: 1.25rem;
  /* 20px */
  font-weight: 500;
}

.content {
  padding: 1.25rem 1.25rem 0 1.25rem;
  /* 20px */
}

.section-title {
  font-size: 1.125rem;
  /* 18px */
  font-weight: 500;
  margin-bottom: 0.9375rem;
  /* 15px */
  color: #f8f8f8;
  display: flex;
  align-items: center;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 0.25rem;
  /* 4px */
  /* 4px */
  height: 1rem;
  /* 16px */
  /* 16px */
  background-color: var(--primary-color);
  margin-right: 0.5rem;
  /* 8px */
  border-radius: 0.125rem;
  /* 2px */
  /* 2px */
}

.location-selector {
  margin-bottom: 1rem;
  /* 25px */
}

.location-row {
  display: flex;
  gap: 0.625rem;
  /* 10px */
  margin-bottom: 0.625rem;
  /* 10px */
}

.select-wrapper {
  position: relative;
  flex: 1;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 0.9375rem;
  /* 15px */
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--light-text);
  pointer-events: none;
}

select {
  width: 100%;
  padding: 0.5rem 0.9375rem;
  /* 12px 15px */
  border: 0.0625rem solid var(--border-color);
  /* 1px */
  border-radius: 0.5rem;
  /* 8px */
  appearance: none;
  background-color: white;
  font-size: 1rem;
  /* 16px */
  color: var(--text-color);
  transition: all 0.3s;
  cursor: pointer;
  background-image: none;
}

select:hover {
  border-color: var(--primary-color);
}

select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.2);
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.number-card {
  background-color: white;
  border-radius: 0.5rem;
  /* 8px */
  padding: 5px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.number-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(230, 0, 18, 0.1);
}

.number-card.selected {
  border: 2px solid var(--primary-color);
  background-color: #172339;
}

.number-card.selected .number {
  color: white;
}

.number-card.selected::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  /* 12px */
}

.number {
  font-size: 1rem;
  /* 18px */
  font-weight: 600;
  color: #172339;
  margin-bottom: 0.3125rem;
  /* 5px */
  text-align: center;
}

.location {
  font-size: 0.875rem;
  /* 14px */
  color: var(--light-text);
  margin-bottom: 0.625rem;
  /* 10px */
}

.select-btn {
  width: 100%;
  padding: 0.5rem 0;
  /* 8px */
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 1.25rem;
  /* 20px */
  font-size: 0.875rem;
  /* 14px */
  cursor: pointer;
  transition: all 0.3s;
}

.select-btn:hover {
  background-color: #c5000f;
}

.pagination {
  display: flex;
  justify-content: space-around;
  margin-top: 1.875rem;
  /* 30px */
  align-items: center;
}

.page-btn {
  margin: 0 0.625rem;
  /* 10px */
  padding: 0.5rem 1.6rem;
  /* 8px 15px */
  background-color: white;
  border: 0.0625rem solid var(--border-color);
  /* 1px */
  border-radius: 0.25rem;
  /* 4px */
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

.page-btn:hover {
  border-color: rgb(2, 2, 2);
  color: var(--primary-color);
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 2.5rem 0;
  /* 40px */
  color: #f5f5f5;
  font-size: 1rem;
  /* 16px */
}

.empty-state {
  text-align: center;
  padding: 2.5rem 0;
  /* 40px */
}

.empty-icon {
  font-size: 3.125rem;
  /* 50px */
  color: #ddd;
  margin-bottom: 0.9375rem;
  /* 15px */
}

.empty-text {
  color: #f5f5f5;
  font-size: 1rem;
  /* 16px */
}

/* 表单弹窗样式 */
.form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.form-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 500px;
  background-color: #f8f8f8;
  border-radius: .5rem .5rem 0 0;
  padding: 1.25rem;
  /* 20px */
  z-index: 1001;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  overflow: hidden;
}

.form-container.active {
  transform: translateY(0);
}

.form-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.625rem;
  /* 10px */
  max-height: calc(90vh - 7.5rem);
  /* 120px */
  /* 减去标题和按钮的高度 */
  -webkit-overflow-scrolling: touch;
  /* 优化移动端滚动体验 */
  margin-top: 0.9375rem;
  /* 15px */
}

@media (min-width: 768px) {
  .form-container {
    left: 50%;
    transform: translate(-50%, 100%);
    width: 90%;
  }

  .form-container.active {
    transform: translate(-50%, 0.625rem);
    /* 10px */
  }
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9375rem;
  /* 15px */
  padding: 0.625rem 0rem;
  /* 10px */
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background-color: #f8f8f8;
  z-index: 1;
}

.form-title {
  font-size: 1.125rem;
  /* 18px */
  font-weight: 500;
  color: #ff6633;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  /* 24px */
  cursor: pointer;
  color: var(--light-text);
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

body {
  overflow: auto;
}

@media (max-width: 480px) {
  .form-container {
    max-height: 80vh;
    padding: 0 .8rem .8rem .8rem;
    /* 15px */
    overflow: auto;
  }

  .form-content {
    max-height: calc(80vh - 7.5rem);
    /* 120px */
    /* 减去标题和按钮的高度 */
    -webkit-overflow-scrolling: touch;
    /* 优化移动端滚动体验 */
    overflow-y: auto;
  }

  .form-title {
    font-size: 1rem;
    /* 16px */
  }

  .form-input {
    padding: 0.625rem 0.75rem;
    /* 10px 12px */
    font-size: 0.875rem;
    /* 14px */
  }

  .form-label {
    font-size: 0.8125rem;
    /* 13px */
  }

  .submit-btn {
    padding: 0.75rem;
    /* 12px */
    font-size: 0.9375rem;
    /* 15px */
  }
}

.form-group {
  margin-bottom: 0.5rem;
  /* 10px */
}

.form-label {
  display: block;
  margin-bottom: 0.3125rem;
  /* 5px */
  font-size: 0.875rem;
  /* 14px */
  color: var(--text-color);
}

.form-label.required::after {
  content: '*';
  color: var(--primary-color);
  margin-left: 0.1875rem;
  /* 3px */
}

.form-input {
  width: 100%;
  padding: 0.625rem;
  /* 10px */
  border: 0.0625rem solid var(--border-color);
  /* 1px */
  border-radius: 0.5rem;
  /* 8px */
  font-size: 0.875rem;
  /* 14px */
  transition: all 0.3s;
  background-color: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.2);
}

.form-hint {
  font-size: 0.75rem;
  /* 12px */
  color: var(--light-text);
  margin-top: 0.3125rem;
  /* 5px */
  line-height: 1.4;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  margin: 0.5rem 0;
  /* 15px */
}

.form-checkbox input {
  margin-right: 0.625rem;
  /* 10px */
  margin-top: 0.1875rem;
  /* 3px */
}

.form-checkbox label {
  font-size: 0.75rem;
  /* 14px */
  line-height: 1.4;
  color: var(--text-color);
  cursor: pointer;
}

.form-checkbox a {
  color: #1a73e8;
  text-decoration: none;
}


.submit-btn {
  width: 100%;
  padding: 0.9375rem;
  /* 15px */
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 1.875rem;
  /* 30px */
  font-size: 1rem;
  /* 16px */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 0.625rem;
  /* 10px */
}

.submit-btn:hover {
  background-color: #c5000f;
}

.selected-number {
  font-size: 1.125rem;
  /* 18px */
  font-weight: bold;
  color: #ff6633;
  padding: 0.625rem;
  /* 10px */
  background-color: white;
  border-radius: 0.5rem;
  /* 8px */
  margin-bottom: 0.9375rem;
  /* 15px */
  text-align: center;
}

@media (min-width: 768px) {
  .container {
    max-width: 500px;
    border-radius: 12px;
    margin: 0 auto;
    min-height: auto;
  }

  .number-grid {
    gap: 0.9375rem;
    /* 15px */
  }

  .form-container {
    left: 50%;
    width: 90%;
    max-width: 500px;
    transform: translate(-50%, 100%);
    border-radius: 0.9375rem 0.9375rem 0px 0px;
    /* 15px */
  }

  .form-container.active {
    transform: translate(-50%, 0.625rem);
    /* 10px */
  }
}

.highlight {
  color: #ff0000;
}
a {
  color: inherit;
  /* 继承父元素颜色，而不是默认蓝色 */
  text-decoration: none;
  /* 去掉下划线 */
  cursor: pointer;
  /* 确保鼠标悬停时仍然是手型指针 */
  background-color: transparent;
  /* 去掉可能的背景色 */
  outline: none;
  /* 去掉点击时的焦点轮廓（可选） */
}

/* 如果需要，可以单独设置 hover/focus/active 状态 */
a:hover,
a:focus,
a:active {
  text-decoration: none;
  /* 确保悬停时也没有下划线 */
  color: inherit;
  /* 悬停时颜色不变 */
}