/* 基本設定と公演風デザイン */
body {
    font-family: 'Noto Sans JP', 'Arial', sans-serif;
    /* 背景: 暗い劇場にSKEオレンジのスポットライトが当たるイメージ */
    background: radial-gradient(ellipse at center, #4a2a00 0%, #1a1a1a 70%, #000 100%);
    background-attachment: fixed;
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-y: auto;
}

#game-container {
    width: 90%;
    max-width: 600px;
    background-color: rgba(0, 0, 0, 0.7); /* 少し透ける黒 */
    border: 1px solid #F39C12; /* SKE48オレンジ */
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.5); /* オレンジのグロー */
    padding: 25px;
    text-align: center;
    margin: 20px auto;
    overflow-y: visible;
}

@media (max-width: 600px) {
    #game-container {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
    }
}

h1 {
    font-size: 2em;
    color: #F39C12;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.7);
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.4em;
        margin-bottom: 8px;
    }
}

h2, h3 {
    color: #F39C12;
    font-weight: 700;
}

/* ステータスバー (3要素均等配置) */
#status-bar {
    display: flex;
    justify-content: space-between; /* 均等配置 */
    align-items: center;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}
#score-display { text-align: left; }
#progress-display { text-align: center; }
#timer-display { text-align: right; color: #e74c3c; }

@media (max-width: 600px) {
    #status-bar {
        font-size: 1em;
        padding: 8px 10px;
        margin-bottom: 15px;
    }
}

/* スタート画面（設定） */
#start-screen {
    padding: 10px 0 20px 0;
}
.select-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    #start-screen {
        padding: 5px 0 15px 0;
    }
    .select-group {
        gap: 6px;
        margin-bottom: 12px;
    }
    #start-screen h3 {
        font-size: 0.95em;
        margin: 8px 0 6px 0;
    }
    .setting-btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}
.setting-btn {
    background-color: #555;
    color: #fff;
    border: 2px solid #555;
    padding: 10px 15px;
    font-size: 1em;
    border-radius: 20px; /* 角丸で柔らかく */
    cursor: pointer;
    transition: all 0.2s ease;
}
.setting-btn:hover {
    background-color: #777;
    border-color: #999;
}
.setting-btn.active {
    /* 選択中のボタン */
    background-color: #F39C12;
    border-color: #F39C12;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

#start-button, #restart-button {
    font-size: 1.5em;
    font-weight: bold;
    padding: 15px 30px;
    background-color: #F39C12;
    color: #222;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 15px 0 20px 0;
    width: 100%;
    box-sizing: border-box; /* paddingを含めて幅100%に */
}
#start-button:hover, #restart-button:hover {
    background-color: #ffb84d;
    transform: scale(1.02);
}

@media (max-width: 600px) {
    #start-button, #restart-button {
        font-size: 1.15em;
        padding: 14px 20px;
        margin: 10px 0 15px 0;
    }
}

#end-game-button {
    font-size: 0.95em;
    font-weight: bold;
    padding: 10px 20px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
    width: 100%;
    max-width: 250px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    #end-game-button {
        font-size: 0.9em;
        padding: 8px 16px;
        margin-top: 10px;
        max-width: 200px;
    }
}
#end-game-button:hover {
    background-color: #c0392b;
    transform: scale(1.02);
}
#loading-text {
    margin-top: 15px;
    font-size: 1.1em;
    color: #ccc;
}

/* 問題エリア */
#game-area {
    position: relative;
    min-height: 300px; /* 画像の高さに合わせて調整 */
    overflow-y: visible;
}

/* メンバー画像コンテナ */
#member-image-container {
    width: 240px; /* 画像サイズ調整 */
    height: 300px;
    margin: 0; /* マージンを削除 */
    border-radius: 10px; /* 角丸の四角形 */
    overflow: hidden; /* はみ出した部分を隠す */
    border: 3px solid #F39C12; /* オレンジのボーダー */
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.7); /* オレンジのグロー */
    position: relative; /* 名前オーバーレイ用 */
    flex-shrink: 0;
}

@media (max-width: 600px) {
    #member-image-container {
        width: 180px;
        height: 220px;
    }
}
#member-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像全体を表示（右下のロゴが見えるように） */
    object-position: center; /* 中央配置 */
    display: block; /* imgタグの下の余白を消す */
    transition: transform 0.3s ease-in-out; /* ロード時のアニメーション */
    background-color: #000; /* 背景を黒に */
}
#member-image.loading {
    transform: scale(0.95);
    opacity: 0.7;
}
#member-image.loaded {
    transform: scale(1.0);
    opacity: 1.0;
}

#member-name-overlay {
    color: #F39C12;
    font-size: 1.2em;
    margin: 10px 0 0 0;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

@media (max-width: 600px) {
    #member-name-overlay {
        font-size: 1em;
        min-height: 28px;
        margin: 8px 0 0 0;
    }
}


/* 選択肢（サイリウム） */
#options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

@media (max-width: 600px) {
    #options-container {
        gap: 8px;
        margin-top: 8px;
    }
}

.option-button {
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid #555;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}
.option-button:hover {
    border-color: #F39C12;
    background-color: rgba(243, 156, 18, 0.2);
    transform: translateY(-3px);
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.option-cyalumes {
    display: flex;
    flex-direction: row;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.option-color-names {
    font-size: 0.75em;
    color: #ccc;
    text-align: center;
    line-height: 1.2;
    word-break: keep-all;
}

@media (max-width: 600px) {
    .option-button {
        min-height: 75px;
        padding: 6px;
    }
    .option-color-names {
        font-size: 0.65em;
    }
    .cyalume-color {
        width: 20px;
        height: 42px;
    }
}

/* サイリウムカラー表示 (3色対応) */
.cyalume-color {
    width: 24px;
    height: 50px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    margin: 0 3px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* ゲームコンテンツ（画像とフィードバック） */
#game-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

#member-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* フィードバック */
#feedback {
    font-size: 3em;
    font-weight: bold;
    width: 180px;
    min-height: 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    word-break: keep-all;
    padding: 10px;
}
#feedback.correct {
    color: #2ecc71;
    text-shadow: 0 0 15px #2ecc71, 0 0 30px rgba(46, 204, 113, 0.5);
    animation: feedbackPulse 0.3s ease-out;
}
#feedback.incorrect {
    color: #e74c3c;
    text-shadow: 0 0 15px #e74c3c, 0 0 30px rgba(231, 76, 60, 0.5);
    animation: feedbackPulse 0.3s ease-out;
}

@keyframes feedbackPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* スマホ対応 */
@media (max-width: 600px) {
    #game-content {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    #feedback {
        font-size: 2em;
        width: 100%;
        max-width: 250px;
        min-height: 70px;
        padding: 5px;
    }
}

/* 結果モーダル */
#result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
#result-content {
    background-color: #222;
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #F39C12;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px; /* 少し幅を広げる */
}
#result-content h2 {
    font-size: 2.5em;
    margin-top: 0;
}
#final-score {
    font-size: 1.8em;
    font-weight: bold;
    margin: 15px 0;
    color: #F39C12;
}
#accuracy {
    font-size: 1.2em;
    color: #ccc;
    margin-bottom: 25px;
}

/* 結果詳細リスト */
#result-details {
    margin-bottom: 25px;
    text-align: left;
}
.result-list-container {
    width: 100%;
}
.result-list-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #F39C12;
    padding-bottom: 5px;
    text-align: center;
}
#correct-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9em;
    background-color: rgba(0,0,0,0.3);
    border-radius: 5px;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 15px;
}
#correct-list li {
    padding: 3px 5px;
    border-bottom: 1px solid #444;
}
#correct-list li:last-child {
    border-bottom: none;
}
/* スクロールバーのデザイン（任意） */
#correct-list::-webkit-scrollbar {
    width: 6px;
}
#correct-list::-webkit-scrollbar-thumb {
    background: #F39C12;
    border-radius: 3px;
}

@media (max-width: 600px) {
    #correct-list {
        grid-template-columns: 1fr;
        max-height: 150px;
    }
}


/* 汎用クラス */
.hidden {
    display: none !important;
}

/* 音のオンオフボタン */
#sound-toggle {
    transition: all 0.3s ease;
}
#sound-toggle:hover {
    background-color: rgba(243, 156, 18, 0.2);
    transform: scale(1.1);
}
#sound-toggle:active {
    transform: scale(0.95);
}
/* コ
ンボ表示 */
#combo-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    pointer-events: none;
}
#combo-text {
    font-size: 4em;
    font-weight: bold;
    color: #F39C12;
    text-shadow: 0 0 20px rgba(243, 156, 18, 1);
    animation: comboPopup 0.5s ease-out;
}
@keyframes comboPopup {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* キラキラエフェクト */
#sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40;
}
.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD700;
    border-radius: 50%;
    animation: sparkleFloat 1s ease-out forwards;
    box-shadow: 0 0 10px #FFD700;
}
@keyframes sparkleFloat {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) scale(0); opacity: 0; }
}



/* ヒントボタン */
#hint-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}
.hint-btn {
    background-color: rgba(243, 156, 18, 0.3);
    border: 2px solid #F39C12;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}
.hint-btn:hover:not(:disabled) {
    background-color: rgba(243, 156, 18, 0.5);
    transform: scale(1.05);
}
.hint-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#hint-display {
    text-align: center;
    font-size: 1.2em;
    color: #F39C12;
    min-height: 25px;
    margin-bottom: 5px;
    font-weight: bold;
}

/* 最高得点表示 */
#best-score-display {
    font-size: 1.3em;
    color: #FFD700;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@media (max-width: 600px) {
    #best-score-display {
        font-size: 1em;
        margin-bottom: 10px;
    }
}

/* NEW RECORD表示 */
#new-record {
    font-size: 1.5em;
    color: #FFD700;
    font-weight: bold;
    margin: 15px 0;
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 復習ボタン */
#retry-incorrect-button {
    font-size: 1.2em;
    font-weight: bold;
    padding: 12px 25px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    width: 100%;
}
#retry-incorrect-button:hover {
    background-color: #c0392b;
    transform: scale(1.02);
}

/* 学習モーダル */
#study-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
#study-content {
    background-color: #222;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #F39C12;
    width: 90%;
    max-width: 500px;
}
#study-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
#study-counter {
    font-size: 1.2em;
    color: #F39C12;
    font-weight: bold;
}

#study-bottom-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}
#study-bottom-controls button {
    background-color: #F39C12;
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    flex: 1;
    max-width: 200px;
}
#study-bottom-controls button:hover {
    background-color: #ffb84d;
    transform: scale(1.02);
}
#study-member-display {
    margin: 20px 0;
}
#study-image {
    width: 220px;
    height: 280px;
    border-radius: 10px;
    object-fit: cover;
    object-position: center top;
    background-color: #000;
    border: 3px solid #F39C12;
    margin-bottom: 15px;
}
#study-name {
    font-size: 1.8em;
    color: #F39C12;
    margin: 10px 0;
}
#study-team {
    font-size: 1.2em;
    color: #ccc;
    margin: 5px 0;
}
#study-colors {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}
#study-colors .cyalume-color {
    width: 40px;
    height: 80px;
}
#study-close {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 10px;
}
#study-close:hover {
    background-color: #777;
}

/* モード選択 */
#mode-select {
    margin-bottom: 25px;
}

/* Xシェアボタン */
#share-x-button {
    font-size: 1.2em;
    font-weight: bold;
    padding: 12px 25px;
    background-color: #000000;
    color: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    width: 100%;
}
#share-x-button:hover {
    background-color: #1a1a1a;
    transform: scale(1.02);
}

/* 学習モード拡張 */
#study-mode-select {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}
.study-mode-btn {
    background-color: #555;
    color: #fff;
    border: 2px solid #555;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
}
.study-mode-btn:hover {
    background-color: #777;
}
.study-mode-btn.active {
    background-color: #F39C12;
    border-color: #F39C12;
    color: #000;
    font-weight: bold;
}

#study-shuffle {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}
#study-shuffle:hover {
    background-color: #777;
}

.study-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.study-visible {
    opacity: 1;
    transition: opacity 0.3s;
}

#study-reveal {
    background-color: #F39C12;
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    margin: 15px 0;
}
#study-reveal:hover {
    background-color: #ffb84d;
}

#study-flash-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
}
.flash-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.2s;
}
.know-btn {
    background-color: #2ecc71;
    color: #fff;
}
.know-btn:hover {
    background-color: #27ae60;
    transform: scale(1.05);
}
.unknown-btn {
    background-color: #e74c3c;
    color: #fff;
}
.unknown-btn:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

#study-stats {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    font-size: 1.1em;
    color: #F39C12;
}


/* チートシートモーダル */
#cheatsheet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
#cheatsheet-content {
    background-color: #222;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #F39C12;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}
#cheatsheet-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #F39C12;
    text-align: center;
    font-size: 1.5em;
}

@media (max-width: 600px) {
    #cheatsheet-content {
        padding: 12px;
        height: 95vh;
    }
    #cheatsheet-content h2 {
        font-size: 1.1em;
        margin-bottom: 6px;
    }
}

#cheatsheet-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.cheatsheet-filter-btn {
    background-color: #555;
    color: #fff;
    border: 2px solid #555;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
}
.cheatsheet-filter-btn:hover {
    background-color: #777;
}
.cheatsheet-filter-btn.active {
    background-color: #F39C12;
    border-color: #F39C12;
    color: #000;
    font-weight: bold;
}

@media (max-width: 600px) {
    #cheatsheet-filter {
        gap: 5px;
        margin-bottom: 8px;
    }
    .cheatsheet-filter-btn {
        padding: 5px 10px;
        font-size: 0.75em;
    }
}

#cheatsheet-search {
    margin-bottom: 20px;
    text-align: center;
}
#cheatsheet-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 2px solid #555;
    border-radius: 20px;
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1em;
    outline: none;
}
#cheatsheet-search-input:focus {
    border-color: #F39C12;
}

@media (max-width: 600px) {
    #cheatsheet-search {
        margin-bottom: 10px;
    }
    #cheatsheet-search-input {
        padding: 6px 10px;
        font-size: 0.85em;
        max-width: 100%;
    }
}

#cheatsheet-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cheatsheet-team-section {
    margin-bottom: 30px;
}
.cheatsheet-team-header {
    color: #F39C12;
    font-size: 1.5em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F39C12;
}

.cheatsheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 150px));
    justify-content: center;
    gap: 6px;
}

.cheatsheet-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s;
    max-width: 180px;
    margin: 0 auto;
}
.cheatsheet-card:hover {
    border-color: #F39C12;
    background-color: rgba(243, 156, 18, 0.1);
    transform: translateY(-2px);
}

.cheatsheet-image {
    width: 100%;
    height: 160px;
    object-fit: contain;
    object-position: center;
    border-radius: 5px;
    margin-bottom: 8px;
    background-color: #000;
}

.cheatsheet-name {
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cheatsheet-colors-container {
    width: 100%;
}

.cheatsheet-colors {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 5px;
}

.cheatsheet-color {
    width: 22px;
    height: 45px;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

#cheatsheet-close {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0 auto;
}
#cheatsheet-close:hover {
    background-color: #777;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .cheatsheet-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 130px));
        gap: 4px;
    }
    .cheatsheet-card {
        padding: 8px;
        max-width: 140px;
    }
    .cheatsheet-image {
        height: 130px;
    }
    .cheatsheet-name {
        font-size: 0.8em;
        min-height: 30px;
    }
    .cheatsheet-color {
        width: 18px;
        height: 35px;
    }
    .cheatsheet-color-names {
        font-size: 0.75em;
    }
}

/* 色の名前表示 */
.cheatsheet-color-names {
    width: 100%;
    margin-top: 8px;
    font-size: 0.85em;
    color: #ccc;
    text-align: center;
}

/* チートシート選択モード */
#cheatsheet-mode-select {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}
.cheatsheet-mode-btn {
    background-color: #555;
    color: #fff;
    border: 2px solid #555;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
}
.cheatsheet-mode-btn:hover {
    background-color: #777;
}
.cheatsheet-mode-btn.active {
    background-color: #F39C12;
    border-color: #F39C12;
    color: #000;
    font-weight: bold;
}

@media (max-width: 600px) {
    #cheatsheet-mode-select {
        gap: 6px;
        margin-bottom: 8px;
    }
    .cheatsheet-mode-btn {
        padding: 5px 12px;
        font-size: 0.75em;
    }
}

#cheatsheet-select-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}
#cheatsheet-select-actions button {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid #555;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
    font-weight: 500;
}
#cheatsheet-select-actions button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #F39C12;
    transform: translateY(-1px);
}
#cheatsheet-filter-selected {
    background-color: rgba(243, 156, 18, 0.2) !important;
    border-color: #F39C12 !important;
    color: #F39C12 !important;
    font-weight: bold;
}
#cheatsheet-filter-selected:hover {
    background-color: rgba(243, 156, 18, 0.3) !important;
}

#cheatsheet-columns-select {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

#cheatsheet-columns-select label {
    color: #F39C12;
    font-weight: bold;
    font-size: 0.95em;
}

#cheatsheet-columns-input {
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    outline: none;
}

#cheatsheet-columns-input option {
    background-color: #333;
    color: #fff;
    padding: 8px;
}

#cheatsheet-columns-input:hover {
    border-color: #F39C12;
}

#cheatsheet-columns-input:focus {
    border-color: #F39C12;
    background-color: #444;
}

#cheatsheet-save-image {
    background-color: #27ae60;
    color: #fff;
    border: 2px solid #27ae60;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    transition: all 0.2s;
    margin-left: 10px;
}

#cheatsheet-save-image:hover:not(:disabled) {
    background-color: #2ecc71;
    transform: translateY(-1px);
}

#cheatsheet-save-image:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cheatsheet-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
    accent-color: #F39C12;
}
.cheatsheet-card {
    position: relative;
}
.cheatsheet-card.selected {
    border-color: #F39C12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

/* レイアウト選択 */
#cheatsheet-layout-select {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
#cheatsheet-layout-select span {
    color: #F39C12;
    font-weight: bold;
}
.cheatsheet-layout-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid #555;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}
.cheatsheet-layout-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #F39C12;
}
.cheatsheet-layout-btn.active {
    background-color: #F39C12;
    border-color: #F39C12;
    color: #000;
    font-weight: bold;
}
