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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  background-color: #f5f5f5;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background-color: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 헤더 */
.logo {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.tagline {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.5;
}

/* 목적 선택 */
.purpose-selector {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.purpose-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  transition: all 0.2s;
  background-color: white;
}

.purpose-option:hover {
  border-color: #667eea;
  background-color: #f8f9ff;
}

.purpose-option input[type="radio"] {
  margin: 0;
  margin-right: 8px;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.purpose-option input[type="radio"]:checked + .purpose-label {
  font-weight: 600;
  color: #667eea;
}

.purpose-label {
  font-size: 14px;
  color: #333;
  user-select: none;
}

/* ===============================
   결론 카드 (2번 UI 대응)
   =============================== */
/* 기본 decision-card는 그대로 두고 레이아웃만 조정 */
.decision-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  display: flex;
  flex-direction: column; /* 기본은 세로 배치 */
  align-items: center;
  gap: 20px;
}

/* 여행객 버전 - 가로 배치 */
.decision-card.show-status-card {
  flex-direction: row;
  align-items: center;
}

.decision-card.warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 좌측/상단 상태 카드 - 기본적으로 숨김 */
.decision-status-card {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 14px;
  padding: 14px 12px;
  width: 120px;
  flex-shrink: 0;
  display: none; /* 기본적으로 숨김 */
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 여행객 버전일 때만 상태 카드 표시 */
.decision-card.show-status-card .decision-status-card {
  display: flex;
}

/* 아이콘 영역 (SVG 대응) */
.decision-status-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG 아이콘이 카드 안에 꽉 차도록 */
.decision-status-icon svg {
  width: 100%;
  height: 100%;
}

/* 상태 텍스트 (유리 / 보통 / 불리) */
.decision-status-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #333;
}

/* 퍼센트 범위 */
.decision-status-range {
  font-size: 12px;
  color: #666;
}

/* 우측/하단 텍스트 영역 */
.decision-content {
  flex: 1;
  width: 100%;
}

/* 여행객 버전 - 텍스트 왼쪽 정렬 */
.decision-card.show-status-card .decision-content {
  text-align: left;
}

/* 기본 (일반인) - 텍스트 중앙 정렬 */
.decision-content {
  text-align: center;
}

/* 기존 decision-icon(원형 아이콘) 비활성화 */
.decision-icon {
  display: none;
}

.decision-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.decision-text {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.95;
}

/* ===============================
   상태별 미세 톤 조정 (선택)
   =============================== */
/* 유리 */
.decision-card.favorable .decision-status-title {
  color: #28a745;
}

/* 불리 */
.decision-card.unfavorable .decision-status-title {
  color: #dc3545;
}

/* ===============================
   모바일 대응
   =============================== */
@media (max-width: 480px) {
  .decision-card {
    flex-direction: column;
    align-items: stretch;
  }
  .decision-card.show-status-card {
    flex-direction: column;
  }
  .decision-status-card {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }
  .decision-status-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
  }
}

.decision-highlight {
  font-weight: 700;
  font-size: 17px;
}

/* 상태 바 */
.status-bar {
  text-align: center;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 12px;
}

.status-loading {
  background-color: #fff3cd;
  color: #856404;
}

.status-success {
  background-color: #d4edda;
  color: #155724;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
}

/* 입력 폼 */
.question-label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.currency-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.currency-select {
  flex: 0 0 110px;
  padding: 14px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background-color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

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

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.amount-input {
  width: 100%;
  padding: 14px;
  padding-right: 50px;
  font-size: 18px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-align: right;
  font-weight: 600;
  transition: all 0.2s;
}

.currency-symbol {
  position: absolute;
  right: 16px;
  font-size: 16px;
  color: #999;
  font-weight: 600;
  pointer-events: none;
}

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

.arrow-container {
  text-align: center;
  margin: 16px 0;
  color: #667eea;
  font-size: 28px;
}

/* 현재 환율 표시 */
.rate-info {
  background-color: #f8f9fa;
  border-left: 4px solid #667eea;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rate-text {
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.rate-value {
  color: #667eea;
  font-weight: 700;
  font-size: 18px;
}

.rate-update {
  font-size: 11px;
  color: #999;
}

/* 손익 계산 섹션 */
.profit-loss-section {
  background-color: #fff;
  border: 2px solid #e8eaf6;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.profit-loss-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #333;
}

.profit-loss-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 10px;
}

.profit-loss-label {
  font-size: 14px;
  color: #666;
}

.profit-loss-value {
  font-size: 16px;
  font-weight: 700;
}

.profit {
  color: #28a745;
}

.loss {
  color: #dc3545;
}

.neutral {
  color: #6c757d;
}

/* 비교 분석 섹션 */
.analysis-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #f0f0f0;
}

.analysis-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
}

.analysis-description {
  font-size: 12px;
  color: #999;
  margin-bottom: 16px;
  text-align: left;
}

.analysis-item {
  padding: 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
}

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

.analysis-period {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.analysis-rate {
  font-family: inherit;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.analysis-summary {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.analysis-diff {
  font-weight: 600;
  font-size: 14px;
}

/* 반응형 */
@media (max-width: 480px) {
  .container {
    padding: 24px;
  }

  .logo {
    font-size: 28px;
  }

  .decision-card {
    padding: 20px;
  }

  .decision-title {
    font-size: 16px;
  }
}