html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #e0e0e0;
  background: #1a1a2e;
}

#calculator {
  text-align: center;
}

#calculator h1 {
  font-size: 28px;
  color: #ff4d4f;
  margin: 0 0 8px 0;
}

.subtitle {
  font-size: 14px;
  color: #888;
  margin: 0 0 28px 0;
}

#input-area {
  margin-bottom: 32px;
}

#age-label {
  display: block;
  font-size: 16px;
  color: #ccc;
  margin-bottom: 12px;
}

#age-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#age-input {
  width: 120px;
  height: 48px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  background: #16213e;
  border: 2px solid #ff4d4f;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.3s;
}

#age-input:focus {
  border-color: #ff7875;
}

#age-slider {
  width: 100%;
  max-width: 360px;
  height: 6px;
  appearance: none;
  background: #333;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

#age-slider::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff4d4f;
  cursor: pointer;
  border: none;
}

#age-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff4d4f;
  cursor: pointer;
  border: none;
}

#result-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-card {
  background: #16213e;
  border-radius: 16px;
  padding: 20px 24px;
}

.result-card.highlight {
  background: linear-gradient(135deg, #2d1b1b, #16213e);
  border: 2px solid #ff4d4f;
}

.card-label {
  display: block;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 8px;
}

.card-value {
  display: block;
  font-size: 52px;
  font-weight: bold;
  color: #ff4d4f;
  line-height: 1.1;
  animation: heartbeat 1.2s ease-in-out infinite;
}

.card-unit {
  display: block;
  font-size: 18px;
  color: #ff7875;
  margin-top: 4px;
}

.card-ref {
  display: block;
  font-size: 13px;
  color: #666;
  margin-top: 8px;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.12); }
  30% { transform: scale(1); }
  45% { transform: scale(1.08); }
  60% { transform: scale(1); }
}

#zone-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone-card {
  padding: 16px 20px;
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.zone-title {
  font-size: 16px;
  font-weight: bold;
}

#fat-burn-title {
  color: #52c41a;
}

#aerobic-title {
  color: #1677ff;
}

#extreme-title {
  color: #fa8c16;
}

.zone-range {
  font-size: 15px;
  font-weight: bold;
  color: #ddd;
}

.zone-bar-bg {
  width: 100%;
  height: 10px;
  background: #2a2a4a;
  border-radius: 5px;
  margin-bottom: 10px;
  overflow: hidden;
}

.zone-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}

.fat-burn-bar {
  background: linear-gradient(90deg, #52c41a, #73d13d);
}

.aerobic-bar {
  background: linear-gradient(90deg, #1677ff, #4096ff);
}

.extreme-bar {
  background: linear-gradient(90deg, #fa8c16, #ffa940);
}

.zone-desc {
  display: block;
  font-size: 12px;
  color: #888;
  line-height: 1.6;
}

#features, #scenarios, #FAQ {
  margin-top: 40px;
  padding: 0 8px;
}

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 20px;
  color: #ff4d4f;
  margin-bottom: 12px;
}

#features p {
  font-size: 14px;
  color: #aaa;
  line-height: 1.8;
}

#scenarios ul {
  list-style: none;
  padding: 0;
}

#scenarios li {
  font-size: 14px;
  color: #ccc;
  padding: 8px 0;
  line-height: 1.7;
  border-bottom: 1px solid #2a2a4a;
}

#scenarios li:last-child {
  border-bottom: none;
}

#scenarios li strong {
  color: #ff7875;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 15px;
  font-weight: bold;
  color: #ddd;
  margin-top: 16px;
  padding: 8px 0;
  cursor: default;
}

#FAQ dd {
  font-size: 13px;
  color: #999;
  margin: 0 0 8px 0;
  line-height: 1.8;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a4a;
}

#FAQ dd:last-child {
  border-bottom: none;
}

#__fork {
  text-align: center;
  margin-top: 32px;
}

#__fork button {
  background: #ff4d4f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

#__fork button:hover {
  background: #ff7875;
}

footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: #666;
}

footer a {
  color: #ff7875;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  #calculator h1 {
    font-size: 22px;
  }

  .card-value {
    font-size: 42px;
  }

  .zone-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .zone-range {
    font-size: 14px;
  }
}
