/* note-trainer-pro.css v21.2 - keeps layout and visible #note-display border for debug */

/* Main Container to hold everything */
#note-display {
    width: 700px;
    height: 180px;
    position: relative;
    border: 1px solid red; /* dev aid - remove when happy */
    margin: 12px auto;
    background: #fff;
}

/* Container styling */
#note-trainer-container {
    max-width: 900px;
    margin: 12px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #ffffff;
}

/* Tabs */
.nt-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid #ddd;
    background: #f2f2f2;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    gap: 6px;
    padding: 6px;
}
.nt-tab-button {
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 700;
    color: #333;
    border-radius: 6px 6px 0 0;
}
.nt-tab-button.active {
    background: #fff;
    color: #1a73e8;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    border-top: 3px solid #1a73e8;
    margin-bottom: -2px;
}
.nt-tab-content {
    padding: 18px;
    display: none;
    text-align: center;
}
.nt-tab-content.active { display: block; }

/* Trainer panels */
#note-trainer, #interval-trainer-content { padding: 0; background: transparent; }
#note-trainer-content { background: #fff9f7; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
#interval-trainer-content { background: #f7fff7; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }

/* Mode control */
#mode-control { display: inline-block; margin-right: 8px; }

/* Piano */
#piano {
    margin: 12px auto;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    width: min-content;
}
#piano button { cursor: pointer; box-sizing: border-box; display: inline-block; text-align: center; }
#piano .white-key {
    background: white;
    border: 1px solid #222;
    width: 42px;
    height: 200px;
    line-height: 1;
    margin-right: -1px;
    position: relative;
    z-index: 10;
    font-weight: bold;
    padding: 0;
}
#piano .black-key {
    background: black;
    color: white;
    border: 1px solid #333;
    font-size: 0.8em;
    line-height: 1.2;
    width: 24px;
    height: 120px;
    position: absolute;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 5px;
}
.key-label { font-size: 0.9em; font-weight: 700; }
.white-key .key-label {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: black;
}
.black-key-label { white-space: nowrap; text-shadow: 0 0 3px black; }

#piano button:active, #piano button.active {
    transform: none;
    background: #ffeb3b;
    border-color: #ffeb3b;
    box-shadow: 0 0 5px rgba(255,235,59,0.8);
}
#piano .black-key:active, #piano .black-key.active {
    background: #cc9900;
}

/* Controls group */
#controls-group { display:flex; flex-wrap:wrap; justify-content:center; padding: 6px 0 12px; gap: 10px; }
#controls-group select, #controls-group label { margin: 0; font-weight: 700; }

/* Answer input */
#answer-input-group { margin-top: 12px; margin-bottom: 10px; }
#answer-input-group input, #answer-input-group select {
    padding: 6px 8px;
    font-weight: 700;
    font-size: 1em;
    text-align: center;
    border-radius: 6px;
    border: 1px solid #ccc;
}
#answer-input-group select { min-width: 140px; }

/* Buttons */
button {
    padding: 8px 12px;
    margin: 4px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    background-color: #1a73e8;
    color: white;
    transition: background-color 0.15s;
}
button:hover { background-color: #0d47a1; }
#play-sequence-button { background-color: #4CAF50; }
#check-btn { background-color: #FF9800; }

/* Feedback & scoreboard */
#feedback, #result-display { padding: 6px; min-height: 1.5em; }
.nt-scoreboard { margin-top: 10px; padding: 6px; background: #fafafa; border-radius: 6px; display: inline-block; }

/* Octave controls */
#octave-controls { margin: 10px auto 6px; display:flex; justify-content:center; align-items:center; }
#octave-controls button { background-color: #757575; padding: 6px 10px; }
#octave-controls button:hover { background-color: #424242; }
#current-octave { margin: 0 10px; font-size: 1.05em; min-width: 40px; display:inline-block; }

/* Interval trainer area */
#it-canvas { min-height: 180px; margin-top: 10px; }
#it-feedback { color: #004d40; }
