body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-image: url("bg.jpg");
    background-size: cover;
}

/* 指板 */
.fretboard {
    display: flex;
    flex-direction: column;
    width: 1200px;
    flex-shrink: 0;

    position: relative;
    background: #8b6748;
}

/* 每一弦 */
.string {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    position: relative;
}

/* 琴弦 */
.string::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ddd;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

/* 品格 */
.fret {
    height: 55px;
    min-width: 0;
    background: transparent;
    border: none;
    border-right: 1px solid #aaa;
    cursor: pointer;
}

/* 上弦枕 */
.fret[data-fret="0"] {
    border-right: 6px solid #ddd;
}


.inlays {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #ddd;
    border-radius: 50%;
    left: calc((100% / 13) * (var(--fret) + 0.5));
    transform: translate(-50%, -50%);
}

.fret-3 {
    --fret: 3;
    top: 165px;
}

.fret-5 {
    --fret: 5;
    top: 165px;
}

.fret-7 {
    --fret: 7;
    top: 165px;
}

.fret-9 {
    --fret: 9;
    top: 165px;
}

#string-5 .fret[data-fret="12"]::after,
#string-2 .fret[data-fret="12"]::after {
    content: "";
    display: block;
    width: 15px;
    height: 15px;
    background: #ddd;
    border-radius: 50%;
    margin: auto;
}

.fret:hover {
    background: rgba(255, 255, 255, 0.15);
}

.game-info {
    width: 1200px;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 30px;
    color: white;
}

.score {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 14px;
    color: #ccc;
    letter-spacing: 2px;
}

.score-value {
    font-size: 32px;
    font-weight: bold;
}

.question {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    padding-bottom: 0px;

}

.note-name {
    font-size: 56px;
    font-weight: bold;
}

.string-number {
    font-size: 16px;
    color: #ccc;
}

#menu-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    cursor: pointer;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 280px;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    background: #222;
    color: white;
    z-index: 9;
    transition: right 0.3s ease;
}

.sidebar.active {
    right: 0;
}

/* 全選、全取消獨立一行 */
.select-all,
.select-none {
    display: inline-block;
}

/* 勾選項目從下一行開始 */
.setting-group label:first-of-type {
    display: block;
    margin-top: 10px;
}

.setting-group label {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}

.result {
    position: absolute;
    right: 0;
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* 答對 */
.result.correct {
    color: #4ade80;
}

/* 答錯 */
.result.wrong {
    color: #f87171;
}