/* 【基本コードトレーニング用 style.css 完成版】 */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: center;
    margin: 30px;
    background-color: transparent;
    color: #333;
}

h1 {
    color: #444;
}

#start-screen, #quiz-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    transition: background-color 0.2s, transform 0.1s;
}

#start-button, #play-question-button, #next-question-button {
    background-color: #007aff;
    color: white;
    margin-bottom: 20px;
}
#start-button:hover, #play-question-button:hover, #next-question-button:hover {
    background-color: #005ecb;
}
#start-button:active, #play-question-button:active, #next-question-button:active {
    transform: scale(0.98);
}

#choices-container {
    display: grid;
    /* ボタンが8個なので、4列x2行 もしくは 2列x4行が良いでしょう */
    grid-template-columns: 1fr 1fr 1fr 1fr; 
    gap: 10px;
}

#choices-container .chord-btn {
    padding: 10px 5px;
    color: #333;
    border: 1px solid #ddd;
}

#choices-container .chord-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#loading-message, #result-message {
    font-size: 16px;
    min-height: 24px;
    margin-top: 15px;
}

/* === ボタンの色分けとテキストスタイル === */
.chord-button-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.chord-symbol {
    font-size: 1.2em;
    font-weight: bold;
}
.chord-name {
    font-size: 0.7em;
    opacity: 0.8;
}

.chord-btn.major-type {
    background-color: #e6f2ff;
    border-color: #b3d7ff;
}
.chord-btn.major-type:hover {
    background-color: #d1e7ff;
}

.chord-btn.minor-type {
    background-color: #e3f9e3;
    border-color: #b8e6b8;
}
.chord-btn.minor-type:hover {
    background-color: #d1f2d1;
}

.chord-btn.dominant-type {
    background-color: #fff4e0;
    border-color: #ffe0b3;
}
.chord-btn.dominant-type:hover {
    background-color: #ffebcc;
}

/* === ログ機能のスタイル === */
.footer-actions {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

#reset-log-button {
    font-size: 12px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
}
#reset-log-button:hover {
    background-color: #e0e0e0;
}

#log-container {
    max-width: 500px;
    margin: 20px auto;
    text-align: left;
}
#log-container h2 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
}
#log-list {
    list-style-type: none;
    padding: 0;
    font-size: 14px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
}
#log-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
#log-list li:last-child {
    border-bottom: none;
}
#log-list .correct { color: green; }
#log-list .incorrect { color: red; }
#log-list .log-answer { font-weight: bold; }

.log-playable-chord {
    cursor: pointer;
    text-decoration: underline;
    font-weight: bold;
    color: #005ecb;
}
.log-playable-chord:hover {
    color: #007aff;
}