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

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

#calculator {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

#title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 24px 0;
}

#gender-selector {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #667eea;
}

.gender-btn {
  flex: 1;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background: #fff;
  color: #667eea;
  transition: all 0.25s ease;
}

.gender-btn.active {
  background: #667eea;
  color: #fff;
}

.gender-btn:hover:not(.active) {
  background: #f0f0ff;
}

#input-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.input-wrapper:focus-within {
  border-color: #667eea;
}

.input-wrapper input {
  flex: 1;
  padding: 12px 16px;
  font-size: 18px;
  border: none;
  outline: none;
  background: transparent;
  color: #333;
}

.input-wrapper .unit {
  padding: 12px 16px;
  font-size: 14px;
  color: #999;
  background: #f8f8f8;
  font-weight: 500;
}

#result-area {
  margin-bottom: 8px;
}

#result-card {
  text-align: center;
  padding: 24px;
  border-radius: 12px;
  transition: background-color 0.35s ease;
}

#result-card.risk-low {
  background: rgba(76, 175, 80, 0.08);
}

#result-card.risk-medium {
  background: rgba(255, 152, 0, 0.08);
}

#result-card.risk-high {
  background: rgba(244, 67, 54, 0.08);
}

#result-card.risk-extreme {
  background: rgba(183, 28, 28, 0.08);
}

#whr-label {
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
}

#whr-value {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

#risk-level {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

#risk-level.risk-low {
  color: #4CAF50;
}

#risk-level.risk-medium {
  color: #FF9800;
}

#risk-level.risk-high {
  color: #F44336;
}

#risk-level.risk-extreme {
  color: #B71C1C;
}

#risk-bar-container {
  width: 100%;
}

#risk-bar {
  position: relative;
  height: 10px;
  background: #e8e8e8;
  border-radius: 5px;
  overflow: visible;
  margin-bottom: 8px;
}

#risk-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.35s ease;
  background: linear-gradient(to right, #4CAF50, #FF9800, #F44336, #B71C1C);
}

#risk-bar-indicator {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: #333;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.35s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

#risk-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #aaa;
}

#features {
  margin-top: 32px;
  padding: 0 8px;
}

#features h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

#features p {
  font-size: 15px;
  line-height: 1.7;
  color: #666;
}

#scenarios {
  margin-top: 24px;
  padding: 0 8px;
}

#scenarios h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

#scenarios ul {
  padding-left: 20px;
  margin: 0;
}

#scenarios li {
  font-size: 15px;
  line-height: 1.7;
  color: #666;
  margin-bottom: 8px;
}

#FAQ {
  margin-top: 24px;
  padding: 0 8px;
}

#FAQ h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 16px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

#FAQ dd {
  font-size: 15px;
  line-height: 1.7;
  color: #666;
  margin: 0 0 20px 0;
}

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

#__fork button {
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 500;
  color: #667eea;
  background: #fff;
  border: 2px solid #667eea;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}

#__fork button:hover {
  background: #667eea;
  color: #fff;
}

@media (max-width: 480px) {
  #calculator {
    padding: 20px 16px;
    border-radius: 12px;
  }

  #title {
    font-size: 20px;
  }

  #whr-value {
    font-size: 40px;
  }

  #risk-level {
    font-size: 18px;
  }

  .gender-btn {
    font-size: 15px;
    padding: 10px 0;
  }

  .input-wrapper input {
    font-size: 16px;
    padding: 10px 12px;
  }
}
