/* 기본 스타일 */
body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: white;
    color: #333;
}

/* 전체 레이아웃 래퍼 */
.container {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    box-sizing: border-box;
}

/* 콘텐츠 너비를 제어하는 main 영역 */
main {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* 헤더(로고) */
.library-header {
    margin-bottom: 40px;
}
.logo-text {
    display: inline-block;
}
.logo-en {
    display: block;
    font-size: 16px;
    font-weight: 500;
}
.logo-ja {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

/* 메인 타이틀 */
.main-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1.5px;
}
.main-title rt {
    font-size: 14px;
    font-weight: 400;
}
.sub-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    margin-bottom: 60px;
}

/* 시작 버튼 */
.start-button {
    display: inline-flex;
    justify-content: center; /* // 水平方向の中央揃え */
    align-items: center;     /* // 垂直方向の中央揃え */
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    border: none;
    background: none;
    padding: 0;
}
.start-button:hover {
    transform: scale(1.05);
}
.start-button-image {
    display: block;
    width: 180px;
    height: auto;
}

/* 트렌드 워드 섹션 */
.trends {
    margin-top: 60px;
    display: inline-block; /* 섹션 크기를 내용물에 맞게 축소 */
    text-align: left;      /* 섹션 내부 요소들을 왼쪽 정렬 */
}
.trends-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}
.trend-words {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.trend-words a {
    color: #007bff;
    text-decoration: underline;
    font-size: 18px;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.2s;
}
.trend-words a:hover {
    color: #0056b3;
}

/* 푸터 */
footer {
    margin-top: 60px;
}
.guide-link {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
}
.powered-by {
    margin-top: 15px;
    font-size: 14px;
    color: #aaa;
}


/* --- 모달을 위한 CSS 코드 --- */

/* 1. 실제 체크박스는 화면에 보이지 않게 처리 */
.modal-toggle-checkbox {
    display: none;
}

/* 2. 모달 뒷배경 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

/* 3. 체크박스가 체크되었을 때 모달을 보여줌 */
.modal-toggle-checkbox:checked ~ .modal-overlay {
    visibility: visible;
    opacity: 1;
}

/* 4. 모달 콘텐츠 창 */
.modal-content {
    position: relative;
    background-color: white;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1001;
}

/* 5. 모달 내부 텍스트 스타일 */
.modal-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 10px;
}
.modal-title rt {
    font-size: 12px;
}
.modal-subtitle {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 30px;
}
.modal-close-button {
 position: absolute; /* // 親要素(.modal-content)を基準に位置を決めます */
 top: 10px;  /* // 上から10pxの位置に */
 right: 20px;  /* // 右から20pxの位置に */
 font-size: 30px;  /* // '×'記号の大きさを指定します */
 color: #aaa; /* // 基本の色を薄い灰色に設定します */
 cursor: pointer; /* // マウスカーソルを手の形に変更します */
 line-height: 1; /* // 高さを調整して中央に配置します */
}
.modal-close-button:hover {
     color: #333; /* // マウスを乗せると色を濃くします */
}

/* 6. 모달 버튼 그룹 */
.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.modal-button {
    display: block;
    padding: 12px;
    border: 1px solid ;
    border-radius: 30px;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.modal-button:hover {
    background-color: #f0f0f0;
}

/* 7. 배경 클릭으로 모달 닫기 */
.modal-close-trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    cursor: pointer;
}

@media (max-width: 450px) {
  .main-title {
    font-size: 28px;
  }
}
