/* 基本スタイル */
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;
} */

.library-logo{
    height: 50px;
    width: auto;
}

/* メインタイトル */
.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: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;
    top: 10px;
    right: 10px;
    font-size: 30px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
}
.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;
    background-color: transparent;
}
.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 (min-width:401px) and (max-width: 450px) {
    .main-title {
        font-size: 28px;
    }
}

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


/* =================================== */
/* ▼ [追加] InfoモーダルのためのCSSコード ▼ */
/* =================================== */

/* Infoモーダルの背景 (既存の modal-overlay をコピー) */
.modal-info {
    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;
}

/* Infoモーダルスイッチ(#info-modal-toggle)がチェックされた時にInfoモーダルを表示 */
#info-modal-toggle:checked ~ .modal-info {
    visibility: visible;
    opacity: 1;
}

/* Infoモーダルのコンテンツウィンドウ (既存の modal-content をコピー・修正) */
.modal-content-info {
    position: relative; /* 閉じるボタンのための基準点 */
    background-color: white;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 600px; /* ガイド内容が多いため、幅を少し広げる */
    text-align: left; /* ガイド内容は左揃え */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1001;

    /* (重要) 内容が長くなった場合にスクロールを許可 */
    max-height: 80vh;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
}

.info-text-container {
    flex: 1;
    overflow-y: auto;
    overflow-wrap: break-word;
    margin-top: 20px;
}

/* Infoモーダル内部の閉じるボタン(X)は既存の .modal-close-button スタイルを共有 */
/* Infoモーダル内部の閉じるボタン(Label)は既存の .modal-button スタイルを共有 */
.modal-content-info .modal-close-button {
    text-align: center; /* '閉じる'ボタンを中央揃え */
    margin-top: 5px;

}

/* Infoモーダル内部の見出し、本文スタイル */
.modal-content-info h1,
.modal-content-info h2,
.modal-content-info h3 {
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}
.modal-content-info p,
.modal-content-info li {
    line-height: 1.6;
}
