:root {
    /* アクセントカラー */
    --primary-color: #00c8c8;
    /* ダークモードの基本色 (変更) */
    --background-color: #121212;
    /* モジュール/カードの背景色 (変更) */
    --card-background-dark: #1e1e1e;

    --text-color-dark: #f0f0f0;
    /* 明るいテキスト (ダークモード用) */
    --border-color-dark: #333;
    /* 境界線 */
    --code-background-dark: #2a2a2a;
    /* コードブロックの背景 */
    --warning-color: #e74c3c;
    /* 警告の赤 */
    --contact-color: #27ae60;
    /* 問い合わせの緑 */

    /* モーダル (白背景) の色 */
    --modal-bg-light: white;
    --text-color-light: #333;
    --border-color-light: #eee;
}

/* ページ全体のリセットと基本スタイル */
body {
    background-color: var(--background-color);
    color: var(--text-color-dark);
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* コンテンツの中央配置と最大幅の設定 */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 10px;
    text-align: center;
}

/* ヘッダー */
.main-header {
    margin-bottom: 40px;
}

.main-header h1 {
    color: var(--primary-color);
    font-size: 2.8em;
    margin-top: 10px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px rgba(0, 200, 200, 0.5);
    /* アクセントカラーの影 */
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.8;
}

/* 画像スタイル */
.addon-image,
.image-gallery img,
.link-to-top img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.image-gallery img {
    display: block;
    margin: 20px auto;
}

/* セクション共通スタイル (モジュール背景色 #1e1e1e を使用) */
.info-section {
    margin: 40px 0;
}

.section-header {
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--background-color);
    /* ダークな背景色上の文字を見やすく */
    border-radius: 6px 6px 0 0;
    margin: 0;
    text-align: left;
}

.primary-bg {
    background: var(--primary-color);
}

.warning-bg {
    background: var(--warning-color);
    color: white;
}

.contact-bg {
    background: var(--contact-color);
    color: white;
}

.section-content {
    background-color: var(--card-background-dark);
    /* モジュール背景色 #1e1e1e */
    color: var(--text-color-dark);
    padding: 20px;
    border-radius: 0 0 6px 6px;
    text-align: left;
    border: 1px solid var(--border-color-dark);
    min-height: 100px;
}

.section-content h2,
.section-content h3 {
    color: var(--text-color-dark);
    border-bottom: 1px solid var(--border-color-dark);
    padding-bottom: 5px;
    margin-top: 25px;
}

.section-content h4 {
    color: var(--primary-color);
    margin-top: 15px;
}

/* リストスタイル */
.list-dots,
.sound-list {
    list-style: none;
    padding-left: 0;
}

.list-dots li::before,
.sound-list li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.sound-list li {
    margin-bottom: 5px;
}

/* コマンドスタイル */
.command-section {
    font-size: 1em;
}

.command-group {
    margin-bottom: 20px;
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

.command-code {
    display: block;
    background-color: var(--code-background-dark);
    /* コード背景色 */
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--text-color-dark);
    overflow-x: auto;
    margin: 10px 0;
}

.inline-code {
    background-color: var(--code-background-dark);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    color: var(--primary-color);
}

.note {
    font-size: 0.9em;
    opacity: 0.7;
    margin-top: 15px;
}

/* リンク */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #40e0d0;
    /* 少し明るい色 */
    text-decoration: underline;
}

.target-selector-link {
    text-align: center;
    margin-top: 30px;
}

/* 警告セクションの調整 */
.warning-content h2 {
    color: var(--warning-color);
    border-bottom: 1px solid var(--warning-color);
}

.warning-item h3 {
    color: var(--warning-color);
    margin-top: 20px;
    border-bottom: none;
}

/* 問い合わせセクションの調整 */
.contact-section iframe {
    border: 1px solid var(--contact-color);
    border-radius: 4px;
}

/* ダウンロードボタン */
.download-container {
    margin: 50px 0;
}

.download-button {
    padding: 20px 40px;
    font-size: 2em;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%;
    max-width: 750px;
    box-shadow: 0 5px 15px rgba(0, 200, 200, 0.4);
}

.primary-bg-button {
    background-color: var(--primary-color);
}

.download-button:hover {
    background-color: #00aaaa;
    /* 少し暗く */
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 200, 200, 0.6);
}

.download-button:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(0, 200, 200, 0.4);
}

/* Google AdSense広告プレースホルダー */
.ad-container {
    margin: 40px auto;
    padding: 20px;
    background-color: var(--card-background-dark);
    border: 1px dashed var(--border-color-dark);
    text-align: center;
}

.ad-label {
    font-size: 0.8em;
    opacity: 0.5;
    margin: 0;
}

/* ==================================== */
/* モーダル (ポップアップ) スタイル (白背景に強制) */
/* ==================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* 背景オーバーレイは暗いまま */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.modal-content.modal-white-bg {
    background-color: var(--modal-bg-light);
    /* 白背景に設定 */
    color: var(--text-color-light);
    /* テキストを黒に */
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0, 200, 200, 0.5);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: left;
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    /* アクセントカラーを維持 */
    cursor: pointer;
    border: none;
    background: none;
    line-height: 1;
}

.modal-close-button:hover {
    color: #777;
    /* 白背景になじむ色 */
}

.modal-header h2 {
    margin-top: 0;
    color: var(--text-color-light);
    /* 黒系のタイトル */
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 15px;
    margin-bottom: 20px;
    color: var(--text-color-light);
    /* テキストを黒に */
    /* スクロールバーのカスタム (WebKit用) */
    scrollbar-color: var(--primary-color) var(--border-color-light);
    scrollbar-width: thin;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
}

.modal-body::-webkit-scrollbar-track {
    background: var(--border-color-light);
}

.modal-body h3 {
    color: var(--text-color-light);
    /* 黒系の見出し */
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 5px;
    margin-top: 25px;
}

.modal-body p,
.modal-body li {
    color: var(--text-color-light);
    /* テキストを黒に */
}


.modal-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color-light);
}

.agree-download-button {
    padding: 20px 40px;
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: not-allowed;
    opacity: 0.4;
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.1s ease;
    background-color: var(--primary-color);
    width: 100%;
    max-width: 750px;
}

.agree-download-button.enabled {
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 5px 15px rgba(0, 200, 200, 0.4);
}

.agree-download-button.enabled:hover {
    background-color: #00aaaa;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 200, 200, 0.6);
}

/* フッター */
.footer-info {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color-dark);
    font-size: 0.9em;
    opacity: 0.7;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2em;
    }

    .download-button,
    .agree-download-button {
        font-size: 1.5em;
        padding: 15px 30px;
    }

    .section-header {
        font-size: 1.3em;
    }
}