/* ========== 1. 全体のレイアウトとフォント ========== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 20px;
    background-color: #ffffff;
    color: #333333;
}

#app {
    max-width: 1000px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #222;
    margin-bottom: 30px;
    font-size: 28px;
}

/* ========== 2. コントロール部分 ========== */
#section-switcher, #chord-selector {
    margin-bottom: 20px;
}

.tab-nav {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.section-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
    margin-bottom: -1px;
    font-weight: normal;
}

.section-btn:hover {
    color: #000;
}

.section-btn.active {
    color: #ffffff;
    background-color: #007bff;
    border-bottom-color: #007bff;
    font-weight: bold;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

button {
    padding: 8px 14px;
    font-size: 14px;
    font-family: inherit;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
}

/* Chord specific buttons use the root color when active */
#chord-buttons button.active {
    background-color: #e53935;
    border-color: #e53935;
}

/* ========== 3. 指板のデザイン ========== */
#fretboard-area {
    margin: 40px auto;
}

#fretboard-container {
    width: 100%;
}

#fretboard-svg {
    width: 100%;
    background-color: #ffffff;
    display: block;
}

/* ========== 4. ボトムコントロール ========== */
#bottom-controls {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-row {
    display: flex;
    justify-content: center;
}

/* Original SVG drawing styles */
.fret-line {
    stroke: #ccc;
    stroke-width: 1;
}

.nut-line {
    stroke: #666;
    stroke-width: 4;
}

.string-line {
    stroke: #555;
    stroke-width: 1;
}

.fret-number {
    fill: #666;
    font-size: 12px;
    text-anchor: middle;
}

/* Note Circle & Text (managed by JS, but base styles here) */
.note-circle {
    cursor: pointer;
}

.note-text {
    pointer-events: none;
    font-family: sans-serif;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: central;
}

/* ========== 5. レスポンシブ対応 ========== */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 22px;
    }

    .section-btn {
        padding: 8px 10px;
        font-size: 13px;
    }
}
