/* ===== 어비 폰트 웹폰트 적용 ===== */
@font-face {
  font-family: "Uhbee NaHyun";
  src: url("./UhbeeNaHyun.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}



/* ===== 기본 ===== */
* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

/* ✅ 배경은 html에만 적용 */
html {
  background-image: url("bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* 스크롤해도 배경 유지 */
}

body {
  font-family: "Uhbee NaHyun", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22.5px;   /* 18px × 1.25 */
  line-height: 1.6;
  color: #111;
  padding: 40px;
}



/* ===== 전체 레이아웃 (왼쪽 트랙 / 오른쪽 가사) ===== */
.layout {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: flex-start; /* 왼쪽 기준 */
  gap: 0;
}


/* ===== 왼쪽 영역 (타이틀 + 트랙리스트) ===== */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 40px;

  /* ✅ 왼쪽에 딱 붙이기 */
  margin-left: 0;
  padding-left: 0;
}


/* 제목 이미지 */
.title-img {
  width: 100%;
  display: block;
  margin-left: 0;
}

.tracklist {
  padding-left: 0;
  margin-left: 0;
}


.tracklist li {
  margin: 4px 0;
}

.track-btn {
  font: inherit;
  font-size: 30px;     /* 24px × 1.25 */
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #ff0000;
  text-align: left;
}


.track-btn:hover {
  color: #000000;
}

/* ===== 오른쪽 영역 (가사) ===== */

#lyrics {
  max-width: 800px;
  width: 100%;
}

#lyrics h2 {
  font-size: 37.5px;   /* 30px × 1.25 */
  margin: 0 0 24px;
}

.lyrics-text {
  white-space: pre-line;
  font-size: 22.5px;
  line-height: 1.7;
color: #000000;
}


/* ===== 반응형 (화면 좁을 때 위/아래로 쌓이게) ===== */
@media (max-width: 768px) {
  body {
    padding: 20px;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .track-btn {
    font-size: 20px;
  }

  #lyrics h2 {
    font-size: 24px;
  }
}


/* 처음에는 가사 숨기기 */
#lyrics {
  display: none;
}

.home-text {
  margin-bottom: 32px;
  font-size: 20px;   /* 16px × 1.25 */
  line-height: 1.8;
}

/* 링크 버튼들 (유튜브, 스포티파이 등) */
.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.external-link {
  border: 1px solid #111;
  padding: 8px 14px;   /* 살짝 키움 */
  font-size: 17.5px;  /* 14px × 1.25 */
  text-decoration: none;
  color: #111;
  background: rgba(255, 255, 255, 0.7);
}

.external-link:hover {
  background: #111;
  color: #fff;
}

/* ===== 왼쪽 영역 (타이틀 + 트랙리스트) ===== */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;   /* ✅ 스크롤 내려도 고정됨 */
  top: 40px;          /* body padding만큼 띄워서 위치 고정 */
  align-self: flex-start; /* flex 안에서 올바르게 고정되도록 */
  height: fit-content; /* 내용 높이만큼만 차지 */
}

/* choisofa 로고 크기 & 버튼 느낌 */
.choisofa-logo {
  width: 90px;           /* title 카드랑 비슷한 체급 */
  height: auto;
  margin: 8px 0;
  cursor: pointer;
  opacity: 0.85;
}

.choisofa-logo:hover {
  opacity: 1;
}

/* 로고 토글 설명 영역 */
.about-hidden {
  display: none;
}

.about-visible {
  display: block;
  margin: 10px 0 20px;
  font-size: 14px;
  line-height: 1.5;
}

/* 홈 숨김 / 표시 */
.home-hidden {
  display: none;
}

.home-visible {
  display: block;
}

/* ===== 로고 클릭 설명/링크 강제 표시 ===== */
#about.about-visible {
  display: block !important;
}

#about.about-hidden {
  display: none !important;
}

/* ============================= */
/* choisofa 로고 위치 강제 고정 */
/* ============================= */

/* PC / 태블릿 전용 */
@media (min-width: 769px) {
  .logo-floating {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 1000;
  }
}



.choisofa-logo {
  width: 200px !important;
  height: auto !important;
  display: block !important;
  cursor: pointer;
}


/* ============================= */
/* choisofa 로고 클릭 설명 가독성 */
/* ============================= */

#about {
  color: #ffffff; /* 글씨 흰색 */
}

#about p {
  color: #ffffff;
}

#about .external-link {
  color: #fff;                              /* 글자 흰색 */
  border: 1px solid rgba(255,255,255,0.4); /* 테두리 살짝만 */
  background: rgba(0, 0, 0, 0.55);          /* 🔥 어두운 반투명 */
}

#about .external-link:hover {
  background: rgba(0, 0, 0, 0.75);          /* 호버 시 더 진하게 */
  color: #fff;
}




#about {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;

  /* 🔥 박스 제거 */
  background: none;
  padding: 0;
  border: none;
  box-shadow: none;

  /* 가독성만 최소 보정 (선택) */
  color: #fff;
}


.about-hidden {
  display: none;
}

.about-visible {
  display: block;
}



.title-img {
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.title-img:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.title-img:active {
  transform: translateY(0);
  opacity: 0.75;
}

/* 🚑 트랙리스트 이상한 점(불릿) 완전 제거 */
.tracklist {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.tracklist li {
  list-style: none !important;
}

/* 오른쪽 가사 영역을 화면 중앙 컬럼으로 */
.content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* 중요 */
}


#lyrics,
#home {
  max-width: 875px;   /* 700px × 1.25 */
}


#about p {
  font-size: 20px;     /* ← 여기만 키움 (기존 14px → 16px) */
  line-height: 1.8;    /* 가독성 같이 보정 */
}

/* ===== 모바일 세로 전용 레이아웃 ===== */
@media (max-width: 768px) {

  /* 타이틀 + 로고 세로 정렬 */
  .sidebar {
    position: static;          /* sticky 해제 */
  }

  .title-img {
    margin-bottom: 12px;
  }

  .choisofa-logo {
    display: block;
    margin: 0 0 16px 0;        /* 타이틀 아래로 */
  }
}


/* 모바일 뒤로가기 버튼 */
.mobile-back {
  display: none;
  margin-bottom: 16px;
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
}


/* 기본 숨김 */
.hidden {
  display: none !important;
}


/* ========================= */
/* 모바일 세로 전용 (확정) */
/* ========================= */
@media (max-width: 768px) {


  .logo-floating {
    position: fixed;
    right: 16px;
    bottom: 16px;

    /* 🔥 이 두 줄이 핵심 */
    top: auto;
    left: auto;

    z-index: 2000;
  }

  .choisofa-logo {
    width: 140px !important;
  }

  #about {
    position: static;
    margin-top: 12px;
  }
}

/* 모바일에서 기본 표시 가능하게 (hidden 붙으면 다시 숨김) */
@media (max-width: 768px) {
  .mobile-back {
    display: block;
  }
}

/* ===== 모바일 "세로" 전용 배경 위치 수정 ===== */
@media (max-width: 768px) and (orientation: portrait) {
  html {
    background-position: left center;
  }
}

/* ===== iOS Safari 흰 띠 방지 + 전체 배경 꽉 채우기 ===== */
html {
  height: -webkit-fill-available;
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

/* ===== iPhone / 모바일 세로 전용 확정 해결 ===== */
@media (max-width: 768px) and (orientation: portrait) {
  html {
    background-position: left center !important;
    background-size: cover !important;
    background-attachment: scroll !important; /* ← 이게 핵심 */
  }

  body {
    min-height: 100dvh; /* iOS 17 최신 단위 */
  }
}

/* ===== 모바일 세로: 배경 완전 고정 + 흰띠 제거 ===== */
@media (max-width: 768px) and (orientation: portrait) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    z-index: -1;
  }

  html, body {
    height: auto;
    min-height: 100dvh;
    background: none !important; /* 기존 html/body 배경 제거 */
  }
}
@media (max-width: 768px) and (orientation: portrait) {
  .mobile-back {
    font-family: "UhbeeNaHyun" !important;
    color: black !important;
  }
}

.mobile-back {
  position: relative;
  color: transparent; /* 글자는 안 보이게 */
}

.mobile-back::before {
  content: "←";
  color: black;
  font-family: "UhbeeNaHyun";
  position: absolute;
  left: 0;
  top: 0;
}

.mobile-back {
  font-size: 22px;
}

/* ===== 최종 확정: iPhone 모바일 세로 전용 ===== */
@media (max-width: 768px) and (orientation: portrait) {

  /* 배경 완전 고정 + 흰 띠 제거 */
  html, body {
    background: none !important;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("bg.jpg") no-repeat left center / cover; /* inherit 금지! 직접 넣기 */
    z-index: -1;
  }

  body {
    min-height: 100dvh;
  }

  /* 모바일 뒤로가기 버튼 (화살표 고정) */
  .mobile-back {
    display: block;
    position: relative;
    font-family: "UhbeeNaHyun" !important;
    font-size: 22px;
    color: transparent !important; /* 글자는 숨김 */
  }

  .mobile-back::before {
    content: "←";
    color: black;
    position: absolute;
    left: 0;
    top: 0;
  }
}

