/* 기본 리셋 및 폰트 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* 컨테이너 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 헤더 */
.header {
  text-align: center;
  margin-bottom: 30px;
  color: white;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* 메인 콘텐츠 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  flex: 1;
}

/* 입력 섹션 */
.input-section {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  height: fit-content;
}

.input-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

/* 폼 그룹 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

/* 버튼 */
.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 10px;
  margin-bottom: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f8f9fa;
  color: #333;
  border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

/* 차트 섹션 */
.chart-section {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.chart-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.chart-container {
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #e1e5e9;
  border-radius: 10px;
  background: #f8f9fa;
}

.chart-placeholder {
  text-align: center;
  color: #6c757d;
  font-size: 16px;
  padding: 20px;
}

/* 차트 SVG 스타일 */
.chart-container svg {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* 푸터 */
.footer {
  text-align: center;
  margin-top: 30px;
  color: white;
  opacity: 0.8;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .input-section,
  .chart-section {
    padding: 20px;
  }

  .form-group textarea {
    min-height: 100px;
  }

  .chart-container {
    min-height: 300px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.8rem;
  }

  .header p {
    font-size: 1rem;
  }

  .input-section,
  .chart-section {
    padding: 15px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }
}

/* 로딩 애니메이션 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 에러 메시지 */
.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
  border: 1px solid #f5c6cb;
}

/* 성공 메시지 */
.success-message {
  background: #d4edda;
  color: #155724;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
  border: 1px solid #c3e6cb;
}

/* 생년월일 입력 섹션 스타일 */
.birth-data-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  color: white;
}

.birth-data-section h3 {
  margin: 0 0 15px 0;
  color: white;
  font-size: 1.2em;
}

.birth-date-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.birth-data-section .form-group {
  margin-bottom: 15px;
}

.birth-data-section label {
  display: block;
  margin-bottom: 5px;
  color: white;
  font-weight: 500;
  font-size: 0.9em;
}

.birth-data-section input,
.birth-data-section select {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
}

.birth-data-section select {
  cursor: pointer;
}

.birth-data-section input:focus,
.birth-data-section select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 1);
}

.birth-data-section .btn-primary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

.birth-data-section .btn-primary:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 트랜짓 섹션 스타일 */
.transit-section {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  color: #333;
}

.transit-section h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.2em;
}

.transit-section .form-group {
  margin-bottom: 15px;
}

.transit-section label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-weight: 500;
}

.transit-section input {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.transit-section input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.transit-section .btn-primary {
  background: rgba(255, 255, 255, 0.2);
  color: #333;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.transit-section .btn-primary:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}
