@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;500;600&display=swap');

:root{
  --carrot:#FF6F0F;
  --carrot-weak:rgba(255,111,15,0.08);
  --bg:#f6f7f9;
  --text:#222;
  --line:#eaeaea;
  --card:#ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
               "Noto Sans KR", "Segoe UI", sans-serif;
}

body {
  background-image: url("bg_main.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;

  color: var(--text);
  min-height: 100vh;   /* ✅ 이 줄만 추가 */
}

/* =========================
   화면
   ========================= */
.screen {
  display: none;
  min-height: 100vh;   /* ✅ 최소만 화면 */
  height: auto;        /* ✅ 내용만큼 늘어남 */
  padding: 40px 20px;
  text-align: center;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title {
  font-size: 32px;
  margin-bottom: 24px;
  font-weight: 700;
  color: #111;
}

/* 시작 화면 안내 문구 */
.start-desc{
  font-size: 14px;
  color: #555;
  margin-bottom: 14px;
}

/* 닉네임 입력 */
.nickname-input{
  width: 100%;
  max-width: 240px;
  margin: 0 auto 20px;

  padding: 12px;
  font-size: 14px;
  text-align: center;

  border-radius: 10px;
  border: 1px solid #ccc;
}

/* 시작 화면 버튼 */
#screen-start .primary-btn {
  color: #fff;             /* 글자 흰색 */
  background: var(--carrot); /* 당근색 배경 */
  border: none;
  font-weight: 700;
  padding: 18px 40px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .08s, filter .15s;
}

#screen-start .primary-btn:hover {
  filter: brightness(0.97);
}

#screen-start .primary-btn:active {
  transform: scale(0.98);
}

/* 메인 화면 제목 */
.screen .title {
  font-size: 32px;
  margin-bottom: 40px;
  font-weight: 700;
  color: #111;             /* 검정 유지 */
}

/* =========================
   공통 버튼
   ========================= */
/* 앱카드 내부 버튼만 글씨 진한 회색 */
#screen-part-listen .back-btn,
#screen-text .back-btn {
  color: #222;       /* 글씨색 변경 */
}

/* 메인 제목과 버튼 글씨 색상 통일 */
.screen .title,
.primary-btn {
  color: #111;       /* 검정/진한 글씨 */
}

/* primary-btn 기존 배경 유지 */
.primary-btn {
  padding: 18px 40px;
  border-radius: 12px;
  border: none;
  background: var(--carrot);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, filter .15s;
}

/* =========================
   전체 듣기 컨트롤 버튼
   ========================= */
  .all-controls{
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0 6px;
  }

.ctrl-btn{
  background: #f6f5ef;              /* 메뉴 버튼과 동일한 종이톤 */
  color: #2f5d46;                   /* 동일 텍스트 색 */
  border: 1px solid rgba(63,127,95,0.28);
  border-radius: 16px;

  width: 96px;
  height: 44px;

  font-size: 14px;
  font-weight: 700;
  cursor: pointer;

  box-shadow: 0 3px 8px rgba(0,0,0,0.06);  /* 🔑 살짝만 분리 */
  transition: background-color .15s, box-shadow .15s, transform .08s;
}

.ctrl-btn:hover{
  background: #ffffff;              /* 살짝 밝아짐 */
  box-shadow: 0 5px 12px rgba(0,0,0,0.10);
}

.ctrl-btn:active{
  transform: scale(0.97);
}

  /* 재생 버튼도 동일 사이즈로 통일 */
  #btnAllPlay{
    width: 96px;
    height: 44px;
    font-size: 14px;
    padding: 0;
  }

.ctrl-btn:hover{
  background: #f4f8f5;                 /* 🌿 은은한 숲빛 */
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.ctrl-btn:active{
  transform: scale(0.96);
}

.back-btn{
  margin-top: 20px;
  padding: 12px 18px;

  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;

  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}

.back-btn:hover{
  background: var(--carrot-weak);
  border-color: var(--carrot);
  color: var(--carrot);
}

/* =========================
   메뉴
   ========================= */
.menu {
  width: 100%;
  max-width: 360px;

  display: flex;
  flex-direction: column;
  gap: 26px;

  margin: 36px auto 0;
}

/* 메뉴 하단 영역 */
.menu-footer{
  margin-top: 28px;
  text-align: center;
}

/* 닉네임 변경 텍스트 버튼 */
.text-btn{
  background: none;
  border: none;
  padding: 6px 8px;

  font-size: 13px;
  color: #666;
  cursor: pointer;
}

.text-btn:hover{
  color: var(--carrot);
}

.menu-btn {
  padding: 22px 20px;
  font-size: 17px;
  font-weight: 700;

  border-radius: 18px;
  border: 1px solid rgba(63,127,95,0.35);

  background: #f6f5ef;          /* 종이톤 */
  color: #2f5d46;               /* 숲 글씨색 */

  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform .12s, box-shadow .15s, background-color .15s;
}

.menu-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.menu-btn:active {
  transform: scale(0.98);
}

/* =========================
   듣기 화면(예비)
   ========================= */
.listen-info{
  font-size: 14px;
  color:#666;
  margin-bottom: 32px;
}

.listen-verse{
  width: 100%;
  max-width: none;
  margin-left: 0;          /* ❌ 음수 마진 제거 */
  margin-right: 0;

  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 20px;

  padding: 22px 16px;      /* ⬅ 좌우 최대 확장 */
  margin-bottom: 32px;

  text-align: left;
  line-height: 1.75;

  word-break: keep-all;
  overflow-wrap: anywhere; /* ⬅ 화면 밖 탈출 방지 */

  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* =========================
   상단 헤더 (제목 중앙 + 메인화면 버튼 우측)
   ========================= */
.header-row {
  width: 100%;
  max-width: 520px;     /* 본문 폭과 동일 */
  margin: 0 auto 12px;
  padding-bottom: 12px;

  display: flex;
  justify-content: space-between;  /* 좌/우 분리 */
  align-items: center;

  border-bottom: 1px solid var(--line);
}

/* 제목 */
.header-row .title {
  margin: 0;
  flex: 1;
  text-align: center;              /* 중앙 유지 */
}

/* 메인화면 버튼 */
/* 우측 상단 메인화면 버튼 개선 */
.home-btn {
  position: static;
  padding: 6px 12px;
  font-size: 14px;

  background: #f6f5ef;                  /* ✅ 전체듣기/메뉴 종이톤 */
  color: #2f5d46;                       /* ✅ 숲 글씨색 */
  border: 1px solid rgba(63,127,95,0.28);

  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  transition: background-color .15s, box-shadow .15s, transform .08s;
}

.home-btn:hover {
  background: #ffffff;
  box-shadow: 0 5px 12px rgba(0,0,0,0.10);
}

.home-btn:active {
  transform: scale(0.97);
}

/* =========================
   탭(모드)
   ========================= */
.mode-tabs{
  width: 100%;
  max-width: 520px;              /* 기준 유지 */
  margin: 12px auto 18px;

  display: flex;
  justify-content: center;
  gap: 10px;
}

/* 🔧 “꽉 찬” 느낌 제거: 각 버튼 최대폭 제한 */
.tab{
  flex: 0 1 148px;               /* 🔧 폭 줄임 + 반응형 */
  max-width: 148px;

  height: 42px;                  /* 🔧 살짝 낮춤 */
  padding: 0 12px;

  border-radius: 999px;          /* 🔧 가볍게(투박 제거) */
  border: 1px solid rgba(0,0,0,0.08);  /* 🔧 테두리 약화 */
  background: rgba(255,255,255,0.75);  /* 🔧 종이톤 */

  font-size: 16px;               /* 🔧 살짝 감소 */
  font-weight: 600;              /* 🔧 기본 무게 낮춤 */

  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;

  display: flex;
  align-items: center;
  justify-content: center;

  white-space: nowrap;
}

/* 🔹 전체듣기와 동일한 ‘은은한 활성 톤’ */
.tab.active{
  background: #f4f8f5;                 /* 종이+숲 톤 */
  border-color: rgba(63,127,95,0.45);
  color: #2f5d46;
  font-weight: 800;
}

/* 상태 필터 활성도 동일 톤 */
.status-filter button.on{
  background: #f4f8f5;
  border-color: rgba(63,127,95,0.45);
  color: #2f5d46;
  font-weight: 800;
}

/* hover는 이미 적절 → 유지 */
.action-btn:hover{
  background: rgba(63,127,95,0.12);
  border-color: #3f7f5f;
  color: #3f7f5f;
}

/* 별 상태도 ‘채움 제거 + 은은’ */
.status-slot.star{
  background: #f4f8f5;
  border-color: rgba(63,127,95,0.45);
  color: #2f5d46;
}

/* =========================
   상태 필터
   ========================= */
.status-filter{
  width: 100%;
  max-width: 520px;              /* 기준 유지 */
  margin: 0 auto 18px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;

  padding: 0 6px;                /* 🔧 좌우 숨통 */
}

.status-filter .break{
  display: none;
}

.status-filter button{
  height: 42px;                  /* 🔧 살짝 낮춤 */
  padding: 0 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;          /* 🔧 부드럽게(투박 제거) */
  border: 1px solid rgba(0,0,0,0.08);  /* 🔧 테두리 약화 */
  background: rgba(255,255,255,0.75);  /* 🔧 종이톤 */

  font-size: 16px;               /* 🔧 살짝 감소 */
  font-weight: 600;              /* 🔧 기본 무게 낮춤 */

  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}

.status-filter button.on{
  background: var(--carrot);
  border-color: var(--carrot);
  color: #fff;
  font-weight: 700;              /* 🔧 선택만 강조 */
}

.status-filter button:hover{
  background: var(--carrot-weak);
  border-color: var(--carrot);
  color: var(--carrot);
}

.status-filter button.on{
  background: #fff;
  border-color: var(--carrot);
  color: var(--carrot);
  font-weight: 700;
}

/* =========================
   본문 리스트
   ========================= */
.verse-list{
  width: 100%;
  max-width: none;          /* 제한 해제 */
  margin: 0 auto;
  text-align: left;
}

.verse {
  position: relative;
  padding: 18px 16px;
  margin-bottom: 16px;

  background: rgba(255,255,255,0.92);       /* 🌿 숲 컨셉 카드 */
  border: 1px solid rgba(63,127,95,0.18);   /* 연한 숲 테두리 */
  border-radius: 16px;

  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: box-shadow .15s, transform .12s;
}

.verse:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.verse:hover {
  box-shadow: 0 5px 14px rgba(0,0,0,0.10);
}

.verse-text {
  background: transparent;
  color: #2f3a2e;                            /* 잉크 느낌 */
  line-height: 1.6;
}

/* 체크박스 + 절 제목(Isaiah 53:1) 같은 줄 */
/* 기본: 여백 없음 */
.verse-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding-right:0;
}

/* 영문 모드에서만 스피커 공간 확보 */
#screen-text.mode-en .verse-head{
  padding-right:52px;
}

/* 절 제목 */
.verse-title{
  font-size: 17px;
  font-weight: 800;
  color: #111;
}

/* 본문: 좌우 100% 확장 */
.verse-body{
  margin-top: 10px;
  padding-left: 0;
  padding-right: 0;
}

/* 마우스 오버 */
.verse:hover{
  border-color: #e0e0e0;
}

/* 선택 시 배경 유지, 외곽선 강조 */
.verse.selected {
  background: #fefefe;
  border: 2px solid #3f7f5f; /* 🌿 숲색 */
  box-shadow: 0 0 0 3px rgba(63,127,95,0.12);
}

/* 상태 슬롯(동그라미) */
.status-slot{
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #d6d6d6;
  flex: 0 0 22px;
  margin-top: 2px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 700;
  color: transparent;
}

/* 미암송 */
.status-slot.none{
  background: transparent;
}

/* 암송완료 = 체크 */
.status-slot.done{
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}
.status-slot.done::before{
  content: "✓";
}

/* 집중암송 = 별 */
.status-slot.star{
  background: var(--carrot);
  border-color: var(--carrot);
  color: #fff;
}
.status-slot.star::before{
  content: "★";
}


/* 본문 텍스트 */
.verse-text{
  font-size: 17px;
  line-height: 1.75;
  color: #222;
  word-break: keep-all;
}

/* =========================
   컬러바 (절 아래로 이동)
   ========================= */
.color-bar{
  width: 100%;
  max-width: 520px;
  margin: 0 auto 14px;
  padding: 12px 10px;

  display: flex;
  flex-wrap: wrap;              /* ✅ 2줄 허용 */
  gap: 10px;

  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
}

/* ===== 1줄: 색상 ===== */
.color{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: 0 0 auto;
}

/* 줄 강제 분리 */
.bar-break{
  flex: 0 0 100%;               /* ✅ 여기서 정확히 줄 끊음 */
  height: 0;
}

/* ===== 2줄: 암송 버튼 ===== */
.action-btn{
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 해제 버튼은 오른쪽 끝 */
.action-btn.clear{
  margin-left: auto;
}

.color{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(0,0,0,0.06);
  transition: transform .08s;
}
.color:active{ transform: scale(0.96); }

.bar-break{
  flex: 1 1 100%;
  height: 0;
}

/* =========================
   상태 버튼 (컬러바 안) - 최종 복구본
   ========================= */
.action-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 10px 12px;
  min-width: 96px;

  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;

  font-size: 14px;
  font-weight: 600;
  cursor: pointer;

  transition: background-color .15s, border-color .15s, color .15s;
}

/* 해제 버튼: 높이·폰트 유지, 폭만 축소 */
.action-btn.clear{
  min-width: 64px;      /* ⬅ 폭만 줄임 */
  padding: 10px 12px;   /* ⬅ 상하 동일 → 높이 유지 */
  font-size: 14px;      /* ⬅ 집중암송과 동일 */
  font-weight: 600;

  margin-left: auto;    /* ⬅ 우측 정렬 유지 */
  opacity: 0.85;        /* ⬅ 살짝만 존재감 */
}

/* hover 공통 */
.action-btn:hover{
  background: var(--carrot-weak);
  border-color: var(--carrot);
  color: var(--carrot);
}

/* 암송완료 = 체크 */
.action-btn.done{
  border-color: rgba(34,197,94,0.35);
}
.action-btn.done::before{
  content: "✓";
  font-weight: 800;
}

/* 집중암송 = 별 */
.action-btn.star{
  border-color: rgba(255,111,15,0.35);
}
.action-btn.star::before{
  content: "★";
  font-weight: 800;
}

/* 해제 (폭 최종 확정본) */
.action-btn.clear{
  border-color: rgba(0,0,0,0.12);

  padding-left: 10px;    /* 좌우만 */
  padding-right: 10px;   /* 좌우만 */

  min-width: unset;     /* 🔑 기존 64/96px 완전 무력화 */
  width: auto;          /* 🔑 내용 기준 폭 */

}

/* =========================
   중앙 카드 컨테이너 (숲/동화 컨셉)
   ========================= */
.app-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(3px);

  border-radius: 22px;
  padding: 40px 12px 36px;   /* ⬅ 좌우 여백 축소 */
  width: 100%;               /* ⬅ 화면 끝까지 */
  max-width: none;
  margin: 24px auto 0;

  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* =========================
   절 상단 헤더 (체크박스 + 절 번호)
   ========================= */
.verse-header{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* =========================
   절 우측 상단 오디오 컨트롤 (재생/정지/반복)
   ========================= */
/* =========================
   절 우측 상단 오디오 컨트롤 (기본 복구)
   ========================= */
.verse-audio-ctrl{
  position: absolute;
  top: 12px;
  right: 12px;

  display: flex;
  gap: 6px;

  height: 30px;
  z-index: 2;
}

/* 아이콘 기본 */
.audio-icon{
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: background-color .15s, transform .1s;
}

.audio-icon:hover{
  background: rgba(63,127,95,0.12);
  transform: scale(1.05);
}

/* ✅ 구문/한글에서만 숨김 */
#screen-text.mode-split .verse-audio-ctrl,
#screen-text.mode-kr .verse-audio-ctrl{
  display: none !important;
}


.audio-icon{
  width:30px;
  height:30px;

  border-radius:50%;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  transition:background-color .15s, transform .1s;
}

.audio-icon:hover{
  background: rgba(63,127,95,0.12);
  transform: scale(1.05);
}

.audio-icon{
  width:30px;
  height:30px;

  border-radius:50%;
  cursor:pointer;

  transition:background-color .15s, transform .1s;
}

.audio-icon:hover{
  background: rgba(63,127,95,0.12);
  transform: scale(1.05);
}

.audio-icon.hidden{
  display:none;
}

.verse-title{
  font-size: 17px;        /* ✅ 본문과 동일 */
  font-weight: 700;      /* 제목 느낌 강화 */
  color: #111;
  white-space: nowrap;
}

/* =========================
   본문 화면 전용 확장
   ========================= */
#screen-text .app-card{
  max-width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

/* =========================
   본문 화면 전용 확장
   ========================= */
#screen-text .app-card{
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(3px);

  border-radius: 22px;
  padding: 36px 12px 32px;

  width: 100%;
  max-width: none;
  margin: 20px auto 0;

  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* =========================
   텍스트 선택 색상 통일 (당근 제거)
   ========================= */
::selection {
  background: rgba(63,127,95,0.25);
  color: #111;
}

::-moz-selection {
  background: rgba(63,127,95,0.25);
  color: #111;
}

/* =========================
   메인 화면 버튼 (menu-btn) – 최종본
   ========================= */
.menu-btn{
  background: linear-gradient(180deg, #d4f5e8, #bfeedd);
  color: #1f3d33;

  border: 1px solid #9adbc3;
  box-shadow: 0 4px 0 #86cbb2;

  font-weight: 700;
}

.menu-btn:active{
  background: linear-gradient(180deg, #bfeedd, #a6e5cd);
  box-shadow: 0 2px 0 #6fb8a0;
  transform: translateY(2px);
}

/* =========================
   본문 액션 버튼 (암송완료 / 집중암송 / 해제)
   ========================= */
.action-btn{
  background: linear-gradient(180deg, #c9f2e3, #aee8d3);
  color: #1f3d33;

  border: 1px solid #8fd6bc;
  box-shadow: 0 4px 0 #7cc9ae;
}

.action-btn:active{
  background: linear-gradient(180deg, #9edec3, #8fd6bc);
  box-shadow: 0 2px 0 #6ab59c;
  transform: translateY(2px);
}

/* =========================
   언어 탭 (영문 / 구문 / 한글)
   ========================= */

/* 기본 상태 */
.tab{
  background: rgba(255,255,255,0.85);
  color: #2f5d46;

  border: 1px solid rgba(63,127,95,0.25);
  box-shadow: 0 2px 0 rgba(63,127,95,0.18);

  font-weight: 600;
  transition: background .12s, box-shadow .12s, transform .1s;
}

/* 눌림 */
.tab:active{
  background: #f4f8f5;
  box-shadow: 0 1px 0 rgba(63,127,95,0.25);
  transform: translateY(1px);
}

/* 선택됨 */
.tab.active{
  background: linear-gradient(180deg, #c9f2e3, #aee8d3);
  color: #113328;

  border-color: #8fd6bc;
  box-shadow: 0 3px 0 #7cc9ae;

  font-weight: 800;
}
