/* ==================================================
   🎨 base.css — 오빠 전용 확정판 with 주석 설명
   전체 구조: 공통 설정 → 데스크탑 전용 → 모바일 전용
   ================================================== */

/* ========== ✅ [공통 기본 설정] ========== */
body {
  font-family: Arial, sans-serif; /* 본문 기본 글꼴 */
  margin: 0;
  padding: 1rem; /* 기본 여백 */
  background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
              url('/static/back.png') no-repeat left center fixed; /* 배경 이미지 */
  background-size: 65%;
  background-position: left center;
  background-attachment: fixed;
  color: #333; /* 기본 텍스트 색상 */
  line-height: 1.6; /* 줄 간격 */
}

/* ========== ✅ [공통 카드 스타일] ========== */
.box-card {
  width: 100%;
  max-width: 720px; /* 카드 최대 너비 */
  margin: 2em auto; /* 위아래 여백 & 가운데 정렬 */
  border-radius: 12px; /* 둥근 테두리 */
  padding: 1.5em; /* 안쪽 여백 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 그림자 */
  backdrop-filter: blur(3px); /* 흐림 효과 */
  /*background: #ffffffee; !* 💡 반투명 흰 배경 *!*/
  background: transparent;  /* 완전 투명 */
}

/* ========== ✅ [헤더 영역] ========== */
.header-box {
  display: flex; /* 수평 정렬 */
  flex-wrap: nowrap; /* 줄 바꿈 없음 */
  align-items: center; /* 수직 가운데 정렬 */
  justify-content: center; /* 가로 가운데 정렬 */
  gap: 16px; /* 요소 간 여백 */
  width: 100%;
  max-width: 100%;
  overflow: hidden; /* 넘치는 콘텐츠 숨김 */
  box-sizing: border-box; /* 패딩 포함 크기 계산 */
}

/* ========== ✅ [Capsule Data: 수직정렬용] ========== */
.center-header {
  flex-direction: column; /* 수직 정렬 */
  justify-content: center; /* 수직 가운데 정렬 */
  align-items: center; /* 수평 가운데 정렬 */
  text-align: center; /* 텍스트 가운데 정렬 */
}

/* ========== ✅ [프로필 이미지] ========== */
.profile-image {
  width: 128px; /* 이미지 크기 */
  height: auto;
  border-radius: 12px; /* 둥근 테두리 */
  flex-shrink: 0; /* 축소되지 않도록 */
}

/* ========== ✅ [타이틀 텍스트] ========== */
.header-title {
  font-size: 2.8rem; /* 큰 타이틀 */
  margin: 0;
  white-space: nowrap; /* 줄바꿈 없음 */
  overflow: hidden;
  text-overflow: ellipsis; /* 넘치면 생략 (...) */
  flex-grow: 1; /* 공간 채움 */
  flex-shrink: 1; /* 줄어들 수 있음 */
  min-width: 0;
}

/* ========== ✅ [오른쪽 정렬 텍스트] ========== */
.right-aligned {
  font-size: 2.2rem;
  text-align: right;
  display: block;
  max-width: 100%;
  width: auto;
  word-break: keep-all; /* 단어 줄바꿈 방지 */
}

/* ========== ✅ [📊 금융 정보 라인] ========== */
.finance-line {
  margin: 0; /* 기본 여백 제거 */
  padding: 0.1em 0; /* 상하 여백 조절 */
  line-height: 1.1; /* 줄간격 타이트하게 */
  list-style: none; /* 점 제거 */
}

.finance-line a {
  display: flex; /* 수평 정렬 */
  justify-content: space-between; /* 좌우 정렬 */
  align-items: center; /* 수직 중앙 정렬 */
  text-decoration: none; /* 밑줄 제거 */
  color: inherit; /* 부모 색상 상속 */
  width: 100%;
}

.finance-line:last-child {
  border-bottom: none; /* 마지막 줄 테두리 제거 */
}

.finance-line .label {
  font-weight: bold; /* 왼쪽 텍스트 굵게 */
  color: #222; /* 진한 회색 */
  flex: 1; /* 왼쪽 영역 넓게 차지 */
}

.finance-line .value {
  font-size: 1.5rem; /* 숫자 크기 */
  color: red; /* 빨간색 강조 */
  font-weight: bold;
  font-family: 'Pretendard', sans-serif;
  font-feature-settings: "tnum"; /* 숫자 간격 균등 */
  text-align: right;
  min-width: 160px;
  letter-spacing: 0.05em; /* 자간 */
}

/* ========== ✅ [날씨 카드 스타일] ========== */
.weather-card {
  width: 100%; /* 카드 너비 */
  max-width: 720px; /* 최대 너비 */
  margin: 2em auto; /* 세로 여백 + 가운데 정렬 */
  border-radius: 12px; /* 둥근 모서리 */
  padding: 1.5em; /* 내부 여백 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 그림자 효과 */
  backdrop-filter: blur(3px); /* 배경 흐림 */
  /*background: #ffffffee; !* 💡 반투명 흰 배경 *!*/
  background: transparent;  /* 완전 투명 */
}

.weather-header h2 {
  font-size: 1.8rem; /* 제목 크기 */
  margin-bottom: 0.5rem; /* 아래 여백 */
}

.weather-main {
  display: flex; /* 수평 배치 */
  align-items: center; /* 수직 가운데 정렬 */
  gap: 1em; /* 요소 간 간격 */
  margin-bottom: 1em; /* 아래 여백 */
}

.weather-temp {
  font-size: 2.4rem; /* 온도 크기 */
  font-weight: bold; /* 굵게 */
}

.weather-desc {
  font-size: 1.2rem; /* 설명 텍스트 크기 */
  color: #444; /* 중간 회색 */
}

.weather-details ul {
  padding: 0; /* 안쪽 여백 제거 */
  list-style: none; /* 리스트 마커 제거 */
  line-height: 1.6; /* 줄 간격 */
  font-size: 1rem; /* 글자 크기 */
  columns: 1; /* 열 개수 */
}

.hourly-weather {
  display: flex; /* 수평 나열 */
  flex-direction: row; /* 가로 방향 */
  flex-wrap: nowrap; /* 줄 바꿈 없음 */
  overflow-x: auto; /* 수평 스크롤 */
  gap: 10px; /* 요소 간 여백 */
  margin-top: 1em; /* 위쪽 여백 */
  padding-bottom: 1em; /* 아래쪽 여백 */
  scroll-snap-type: x mandatory; /* 스냅 스크롤 */
}

.hourly-block {
  flex-shrink: 0; /* 축소 방지 */
  min-width: 64px; /* 최소 너비 */
  text-align: center; /* 가운데 정렬 */
  font-size: 0.9rem; /* 글자 크기 */
  background: #f0f4f8; /* 배경색 */
  padding: 0.5em; /* 내부 여백 */
  border-radius: 8px; /* 둥근 모서리 */
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.1); /* 그림자 */
  scroll-snap-align: start; /* 스냅 정렬 */
}

.hourly-block img {
  width: 36px; /* 아이콘 너비 */
  height: auto; /* 비율 유지하며 높이 자동 조정 */
}

/* ========== ✅ [📱 모바일 대응] ========== */
@media (max-width: 768px) {
  .profile-image {
    width: 64px; /* 모바일용 이미지 크기 */
  }

  .header-title {
    font-size: 1.8rem; /* 모바일용 제목 크기 */
  }

  .right-aligned {
    font-size: 1.2rem !important; /* 모바일 숫자 크기 */
    text-align: right;
    display: block;
    width: auto;
  }

  .finance-line {
    margin: 0; /* 여백 제거 */
    padding: 0.1em 0; /* 상하 여백 최소화 */
    line-height: 1.1; /* 줄간격 조절 */
    list-style: none; /* 점 제거 */
  }

  .finance-line .value {
    font-size: 1.4rem; /* 숫자 크기 줄임 */
    text-align: left;
    margin-top: 0.3em;
    min-width: unset; /* 최소 너비 해제 */
  }

  .weather-header h2 {
    font-size: 1.4rem; /* 모바일 제목 */
  }

  .weather-temp {
    font-size: 1.8rem; /* 모바일 온도 크기 */
  }

  .weather-desc {
    font-size: 1rem; /* 모바일 설명 */
  }

  .weather-details ul {
    font-size: 1.1rem; /* 모바일 상세 */
    line-height: 1.7;
  }

  .hourly-block {
    font-size: 1rem; /* 모바일 시간별 블록 크기 */
  }

  .hourly-block img {
    width: 40px; /* 모바일 아이콘 크기 */
    height: auto; /* 비율 유지 */
  }

  .box-card,
  .weather-card {
    width: 90%; /* 모바일 전체 너비 */
    max-width: 100%;
    margin: 1em auto; /* 위아래 여백 */
    padding: 1em; /* 패딩 조정 */
    /*background: #ffffffee; !* 모바일에서도 반투명 유지 *!*/
    background: transparent !important;  /* 완전 투명 우선순위 강제*/
  }
}
