/* ==================== 全局样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  background: #a90017;
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== 顶部滚动通知栏 ==================== */
.marquee-container {
  overflow: hidden;
  position: relative;
  color: #e27d94;
  background-color: #992f47;
  padding: 8px 0;
}

.marquee-content {
  display: flex;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
}

.marquee-content p {
  display: inline-block;
  color: #fff;
  font-size: 12px;
  padding: 0 2rem;
  line-height: 1.5;
  flex-shrink: 0;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==================== 主容器 ==================== */
.main-container {
  max-width: 750px;
  margin: 0 auto;
  /* padding: 20px 16px 40px; */
}

/* ==================== 头部横幅 ==================== */
.header-banner {
  margin-bottom: 24px;
  text-align: center;
}

.header-banner img {
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: block;
}

/* ==================== 表单卡片 ==================== */
.form-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.form-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.form-item.no-border {
  border-bottom: none;
}

.form-label {
  font-size: 16px;
  color: #333;
  font-weight: 500;
  min-width: 100px;
  flex-shrink: 0;
}

.form-input-wrapper {
  flex: 1;
}

.form-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  color: #333;
  background: transparent;
  font-family: inherit;
}

.form-input::placeholder {
  color: #999;
}

.date-input {
  cursor: pointer;
}

/* ==================== 性别选择 ==================== */
.gender-wrapper {
  display: flex;
  gap: 40px;
}

.gender-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-icon {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.gender-option.active .radio-icon {
  border-color: #a90017;
  background: #a90017;
}

.radio-icon.checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

.gender-text {
  font-size: 16px;
  color: #666;
  transition: color 0.3s ease;
}

.gender-option.active .gender-text {
  color: #333;
  font-weight: 500;
}

/* ==================== 测试按钮区域 ==================== */
.action-section {
  text-align: center;
  /* margin-bottom: 24px; */
}

.test-button {
  cursor: pointer;
  margin: 0 auto 16px;
  transition: transform 0.2s ease;
  max-width: 420px;
  animation: pulse-scale 1.5s ease-in-out infinite;
}

.test-button:hover {
  animation: none;
  transform: translateY(-2px) scale(1.05);
}

.test-button:active {
  transform: translateY(0) scale(0.98);
}

.test-button img {
  width: 100%;
  display: block;
}

@keyframes pulse-scale {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.service-tip {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  margin: 10px 0;
  line-height: 1.6;
}

/* ==================== 协议勾选 ==================== */
.agreement-wrapper {
  /* margin: 16px 0; */
}

.agreement-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #fff;
}

.agreement-checkbox input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  margin-right: 6px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.agreement-checkbox input[type="checkbox"]:checked + .checkbox-custom {
  background: #a90017;
  border-color: #a90017;
}

.agreement-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.agreement-text {
  color: rgba(255, 255, 255, 0.95);
}

.agreement-link {
  color: #ffd700;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.agreement-link:hover {
  color: #fff;
}

/* ==================== 查看订单 ==================== */
.order-link-wrapper {
  /* margin: 16px 0; */
}

.order-link {
  color: #fff0d3;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
}

.order-link:hover {
  color: #ffd700;
}

/* ==================== 统计信息 ==================== */
.stats-section {
  text-align: center;
  margin: 24px 0;
}

.stats-text {
  color: #fff;
  font-size: 15px;
}

.stats-number {
  color: #ffd700;
  font-weight: bold;
  font-size: 18px;
  margin: 0 4px;
}

/* ==================== 实时测试动态 ==================== */
.activity-box {
  background: rgba(139, 0, 0, 0.5);
  border: 2px solid rgba(255, 215, 0, 0.6);
  border-radius: 12px;
  padding: 16px;
  margin: 24px 0;
  height: 220px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.activity-scroll {
  height: 100%;
  overflow: hidden;
}

.activity-list {
  list-style: none;
  animation: scroll-up 20s linear infinite;
}

.activity-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  color: #fff;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-list li:last-child {
  border-bottom: none;
}

.activity-list li span {
  flex: 1;
  text-align: center;
}

.activity-list li span:first-child {
  flex: 0.8;
}

.activity-list li span:last-child {
  flex: 1.2;
}

@keyframes scroll-up {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* ==================== 底部信息 ==================== */
.footer-info {
  text-align: center;
  margin: 32px 0 24px;
}

.footer-title {
  color: #ffd700;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
}

.footer-subtitle {
  color: #fff;
  font-size: 15px;
  margin: 8px 0;
}

.footer-notice {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  margin: 8px 0;
}

/* ==================== 版权信息 ==================== */
.copyright {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.8;
  margin: 32px 0 20px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.copyright p {
  margin: 4px 0;
}

/* ==================== 右侧浮动工具栏 ==================== */
.float-toolbar {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-btn {
  width: 54px;
  height: 54px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
}

.float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.float-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.float-btn-label {
  position: absolute;
  right: 100%;
  margin-right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.float-btn:hover .float-btn-label {
  opacity: 1;
}

/* ==================== 日期选择器样式 ==================== */
.picker-mask {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: none;
}

.picker-mask.show {
  display: block;
}

.picker-wrap {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 1002;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.picker-wrap.show {
  transform: translateY(0);
}

.picker-main {
  background-color: #fff;
  border-radius: 0.625rem 0.625rem 0 0;
}

.picker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.75rem;
  border-bottom: 1px solid #eeeeee;
  padding: 0 1rem;
}

.picker-cancel {
  color: #666;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.picker-confirm {
  color: #a90017;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.picker-mode {
  display: flex;
  border-radius: 0.5rem;
  border: 2px solid #a90017;
  overflow: hidden;
  height: 1.5rem;
  width: 8rem;
}

.picker-mode div {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a90017;
  background: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.picker-mode-active {
  color: #fff !important;
  background-color: #a90017 !important;
  font-weight: bold;
}

.picker-body {
  position: relative;
  height: 15rem;
  overflow: hidden;
}

.picker-content {
  display: flex;
  height: 100%;
}

.picker-wheel {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

#timeWheel {
  flex: 1.5;
}

.picker-wheel::-webkit-scrollbar {
  display: none;
}

.picker-item {
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #999;
  scroll-snap-align: center;
}

.picker-item.active {
  color: #a90017;
  font-weight: bold;
  font-size: 16px;
}

.picker-mask-top,
.picker-mask-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 6rem;
  pointer-events: none;
  z-index: 10;
}

.picker-mask-top {
  top: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.6)
  );
  border-bottom: 1px solid #a90017;
}

.picker-mask-bottom {
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.6)
  );
  border-top: 1px solid #a90017;
}

.picker-highlight {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3rem;
  transform: translateY(-50%);
  border-top: 1px solid #a90017;
  border-bottom: 1px solid #a90017;
  pointer-events: none;
  z-index: 5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  /* .main-container {
    padding: 16px 12px 32px;
  } */

  .form-card {
    padding: 20px 16px;
  }

  .form-label {
    font-size: 15px;
    min-width: 85px;
  }

  .form-input {
    font-size: 15px;
  }

  .gender-wrapper {
    gap: 30px;
  }

  .activity-box {
    height: 180px;
  }

  .float-toolbar {
    right: 8px;
  }

  .float-btn {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  .header-banner img {
    border-radius: 12px;
  }

  .form-card {
    border-radius: 16px;
    padding: 16px 12px;
  }

  .form-label {
    font-size: 14px;
    min-width: 75px;
  }

  .form-input {
    font-size: 18px;
  }

  .gender-wrapper {
    gap: 24px;
  }

  .activity-box {
    height: 160px;
    padding: 12px;
  }

  .activity-list li {
    font-size: 12px;
    padding: 8px 0;
  }

  .float-btn {
    width: 44px;
    height: 44px;
  }

  .modal-content {
    width: 95%;
  }
}

/* PC端最大宽度限制 */
@media (min-width: 751px) {
  .main-container {
    max-width: 540px;
    margin: 0 auto;
  }
}
