/* あなたの身長は同世代で何位？身長チェッカー - CSS */

.height-calculator {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
  max-width: 750px;
  margin: 0 auto;
  /* padding: 20px; */
  box-sizing: border-box;
  font-size: 18px;
  line-height: 1.5;
  padding: 0px 30px;
}

.calculator-container {
  /* background: #ffffff; */
  /* border-radius: 12px; */
  padding: 20px 30px;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb; */
}

.calculator-title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin: 0 0 5px 0;
  line-height: 1.3;
}

.calculator-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: #4f46e5;
  text-align: center;
  margin: 0 0 15px 0;
}

.calculator-description {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin: 0 0 30px 0;
  line-height: 1.5;
}

.input-section {
  margin-bottom: 1.6rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-label {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  color: #374151;
  /* margin-bottom: 1rem; */
}

.radio-group {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: #374151;
}

.radio-option input[type="radio"] {
  margin-right: 8px;
  accent-color: #3b82f6;
  width: 20px;
  height: 20px;
}

.select-input {
  width: 100%;
  padding: 0.8rem 1.2rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1.2rem;
  background-color: #ffffff;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  height: auto;
  margin-bottom: 1rem;
}

.select-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.number-input {
  width: 100%;
  padding: 0.6rem 1.2rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1.2rem;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  height: auto;
}

.number-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.number-input::placeholder {
  color: #9ca3af;
}

.button-group {
  margin-top: 1.8rem;
  text-align: center;
}

.calculate-button {
  background: #278aa5;
  color: white;
  border: none;
  padding: 20px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  min-width: 240px;
}

.calculate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.calculate-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.calculate-button:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.calculate-button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.result-section {
  margin-bottom: 30px;
}

.result-card {
  background: linear-gradient(
    322deg,
    #cdbd8c 0%,
    #fffee7 45%,
    #eae3c2 70%,
    #dfd5ae 85%,
    #cfbe90 90% 100%
  );
  border-radius: 12px;
  padding: 25px;
  color: #374156;
  text-align: center;
}

.result-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  opacity: 0.9;
  border-bottom: 1px solid #1f2937;
}

.current-results {
  /* margin-bottom: 25px; */
  padding-bottom: 20px;
  /* border-bottom: 1px solid rgba(255, 255, 255, 0.3); */
  text-align: center;
}

.current-ranking {
  margin-bottom: 15px;
}

.current-ranking-text {
  font-size: 1.2rem;
  font-weight: 500;
  color: #374156;
}

.current-ranking-text strong {
  font-size: 1.6rem;
  font-weight: 700;
  color: #a70117;
  margin: 0 5px;
  background: #fff;
  padding: 0.2rem 0.7rem;
  border: 1px solid #1f2937;
}

.current-deviation {
  margin-bottom: 10px;
}

.current-deviation-text {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.current-deviation-text strong {
  font-size: 20px;
  font-weight: 700;
  color: #374156;
  margin-left: 5px;
}

.upgrade-section {
  /* margin-bottom: 20px; */
  text-align: center;
}

.upgrade-title {
  font-size: 1.2rem;
  /* font-weight: 600; */
  margin: 0 0 15px 0;
  color: #374156;
}

.upgrade-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.upgrade-ranking {
  margin-bottom: 8px;
}

.upgrade-ranking-text {
  font-size: 1.2rem;
  font-weight: 500;
  color: #374156;
}

.upgrade-ranking-text strong {
  font-size: 1.6rem;
  font-weight: 700;
  color: #a70117;
  margin: 0 5px;
  background: #fff;
  padding: 0.2rem 0.7rem;
  border: 1px solid #1f2937;
}

.upgrade-deviation {
  margin-bottom: 5px;
}

.upgrade-deviation-text {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.upgrade-deviation-text strong {
  font-size: 20px;
  font-weight: 700;
  color: #a70117;
  margin-left: 5px;
}

.result-details {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.detail-item {
  text-align: center;
}

.detail-label {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.detail-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.info-section {
  background: #f9fafb;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.info-title {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 15px 0;
}

.info-content {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

.info-list {
  margin: 0;
  padding-left: 20px;
}

.info-list li {
  margin-bottom: 8px;
}

.info-list li:last-child {
  margin-bottom: 0;
}

.footer-info {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: #666;
  font-size: 1rem;
  border-top: 1px solid #ddd;
}

/*--位置---*/

div#root {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
  .result-card {
    padding: 16px;
  }

  .height-calculator {
    padding: 0 15px;
  }

  .calculator-container {
    padding: 20px;
  }

  .calculator-title {
    font-size: 18px;
  }

  .calculator-subtitle {
    font-size: 16px;
  }

  .result-details {
    /* flex-direction: column; */
    gap: 15px;
  }

  .radio-group {
    /* flex-direction: column; */
    gap: 12px;
  }

  .calculate-button {
    padding: 12px 20px;
    font-size: 14px;
    min-width: 180px;
  }

  .current-ranking {
    margin-bottom: 6px;
  }

  .current-ranking-text {
    font-size: 1rem;
  }

  .current-ranking-text strong {
    font-size: 1.2rem;
  }
  .upgrade-title {
    margin: 0;
    font-size: 1rem;
  }

  .upgrade-ranking-text {
    font-size: 1rem;
  }

  .upgrade-ranking-text strong {
    font-size: 1.2rem;
  }

  .current-results {
    padding-bottom: 14px;
  }
}
