/**
 * GuitarPro Studio Player - CSS Stylesheet v8 (Songsterr Ultra Engine)
 * Giao diện phòng thu chuyên nghiệp (DAW Studio Dark Mode & Songsterr Playback)
 */

:root {
    --gp-bg-main: var(--color-bg, #0b0d13);
    --gp-bg-surface: var(--color-surface, #181c28);
    --gp-bg-toolbar: var(--color-surface, #181c28);
    --gp-border: var(--color-border, #242a3c);
    --gp-border-active: var(--color-primary, #ff6f00);
    --gp-primary: var(--color-primary, #ff6f00);
    --gp-primary-hover: var(--color-primary-hover, #ff8f00);
    --gp-primary-text: #ffffff;
    --gp-text-main: var(--color-text, #f1f5f9);
    --gp-text-muted: var(--color-text-muted, #94a3b8);
    --gp-success: var(--color-success, #10b981);
    --gp-danger: var(--color-danger, #ef4444);
    --gp-active-btn: #38bdf8;
    --gp-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="stage"] .gp-studio-player-wrapper {
    background: #000000 !important;
    border-color: #222222 !important;
}

[data-theme="stage"] .gp-player-toolbar {
    background: #0a0a0a !important;
    border-color: #222222 !important;
}

[data-theme="stage"] .gp-btn {
    background: #141414 !important;
    border-color: #262626 !important;
    color: #ffffff !important;
}

[data-theme="stage"] .gp-viewport {
    background: #000000 !important;
}

/* Wrapper chính */
.gp-studio-player-wrapper {
    position: relative;
    background: var(--gp-bg-main);
    border: 1px solid var(--gp-border);
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    font-family: var(--gp-font-sans);
    color: var(--gp-text-main);
}

/* Thanh điều khiển Toolbar - 2 Rows Compact Obsidian Dark */
.gp-player-toolbar {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding: 6px 12px !important;
    background: var(--gp-bg-toolbar, #11141c) !important;
    border-bottom: 1px solid var(--gp-border, rgba(255, 255, 255, 0.08)) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
    box-sizing: border-box !important;
}

.gp-toolbar-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    box-sizing: border-box !important;
}

.gp-toolbar-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}

.gp-toolbar-left,
.gp-toolbar-center,
.gp-toolbar-right {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}

/* Các loại nút bấm */
.gp-player-toolbar .gp-btn,
.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #f1f5f9;
    background: #152243;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    user-select: none;
    box-sizing: border-box;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.gp-btn * {
    pointer-events: none;
}

.gp-player-toolbar .gp-btn svg,
.gp-btn svg {
    color: #e2e8f0;
    flex-shrink: 0;
}

.gp-player-toolbar .gp-btn svg[fill="currentColor"],
.gp-btn svg[fill="currentColor"] {
    fill: currentColor;
}

.gp-player-toolbar .gp-btn svg[stroke="currentColor"],
.gp-btn svg[stroke="currentColor"] {
    stroke: currentColor;
}

.gp-player-toolbar .gp-btn:hover,
.gp-btn:hover {
    background: #1e3160;
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.gp-player-toolbar .gp-btn:hover svg,
.gp-btn:hover svg {
    color: #ffffff;
}

.gp-player-toolbar .gp-btn-icon,
.gp-btn-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
}

/* Animation cho Spinner khi đang tải */
@keyframes gp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.gp-spinner {
    animation: gp-spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

/* NÚT PHÁT NHẠC CHÍNH (PLAY / PAUSE BUTTON) */
.gp-play-pause-btn {
    min-width: 96px;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gp-play-pause-btn.is-loading {
    background: #252d40;
    color: #94a3b8;
    cursor: wait;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gp-play-pause-btn.is-queued {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.45);
}

.gp-play-pause-btn.is-ready {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.gp-play-pause-btn.is-ready:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.55);
    transform: translateY(-1px);
}

.gp-play-pause-btn.is-playing {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.45);
}

.gp-play-pause-btn.is-playing:hover {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.55);
    transform: translateY(-1px);
}

/* Nút Stop */
.gp-player-toolbar #gpStopBtn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}
.gp-player-toolbar #gpStopBtn:hover svg {
    color: #ef4444 !important;
    fill: #ef4444 !important;
}

/* Nút Trạng thái Active (Toggle - Metronome, Loop, Fretboard) */
#gpStudioPlayerWrapper .gp-player-toolbar .gp-toggle-btn.active,
#gpStudioPlayerWrapper .gp-toggle-btn.active,
.gp-player-toolbar .gp-toggle-btn.active,
.gp-toggle-btn.active {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.55) !important;
}

#gpStudioPlayerWrapper .gp-player-toolbar .gp-toggle-btn.active svg,
#gpStudioPlayerWrapper .gp-toggle-btn.active svg,
.gp-player-toolbar .gp-toggle-btn.active svg,
.gp-toggle-btn.active svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

/* Bộ điều khiển tốc độ Speed Chips */
.gp-speed-control {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.gp-speed-label {
    font-size: 12px !important;
    color: var(--gp-text-muted, #94a3b8) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    user-select: none;
}

.gp-speed-chips {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--gp-bg-surface, #181c28) !important;
    border: 1px solid var(--gp-border, #242a3c) !important;
    border-radius: 8px !important;
    padding: 2px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    height: 32px !important;
    box-sizing: border-box !important;
}

.gp-chip {
    background: transparent !important;
    border: none !important;
    color: var(--gp-text-muted, #94a3b8) !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    padding: 0 6px !important;
    height: 26px !important;
    line-height: 26px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.gp-chip:hover {
    color: #ffffff !important;
}

.gp-chip.active {
    background: #fa243c !important;
    color: #ffffff !important;
}

/* Transpose Control (Đổi Tone Bán Cung Audio - Unbreakable Horizontal Pill) */
.gp-transpose-control {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    padding: 2px 4px !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    height: 32px !important;
    box-sizing: border-box !important;
}

.gp-transpose-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: #cbd5e1 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    cursor: pointer !important;
    height: 26px !important;
    padding: 0 6px !important;
    font-size: 10.5px !important;
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 30px !important;
    box-sizing: border-box !important;
}

.gp-transpose-btn:hover {
    background: rgba(255, 111, 0, 0.25) !important;
    color: #ff6f00 !important;
}

.gp-transpose-val {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #94a3b8 !important;
    min-width: 24px !important;
    height: 30px !important;
    text-align: center !important;
    cursor: pointer !important;
    user-select: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.gp-transpose-val.is-shifted {
    color: #ff6f00 !important;
}

/* Tempo BPM Text */
.gp-tempo-control {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.gp-tempo-bpm {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
    padding: 0 10px !important;
    height: 32px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Zoom Dropdown */
.gp-select-zoom {
    height: 32px;
    background: var(--gp-bg-surface);
    color: var(--gp-text-main);
    border: 1px solid var(--gp-border);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
}

/* Multi-version Selector Dropdown */
.gp-version-selector-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0 8px 0 9px;
    height: 32px;
    gap: 6px;
    max-width: 145px;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gp-version-selector-container:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: #162035;
}

.gp-version-selector-container:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.gp-version-icon-wrap {
    display: flex;
    align-items: center;
    color: #38bdf8;
    flex-shrink: 0;
}

.gp-select-version {
    height: 100%;
    background: transparent;
    color: #f1f5f9;
    border: none !important;
    padding: 0 18px 0 2px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    outline: none !important;
    max-width: 110px;
    appearance: none;
    -webkit-appearance: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gp-version-selector-container::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

.gp-select-version option {
    background: #181c28;
    color: #f1f5f9;
    padding: 8px 12px;
}

/* Score Mode Popover (TAB only / Nốt only / Cả hai) */
.gp-score-mode-wrapper {
    position: relative;
    display: inline-block;
    flex-shrink: 0 !important;
}

.gp-score-mode-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 32px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.gp-score-mode-badge {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.3px;
    white-space: nowrap !important;
}

/* Nút chuyển chế độ Cuộn Dọc / Cuộn Ngang Songsterr */
.gp-layout-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 32px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.gp-layout-badge {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
}

.gp-layout-btn.active {
    background: rgba(255, 111, 0, 0.2) !important;
    border-color: #ff6f00 !important;
    color: #ff6f00 !important;
    box-shadow: 0 0 10px rgba(255, 111, 0, 0.3) !important;
}

.gp-layout-btn.active .gp-layout-badge {
    color: #ff8f00;
}

.gp-score-mode-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1000;
    background: #181c28;
    border: 1px solid #2e384d;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
}

.gp-score-mode-opt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #f1f5f9;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.gp-score-mode-opt:hover {
    background: #242c3e;
    border-color: #333e56;
}

.gp-score-mode-opt.is-active {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
}

.gp-score-mode-opt strong {
    font-size: 12px;
    color: #ffffff;
}

.gp-score-mode-opt small {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Interactive Playback Timeline Scrubber */
.gp-playback-timeline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 18px;
    background: rgba(11, 13, 19, 0.95);
    border-bottom: 1px solid var(--gp-border);
}

.gp-time-current,
.gp-time-total {
    font-size: 11px;
    font-family: monospace;
    font-weight: 600;
    color: var(--gp-text-muted);
    min-width: 38px;
}

.gp-time-current {
    color: #38bdf8;
}

.gp-bar-counter {
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    min-width: 60px;
    text-align: center;
}

.gp-timeline-track {
    position: relative;
    flex: 1;
    height: 8px;
    background: #202738;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.gp-timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    will-change: transform;
    background: linear-gradient(90deg, #ff6f00, #ff8f00);
    border-radius: 4px;
    transition: none;
}

.gp-timeline-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 111, 0, 0.8);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.gp-timeline-track:hover .gp-timeline-handle {
    opacity: 1;
}

/* SoundFont Loading Status Bar */
.gp-player-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 18px;
    background: #111520;
    border-bottom: 1px solid var(--gp-border);
    transition: opacity 0.5s ease;
}

.gp-player-status-bar.gp-status-fade {
    opacity: 0;
    height: 0;
    padding: 0 18px;
    overflow: hidden;
    border-bottom: none;
}

.gp-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}

.gp-status-indicator.ready {
    background: #10b981;
}

.gp-status-text {
    font-size: 11px;
    color: var(--gp-text-muted);
}

.gp-player-progress-track {
    flex: 1;
    height: 4px;
    background: #1f2738;
    border-radius: 2px;
    overflow: hidden;
}

.gp-player-progress-fill {
    height: 100%;
    background: var(--gp-primary);
    transition: width 0.2s ease;
}

/* BẢNG ĐIỀU KHIỂN TRACKS & MIXER (Solo / Mute / Volume Slider) */
.gp-tracks-drawer {
    background: #111520;
    border-bottom: 1px solid var(--gp-border);
    padding: 14px 18px;
}

.gp-tracks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.gp-tracks-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
}

.gp-tracks-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-btn-mixer-action {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gp-btn-mixer-action:hover {
    background: rgba(245, 158, 11, 0.3);
    color: #ffffff;
}

.gp-btn-mixer-action.active {
    background: #f59e0b;
    color: #000000;
    border-color: #f59e0b;
}

.gp-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.gp-close-btn:hover {
    color: #ffffff;
}

.gp-tracks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.gp-track-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #181d2a;
    border: 1px solid #242c3e;
    border-radius: 8px;
    transition: all 0.15s ease;
    gap: 8px;
}

.gp-track-row:hover {
    background: #1f2738;
    border-color: #333e56;
}

.gp-track-row.is-active {
    border-color: #ff6f00;
    background: rgba(255, 111, 0, 0.1);
}

.gp-track-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    cursor: pointer;
    flex: 1;
}

.gp-track-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.gp-track-name {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    color: #e2e8f0;
}

.gp-track-row.is-active .gp-track-name {
    color: #ff8f00;
    font-weight: 700;
}

.gp-track-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gp-track-vol-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gp-track-vol-slider {
    width: 52px;
    height: 4px;
    accent-color: #ff6f00;
    background: #252d40;
    border-radius: 2px;
    cursor: pointer;
    vertical-align: middle;
}

.gp-vol-val {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    min-width: 28px;
    text-align: right;
    font-family: monospace;
}

.gp-btn-mixer {
    width: 24px;
    height: 24px;
    border: 1px solid var(--gp-border);
    background: #2a3042;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gp-solo-btn.active {
    background: #eab308;
    border-color: #ca8a04;
    color: #000000;
}

.gp-mute-btn.active {
    background: var(--gp-danger);
    border-color: var(--gp-danger);
    color: #ffffff;
}

/* ==========================================================================
   VIRTUAL FRETBOARD 24-FRET (CẦN ĐÀN ẢO TƯƠNG TÁC THỜI GIAN THỰC RULE OF 18)
   ========================================================================== */
.gp-fretboard-container {
    background: #090a0d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    overflow-x: auto;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.gp-fretboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gp-fretboard-title {
    color: #cbd5e1;
}

.gp-fretboard-tuning {
    color: #f59e0b;
    font-family: monospace;
    font-size: 12px;
}

.gp-fretboard {
    min-height: 110px;
    background: linear-gradient(180deg, #181512 0%, #1e1b18 50%, #141210 100%);
    border: 1px solid #332822;
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    min-width: 960px;
}

.gp-fretboard-notes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.gp-fret-number {
    position: absolute;
    bottom: 3px;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    font-family: monospace;
    pointer-events: none;
    z-index: 4;
}

.gp-string-label {
    position: absolute;
    left: 8px;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    font-family: monospace;
    pointer-events: none;
    z-index: 4;
    text-shadow: 0 1px 2px #000000;
}

/* Các dây đàn guitar (Strings) */
.gp-fret-string {
    position: absolute;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #d1d5db, #9ca3af 50%, #4b5563);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 2;
}

/* Các phím đàn (Fret Wires) */
.gp-fret-wire {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #e2e8f0, #94a3b8 40%, #64748b 100%);
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 1;
}

/* Nut (Ngựa đàn / Phím 0) */
.gp-fret-nut {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(90deg, #fef3c7, #fde68a 60%, #d97706);
    border-right: 1px solid #78350f;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.6);
    z-index: 3;
}

/* Chấm định vị phím đàn (Fret Inlays) */
.gp-fret-marker {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff, #e2e8f0 60%, #cbd5e1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.75;
}

/* Nốt bấm sáng rực rỡ thời gian thực trên cần đàn */
.gp-fret-note {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
    color: #000000;
    font-weight: 800;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.95), 0 0 4px #ffffff;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.06s ease;
    animation: gpFretPop 0.12s ease-out;
}

@keyframes gpFretPop {
    0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.0); opacity: 1; }
}

/* Vùng hiển thị AlphaTab Canvas - Sáng trắng tinh khôi chuẩn Songsterr */
.gp-alphatab-viewport {
    background: #ffffff;
    min-height: 480px;
    padding: 24px 16px;
    overflow-x: auto;
    position: relative;
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#alphaTab {
    width: 100%;
    margin: 0 auto;
    position: relative;
    contain: layout style;
}

#alphaTab canvas {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ==========================================================================
   ALPHATAB PLAYBACK CURSORS & HIGHLIGHTS (CHUẨN SONGSTERR 60FPS)
   ========================================================================== */
.at-cursors {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* 1. Playhead Cursor Chạy Theo Nốt Nhạc (Songsterr Solid Electric Orange Line)
   TUYỆT ĐỐI KHÔNG GHI ĐÈ TRANSFORM, WIDTH, HEIGHT ĐỂ ALPHATAB TỰ DO SCALE & DỜI TỌA ĐỘ THEO NỐT */
.at-cursor-beat {
    background: #ff6f00 !important;
    opacity: 0.95 !important;
    pointer-events: none !important;
    z-index: 1001 !important;
}

/* 2. Hộp Đánh Dấu Ô Nhịp (Subtle Measure Glow) - KHÔNG BORDER ĐỂ KHÔNG BỊ CO GIÃN THEO KHỔ Ô */
.at-cursor-bar {
    background: rgba(255, 111, 0, 0.05) !important;
    border: none !important;
    border-radius: 0 !important;
    pointer-events: none !important;
    z-index: 999 !important;
}

/* 3. Nốt Nhạc & Con Số Tab Đang Đánh Sáng Rực Rỡ */
.at-highlight * {
    fill: #ff6f00 !important;
    stroke: #ff6f00 !important;
    transition: fill 0.08s ease, stroke 0.08s ease !important;
}

/* 4. Vùng chọn Lặp Đoạn (Loop / Selection Highlight Chuẩn Songsterr) */
.at-selection {
    position: absolute;
    pointer-events: none !important;
    z-index: 998 !important;
}

.at-selection div {
    background: rgba(255, 111, 0, 0.18) !important;
    border-top: 2px solid #ff6f00 !important;
    border-bottom: 2px solid #ff6f00 !important;
    border-radius: 2px !important;
}

/* Count-In Overlay */
.gp-countin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 13, 19, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    user-select: none;
}

.gp-countin-badge {
    font-size: 96px;
    font-weight: 900;
    color: #ff6f00;
    text-shadow: 0 0 30px rgba(255, 111, 0, 0.8), 0 0 60px rgba(255, 111, 0, 0.4);
    font-family: monospace;
    line-height: 1;
}

.gp-countin-text {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes gpPulseCount {
    0% { transform: scale(0.6); opacity: 0.2; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1.0); opacity: 0.95; }
}

/* ==========================================================================
   CHẾ ĐỘ TOÀN MÀN HÌNH STUDIO (FULLSCREEN THEATRE MODE)
   ========================================================================== */
.gp-studio-player-wrapper.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: #0b0d13 !important;
}

.gp-studio-player-wrapper.is-fullscreen .gp-player-toolbar {
    position: sticky !important;
    top: 0 !important;
    border-radius: 0 !important;
    background: #181c28 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 10px 20px !important;
    z-index: 100 !important;
}

.gp-studio-player-wrapper.is-fullscreen .gp-alphatab-viewport {
    flex: 1 1 auto !important;
    height: calc(100vh - 110px) !important;
    max-height: calc(100vh - 110px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
}

@media (max-width: 1200px) {
    .gp-speed-label {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .gp-player-toolbar {
        padding: 6px 10px;
        gap: 6px;
    }
    .gp-play-pause-btn {
        min-width: 80px;
        height: 34px;
        font-size: 12px;
        padding: 0 10px;
    }
    .gp-speed-chips {
        height: 32px !important;
    }
    .gp-chip {
        padding: 0 5px !important;
        font-size: 10px !important;
        height: 26px !important;
        line-height: 26px !important;
    }
    .gp-transpose-control {
        height: 32px !important;
    }
    .gp-transpose-btn {
        height: 26px !important;
        line-height: 26px !important;
        padding: 0 5px !important;
        font-size: 10px !important;
    }
    .gp-tempo-bpm {
        height: 32px !important;
        font-size: 11px !important;
        padding: 0 6px !important;
    }
    .gp-fretboard {
        min-width: 700px;
    }
}


/* Compact 2-Row Enhancements v8.4 */
.gp-toolbar-row--top,
.gp-toolbar-row--bottom {
    min-height: 32px;
}
.gp-score-mode-badge,
.gp-layout-badge {
    font-size: 11px !important;
}
.gp-score-mode-btn,
.gp-layout-btn {
    height: 32px !important;
    font-size: 11.5px !important;
    padding: 0 8px !important;
}
.gp-version-selector-container select {
    height: 32px !important;
    font-size: 11.5px !important;
}
#gpTracksDrawerBtn {
    height: 32px !important;
    font-size: 11.5px !important;
    padding: 0 8px !important;
}
