:root {
    /* ダークモード用のカラー変数 */
    --primary: #6366f1;        /* 少し明るめのインディゴ */
    --primary-hover: #818cf8;
    --bg: #0f172a;             /* 深い背景色 */
    --card-bg: #1e293b;        /* カード背景 */
    --text-main: #f1f5f9;      /* メインテキスト（白に近いグレー） */
    --text-muted: #94a3b8;     /* 補助テキスト */
    --border: #334155;         /* ボーダー色 */
    --input-bg: #0f172a;       /* 入力エリアの背景 */
}

body {
font-family: "Inter", system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
    min-height: 100vh;
}


.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* --- 右下に固定する画像の設定 --- */
.fixed-background-image {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 400px;           /* 画像の表示サイズ（お好みで調整してください） */
    height: 400px;          /* 画像の表示サイズ */
    background-image: url("img/bg-bottom-right.png");
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    opacity: 0.4;           /* 透過度：0.0（透明）〜1.0（くっきり） */
    z-index: -1;            /* コンテンツの背面に配置 */
    pointer-events: none;   /* 画像がクリックを邪魔しないようにする */
}

/* --- app-containerが背景より前に来るように保証する --- */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}



header {
    margin-bottom: 50px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 30px;
    /* センター配置 */
    text-align: center;
}

/* タイトルの発光設定を追加 */
header h1 {
    font-size: 3rem; /* サイズを大きく */
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    /* ネオン風の発光エフェクト */
    text-shadow: 
        0 0 7px rgba(99, 102, 241, 0.3),
        0 0 10px rgba(99, 102, 241, 0.5),
        0 0 21px rgba(99, 102, 241, 0.8);
    letter-spacing: 0.05em;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.step-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.step-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.field-group {
    margin-bottom: 24px;
}

.field-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
    color: var(--text-main);
}

.genre-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

/* チップスタイルのチェックボックス */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    cursor: pointer;
    background: #334155; /* 暗めのチップ背景 */
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s;
    user-select: none;
    color: var(--text-main);
}

.chip:hover {
    background: #475569;
}

.chip input {
    display: none;
}

.chip:has(input:checked) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* スライダー */
.slider-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

input[type="range"] {
    flex: 1;
    accent-color: var(--primary); /* スライダーの色をプライマリに */
}

.slider-val {
    min-width: 50px;
    font-family: monospace;
    font-weight: bold;
    color: var(--primary);
}

/* テキスト入力 */
input[type="text"] {
    width: 100%;
    padding: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-sizing: border-box;
    color: var(--text-main);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* プレビューサイドバー */
.preview-sidebar {
    position: sticky;
    top: 20px;
}

.sticky-card {
    background: #1e293b; /* メインより少し明るめ、または同等の暗さ */
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
}

.prompt-display {
    background: rgba(15, 23, 42, 0.6); /* さらに暗い背景 */
    border-radius: 8px;
    padding: 15px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.9rem;
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin: 15px 0;
    border: 1px solid var(--border);
    color: #e2e8f0;
}

.primary-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.safety-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 15px;
    text-align: center;
}
/* --- バナーエリアのスタイル --- */
.banner-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* コンテナからはみ出さないための設定 */
    width: 100%;

    box-sizing: border-box;
}

.banner-item {
    width: 100%;
    border-radius: 8px;
    overflow: hidden; 
    border: 1px solid var(--border);
    background: var(--input-bg);
    transition: all 0.2s ease;
    height: 75px; /* 固定高 */

    /* --- ここを追加：中段に置くための設定 --- */
    display: flex;           /* フレックスボックスにする */
    align-items: center;     /* 上下方向の真ん中に置く */
    justify-content: center; /* 左右方向の真ん中に置く */
    text-decoration: none;   /* リンクの下線を消す */
}

.banner-item img {
    width: 100%;
    height: auto;           /* 高さは自動にして比率を保つ */
    /* もし画像が枠より高い場合に上下をカットして中央を見せたいなら以下 */
    object-fit: cover;      
    display: block;
}

/* ホバー時に枠線を光らせ、少し浮かす */
.banner-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.banner-item img {
    /* これが重要：親要素の幅（サイドバーの幅）に画像を強制的に合わせます */
    width: 100%;
    height: auto;
    /* 指定の 1:5 比率を維持 */
    aspect-ratio: 5 / 1;
    object-fit: cover;
    display: block;
}