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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  min-height: 100vh;
  color: #333;
  padding: 24px 16px 48px;
}

.page {
  max-width: 720px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: 24px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
}

.subtitle {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.9;
}

.seckill-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(220, 80, 50, 0.18);
}

.card-banner {
  background: linear-gradient(90deg, #ff416c, #ff4b2b);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.tag.live {
  background: #fff;
  color: #ff4b2b;
  animation: pulse 1.2s infinite;
}

.tag.ended {
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.85);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

.countdown-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.countdown-label {
  font-size: 14px;
  font-weight: 500;
}

.countdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 4px 8px;
  min-width: 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.time-box span {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.time-box em {
  font-size: 10px;
  font-style: normal;
  opacity: 0.85;
  margin-top: 2px;
}

.colon {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.7;
}

.card-body {
  padding: 24px;
}

.product {
  display: flex;
  gap: 24px;
}

.product-img {
  flex: 0 0 200px;
}

.img-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ebf1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid #eee;
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 6px;
}

.product-desc {
  color: #888;
  font-size: 13px;
  margin-bottom: 16px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.price-current {
  color: #ff4b2b;
  font-size: 18px;
  font-weight: 500;
}

.price-current strong {
  font-size: 32px;
  font-weight: 800;
  margin-left: 2px;
}

.price-origin {
  text-decoration: line-through;
  color: #aaa;
  font-size: 14px;
}

.price-save {
  background: #fff1ed;
  color: #ff4b2b;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.limit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.limit-badge {
  background: #fff4ec;
  color: #f56c1d;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px dashed #f5b888;
}

.limit-hint {
  color: #888;
  font-size: 12px;
}

.stock-row {
  margin-bottom: 20px;
}

.stock-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.stock-text {
  font-weight: 600;
  color: #444;
}

.stock-bar {
  height: 10px;
  background: #f0f2f5;
  border-radius: 5px;
  overflow: hidden;
}

.stock-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9a44, #ff4b2b);
  border-radius: 5px;
  transition: width 0.5s ease;
}

.stock-fill.low {
  background: linear-gradient(90deg, #ff4b2b, #c41e3a);
  animation: warning 1.5s infinite;
}

@keyframes warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.action-row {
  display: flex;
}

.btn-buy {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background: linear-gradient(90deg, #ff416c, #ff4b2b);
  box-shadow: 0 6px 16px rgba(255, 75, 43, 0.35);
}

.btn-buy:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(255, 75, 43, 0.42);
}

.btn-buy:active:not(:disabled) {
  transform: translateY(0);
}

.btn-buy:disabled {
  background: #ccc;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-buy.loading {
  background: linear-gradient(90deg, #999, #777);
  cursor: wait;
}

.rules {
  margin-top: 24px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.rules h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: #333;
}

.rules ol {
  padding-left: 18px;
  color: #666;
  font-size: 13px;
  line-height: 1.9;
}

.toast {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(40, 40, 40, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1000;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 320px;
  padding: 28px 24px 20px;
  text-align: center;
  animation: popIn 0.28s ease;
}

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
}

.modal-icon.success {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

.modal-icon.success::before {
  content: "✓";
}

.modal-icon.fail {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.modal-icon.fail::before {
  content: "✕";
}

.modal-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.modal-text {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-btn {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 21px;
  background: linear-gradient(90deg, #ff416c, #ff4b2b);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 600px) {
  .product {
    flex-direction: column;
  }

  .product-img {
    flex: 0 0 auto;
  }

  .img-placeholder {
    width: 100%;
    height: 180px;
  }

  .card-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .countdown-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .time-box {
    min-width: 38px;
    padding: 3px 6px;
  }

  .time-box span {
    font-size: 16px;
  }
}
