/* PC-Optimized Play Song Styles - Enhanced User-Friendly Design */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--c-bg);
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

.play-song-container {
    max-width: 100vw;
    width: 100vw;
    margin: 0;
    padding: 4px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    margin-top: 4px;
    margin-bottom: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: calc(100vh - 8px);
    height: calc(100vh - 8px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header - compact, marginal; chord section is the main content */
.song-header {
    text-align: center;
    margin-bottom: 4px;
    padding: 4px 8px 6px;
    border-bottom: 1px solid #e1e8ed;
    flex-shrink: 0;
}

.play-song-container.header-hidden .song-header {
    display: none;
}

.header-row-1 {
    margin-bottom: 2px;
}

.header-row-2 {
    margin-bottom: 0;
}

.song-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin-left: 10px;
}

.artist-name {
    margin: 0;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    font-style: italic;
    display: inline-block;
}

/* Song Details - compact bar, same button/detail sizes */
.song-details {
    margin-bottom: 4px;
    background: linear-gradient(135deg, #f8f9ff, #e8f4fd);
    border-radius: 10px;
    padding: 6px 12px;
    border: 1px solid #e1e8ed;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

.song-info-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    row-gap: 6px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    min-height: 44px;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.detail-icon {
    font-size: 16px;
}

.detail-label {
    color: #34495e;
    font-size: 13px;
}

.detail-value {
    color: #2c3e50;
    font-weight: 700;
    font-size: 14px;
}

.pending-approval {
    color: orange;
    font-size: 0.85em;
    margin-left: 3px;
}

.detail-item-inline-help {
    padding: 6px 12px;
    min-height: auto;
    background: transparent;
    box-shadow: none;
}

.detail-item-inline-help:hover {
    transform: none;
    box-shadow: none;
}

.play-song-levels-help {
    background: none;
    border: none;
    color: #5b21b6;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    padding: 0;
}

.play-song-levels-help:hover {
    color: #764ba2;
}

/* YouTube Player Section - Inline compact */
.youtube-player-section {
    margin-bottom: 2px;
    position: relative;
    display: inline-block;
    margin-left: 8px;
}

.youtube-toggle-btn {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
    display: flex;
    align-items: center;
    gap: 3px;
}

.youtube-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 71, 87, 0.4);
    background: linear-gradient(135deg, #ff3838, #ff2f2f);
}

.youtube-icon {
    font-size: 10px;
}

.youtube-player-container {
    position: relative;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

.youtube-player-container iframe {
    width: 100%;
    max-width: 300px;
    height: 170px;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

/* קישור "לצפייה ב-YouTube" – פתיחה בטאב חדש כשההטמעה לא זמינה */
.youtube-open-link {
    display: inline-block;
    margin-right: 8px;
    margin-top: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.1);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.youtube-open-link:hover {
    background: rgba(26, 115, 232, 0.2);
    color: #1557b0;
}

.youtube-fallback-hint {
    margin: 8px 0 0;
    padding: 6px 8px;
    font-size: 11px;
    color: #666;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}
.youtube-fallback-hint a {
    color: #6bb5ff;
    text-decoration: underline;
}
.youtube-fallback-hint a:hover {
    color: #9eceff;
}

.youtube-localhost-hint {
    margin: 6px 0 0;
    padding: 6px 8px;
    font-size: 11px;
    color: #8a7a2e;
    text-align: center;
    background: rgba(255, 235, 150, 0.2);
    border-radius: 6px;
}
.youtube-localhost-hint a {
    color: #b8922e;
    text-decoration: underline;
}

.close-youtube-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-youtube-btn:hover {
    background: white;
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Action Buttons - Inline compact */
.action-buttons {
    display: inline-flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 2px;
    margin-left: 8px;
    margin-top: 4px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.edit-btn {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: #2c3e50;
}

.list-btn {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    cursor: pointer;
    font: inherit;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* BPM in song-info-row - same size as other detail-item, distinct colors */
.song-info-row .original-bpm-display {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    color: white !important;
}

.song-info-row .original-bpm-display .detail-value,
.song-info-row .current-bpm-display .detail-value {
    color: inherit;
}

.song-info-row .current-bpm-display {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
}

/* Main Layout - Chord section is the essential content */
.main-layout {
    display: flex;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.player-focus-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 10px;
    padding-right: 120px;
    margin-bottom: 6px;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(248, 249, 255, 0.98), rgba(238, 246, 255, 0.98));
    box-shadow: 0 4px 14px rgba(44, 62, 80, 0.08);
    flex-shrink: 0;
}

.focus-toggle-group,
.compact-playback-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.focus-toggle-btn,
.compact-control-btn {
    border: none;
    border-radius: 999px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    min-height: 30px;
    padding: 6px 10px;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.focus-toggle-btn {
    background: linear-gradient(135deg, #475569, #334155);
}

.focus-toggle-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.compact-play-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.compact-restart-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.compact-stop-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.focus-toggle-btn:hover,
.compact-control-btn:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
}

.play-song-container.controls-hidden .main-layout {
    gap: 0;
}

/* Controls Panel - Enhanced with size controls */
.controls-panel {
    width: 300px;
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
    height: 100%;
    overflow-y: auto;
    flex-shrink: 0;
}

.play-song-container.controls-hidden .controls-panel {
    display: none;
}

.play-song-container.controls-hidden .chord-section {
    border-color: rgba(102, 126, 234, 0.22);
}

.control-group {
    margin-bottom: 12px;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 6px;
    font-size: 13px;
}

.control-icon {
    font-size: 14px;
}

/* Size Controls Section */
.size-controls {
    background: linear-gradient(135deg, #e8f5e8, #f0f8ff);
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.size-controls-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #155724;
    margin-bottom: 8px;
    font-size: 14px;
}

.size-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.size-control-row:last-child {
    margin-bottom: 0;
}

.size-control-label {
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    flex: 1;
}

.size-control-buttons {
    display: flex;
    gap: 4px;
}

.size-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.size-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #218838, #1e7e34);
}

.size-btn.decrease {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
}

.size-btn.decrease:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.4);
}

.reset-all-btn {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
    margin-top: 8px;
}

.reset-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(111, 66, 193, 0.4);
    background: linear-gradient(135deg, #5a32a3, #4e2a8e);
}

/* Size Indicator */
.size-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.size-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.help-text {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
    margin-top: 6px;
    line-height: 1.3;
}

/* BPM Section - Enhanced with larger fonts and +/- buttons */
.bpm-control-group .bpm-label {
    font-size: 15px;
}

.bpm-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bpm-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bpm-step-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.bpm-step-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

.bpm-step-btn.decrease {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.bpm-step-btn.decrease:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    box-shadow: 0 3px 12px rgba(255, 193, 7, 0.4);
}

.bpm-slider, .volume-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e8ed;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
}

.bpm-slider::-webkit-slider-thumb, .volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.bpm-slider::-webkit-slider-thumb:hover, .volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.6);
}

.bpm-input {
    flex: 1;
    min-width: 70px;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s;
}

.bpm-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Transpose Controls */
.transpose-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.transpose-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.transpose-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.transpose-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

.transpose-btn.decrease {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.transpose-btn.decrease:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    box-shadow: 0 3px 12px rgba(255, 193, 7, 0.4);
}

.transpose-input {
    width: 80px;
    padding: 6px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
}

.transpose-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.transpose-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e8ed;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
}

.transpose-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.transpose-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.6);
}

.transpose-info {
    text-align: center;
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    font-weight: 600;
}

.reset-btn {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(255, 193, 7, 0.3);
    margin: 0 auto;
    font-size: 14px;
}

.reset-btn:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 5px 18px rgba(255, 193, 7, 0.5);
}

/* Easy version (Capo) */
.easy-version-controls {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.easy-version-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    color: white;
    background: linear-gradient(135deg, #1abc9c, #16a085);
    box-shadow: 0 2px 10px rgba(22, 160, 133, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.easy-version-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 160, 133, 0.35);
    filter: brightness(1.02);
}

.easy-version-btn.active {
    background: linear-gradient(135deg, #0b7285, #0a4c5a);
    box-shadow: 0 2px 10px rgba(11, 114, 133, 0.25);
}

.easy-version-hint {
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    color: #0f5132;
    background: linear-gradient(135deg, #d1e7dd, #c3e6cb);
    border: 1px solid #badbcc;
    border-radius: 8px;
    padding: 8px 10px;
    line-height: 1.35;
}

/* Notes panel */
.notes-panel {
    background: linear-gradient(135deg, #f8f9ff, #eef6ff);
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 10px;
}

.notes-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 13px;
}

.notes-block {
    margin-bottom: 10px;
}

.notes-block-title {
    font-weight: 800;
    color: #34495e;
    font-size: 12px;
    margin-bottom: 6px;
}

.notes-text {
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: #2c3e50;
    line-height: 1.4;
}

.notes-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.note-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.notes-tags-summary {
    margin-top: 8px;
    font-size: 11px;
    color: #6c757d;
    font-weight: 600;
    line-height: 1.35;
}

.song-notes-inline {
    max-width: 1100px;
    margin: 0 auto 10px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #f8f9ff);
    color: #1e293b;
    box-shadow: 0 4px 14px rgba(44, 62, 80, 0.08);
}

.song-notes-inline-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 900;
    margin-bottom: 8px;
    color: #334155;
}

.song-notes-inline-block {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    justify-content: center;
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 13px;
    font-weight: 650;
}

.song-notes-inline-block + .song-notes-inline-block {
    margin-top: 6px;
}

.song-notes-inline-block strong {
    color: #4f46e5;
    white-space: nowrap;
}

.song-notes-inline-block.teacher-note strong {
    color: #b45309;
}

.song-notes-inline-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

/* Preparation controls */
.preparation-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preparation-checkbox {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
}

.preparation-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.preparation-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 18px;
}

.preparation-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .preparation-slider {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

input:checked + .preparation-slider:before {
    transform: translateX(18px);
}

.preparation-label {
    font-weight: 600;
    color: #34495e;
    font-size: 11px;
}

.preparation-count-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preparation-count-label {
    font-weight: 600;
    color: #34495e;
    font-size: 12px;
    white-space: nowrap;
}

.preparation-count-input {
    width: 60px;
    padding: 6px 8px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.preparation-count-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Collapsible song parts */
.song-parts-group .collapsible-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0;
    padding: 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    font-size: 13px;
}

.song-parts-group .collapsible-trigger:hover {
    color: #667eea;
}

.collapsible-chevron {
    margin-right: auto;
    transition: transform 0.2s;
    font-size: 10px;
}

.song-parts-group .collapsible-trigger[aria-expanded="true"] .collapsible-chevron {
    transform: rotate(180deg);
}

.song-parts-panel {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.song-parts-panel.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.song-parts-panel:not(.collapsed) {
    max-height: 500px;
}

/* Song parts controls */
.song-parts-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.song-part-control {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    padding: 6px 8px;
}

.song-part-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.song-part-checkbox input {
    accent-color: #667eea;
    transform: scale(1);
}

.song-part-name {
    font-weight: 600;
    color: #34495e;
    font-size: 11px;
}

.playback-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.play-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.restart-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.stop-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* User Instructions Section */
.user-instructions {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.instructions-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #856404;
    margin-bottom: 8px;
    font-size: 14px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    color: #856404;
}

.instruction-item:last-child {
    margin-bottom: 0;
}

.instruction-icon {
    font-size: 12px;
    min-width: 16px;
}

/* Chord Section - Main content of the page */
.chord-section {
    flex: 1;
    min-height: 0;
    padding: 12px;
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
    overflow-y: auto;
    height: 100%;
    scroll-behavior: smooth;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.play-views-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 6px 0 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff, #eef6ff);
    border: 1px solid #e1e8ed;
}

.play-views-spacer {
    flex: 1;
}

.play-view-btn {
    border: 2px solid #e1e8ed;
    background: #fff;
    color: #2c3e50;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.play-view-btn:hover {
    transform: translateY(-1px);
    border-color: #667eea;
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.18);
}

.play-view-btn.active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.28);
}

.play-view-btn.disabled,
.play-view-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: #e1e8ed;
}

.play-view-btn.disabled:hover,
.play-view-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e1e8ed;
}

.play-view-side-btn {
    border: 2px solid rgba(255, 193, 7, 0.35);
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #2c3e50;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.play-view-side-btn:hover {
    transform: translateY(-1px);
    border-color: #ffc107;
    box-shadow: 0 8px 22px rgba(255, 193, 7, 0.2);
}

.play-text-panel {
    white-space: pre;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 14px;
    margin: 8px auto 0;
    max-width: 1100px;
    min-height: 220px;
    overflow: auto;
    direction: ltr;
    text-align: left;
    font-size: 14px;
    font-weight: 650;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.5;
    tab-size: 4;
}

.play-text-panel-lyrics {
    direction: rtl;
    text-align: right;
    white-space: pre-wrap;
    font-family: inherit;
    font-weight: 650;
}

.play-text-panel-tabs {
    max-width: none;
    width: 100%;
    min-height: 420px;
    background: #15181d;
    color: #e5e7eb;
    border-color: #2f3541;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 24px rgba(15, 23, 42, 0.18);
    letter-spacing: 0.45px;
    line-height: 1.7;
}

/* Lyrics side panel */
.lyrics-side-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0; /* RTL: keep lyrics on left so it doesn't cover controls panel (right side varies) */
    width: min(420px, 92vw);
    background: rgba(255, 255, 255, 0.98);
    border-right: 1px solid #e1e8ed;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.18);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 2500;
    display: flex;
    flex-direction: column;
}

.lyrics-side-panel.open {
    transform: translateX(0);
}

.lyrics-side-header {
    padding: 12px 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 900;
}

.lyrics-side-close {
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.lyrics-side-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lyrics-side-body {
    padding: 12px 14px;
    overflow: auto;
}

.lyrics-side-text {
    white-space: pre-wrap;
    direction: rtl;
    text-align: right;
    font-weight: 650;
    color: #2c3e50;
    line-height: 1.65;
}

.selected-measure-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.2);
}

.info-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    color: #1976d2;
    font-size: 12px;
}

.chords-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    direction: ltr;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Loop sections - Enhanced styling with auto-scroll */
.loop-section {
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff, #fafbff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 12px;
}

.loop-section.preparation-section {
    border-color: #ffc107;
    background: linear-gradient(145deg, #fff8e1, #fffde7);
}

.loop-section.current-repeat {
    border-color: #28a745;
    background: linear-gradient(145deg, #d4edda, #c3e6cb);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    transform: translateY(-2px);
    animation: currentSectionPulse 2s infinite;
}

@keyframes currentSectionPulse {
    0%, 100% {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    }
    50% {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    }
}

.loop-section.current-repeat .loop-header {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.loop-section.past-repeat {
    opacity: 0.75;
    border-color: #6c757d;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
}

.loop-section.past-repeat .loop-header {
    background: linear-gradient(135deg, #6c757d, #545b62) !important;
}

.loop-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    min-height: 40px;
}

.preparation-section .loop-header {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
}

.loop-title-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loop-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.loop-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.loop-title {
    font-size: 16px;
    font-weight: 700;
}

.loop-measures-count {
    font-size: 11px;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
}

.loop-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loop-enable-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.loop-enable-checkbox input {
    accent-color: white;
    transform: scale(1.1);
}

.loop-checkbox-label {
    font-size: 12px;
    font-weight: 500;
}

.loop-content {
    padding: 16px;
    direction: ltr;
}

/* Fixed 4 per row layout - Enhanced centering */
.chord-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
    padding: 0;
}

.chord-row.fixed-four-per-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
}

/* Measure boxes - Enhanced with better scaling and centering */
.measure-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #34495e;
    border-radius: 8px;
    padding: 8px;
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    min-height: 80px;
    width: 200px;
    flex: 0 0 auto;
    transform-origin: center;
    font-size: 12px;
}

.measure-box.empty-measure {
    background: transparent;
    border: 2px dashed #ddd;
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.measure-box.preparation-measure {
    border-color: #ffc107;
    background: linear-gradient(145deg, #fff8e1, #fffde7);
}

/* אם תיבת הכנה סומנה בטעות כ-empty-measure – נשמור על מראה ברור */
.measure-box.preparation-measure.empty-measure {
    opacity: 1;
    background: linear-gradient(145deg, #fff8e1, #fffde7);
    border: 2px solid #ffc107;
    cursor: pointer;
    pointer-events: auto;
}

.measure-box.disabled-measure {
    opacity: 0.6;
    border-style: dashed;
    background: linear-gradient(145deg, #f5f5f5, #e9ecef);
}

.measure-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.measure-box:hover::before {
    left: 100%;
}

.measure-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
    z-index: 2;
}

.measure-box.current {
    background: linear-gradient(135deg, #fff7cc, #fff3cd);
    border-color: #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.6);
    transform: translateY(-3px);
    z-index: 3;
    animation: currentMeasurePulse 1.5s infinite;
}

@keyframes currentMeasurePulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.6);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 193, 7, 0.8);
    }
}

.measure-box.past {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
    opacity: 0.85;
}

.measure-box.selected {
    border-color: #e74c3c;
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.7);
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    transform: translateY(-3px);
    z-index: 4;
}

.measure-box.clickable {
    border-style: dashed;
    border-width: 2px;
}

.measure-box.clickable:hover {
    border-style: solid;
    border-width: 3px;
}

.measure-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    height: 16px;
    line-height: 16px;
}

.chords-in-measure {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-bottom: 6px;
    gap: 2px;
    min-height: 40px;
    flex-wrap: nowrap;
    overflow: hidden;
    flex: 1;
}

.chord-box {
    padding: 4px;
    text-align: center;
    border: 2px solid #bdc3c7;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
    transition: all 0.3s;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

.chord-box.preparation-chord {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: white;
    border-color: #ff8f00;
    cursor: default;
}

.chord-box.current-chord {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-color: #28a745;
    animation: pulse-chord 1s infinite;
    transform: scale(1.15);
    z-index: 5;
}

.chord-box.played-chord {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border-color: #6c757d;
    opacity: 0.8;
}

@keyframes pulse-chord {
    0% {
        box-shadow: 0 0 0 rgba(40, 167, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 12px rgba(40, 167, 69, 0.8);
    }
    100% {
        box-shadow: 0 0 0 rgba(40, 167, 69, 0.7);
    }
}

.chord-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.chord-box:active::after {
    opacity: 1;
}

.chord-box.preparation-chord:hover {
    transform: none;
    background: linear-gradient(135deg, #ffc107, #ff8f00);
}

.chord-box:hover {
    transform: scale(1.2);
    z-index: 6;
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.chord-box.selected-chord {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    transform: scale(1.25);
    z-index: 7;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.9);
}

.beats-display {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 4px;
    padding: 0 4px;
    min-height: 8px;
    max-height: 12px;
}

.beat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #bdc3c7;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    flex-shrink: 0;
}

.beat-dot.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scale(1.6);
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.9);
    z-index: 2;
}

.beat-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.beat-dot.played {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.5);
    transform: scale(1.4);
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
}

/* My Songs Button Styling */
.my-songs-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.my-songs-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.my-songs-btn.added {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.my-songs-btn.added:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
}

.my-songs-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .controls-panel {
        width: 280px;
    }

    .measure-box {
        width: 180px;
        min-height: 70px;
    }
}

@media (max-width: 1200px) {
    .controls-panel {
        width: 260px;
    }

    .measure-box {
        width: 160px;
        min-height: 65px;
    }

    .chord-box {
        font-size: 14px;
        min-width: 18px;
    }
}

@media (max-width: 768px) {
    .player-focus-toolbar {
        justify-content: center;
        padding: 5px 6px;
        padding-right: 92px;
        gap: 5px;
    }

    .focus-toggle-group,
    .compact-playback-controls {
        justify-content: center;
        gap: 4px;
    }

    .focus-toggle-btn,
    .compact-control-btn {
        min-height: 28px;
        padding: 5px 8px;
        font-size: 10px;
    }

    .main-layout {
        flex-direction: column;
        height: auto;
    }

    .controls-panel {
        width: 100%;
        order: 1;
        position: static;
        max-height: none;
        padding: 8px;
    }

    .chord-section {
        order: 2;
        max-height: none;
    }

    .measure-box {
        width: 140px;
        min-height: 60px;
    }

    .chord-row,
    .chord-row.fixed-four-per-row {
        gap: 8px;
        padding: 0 10px;
    }

    .loop-header {
        padding: 6px 12px;
        font-size: 12px;
    }

    .loop-title-controls {
        justify-content: center;
    }

    .song-info-row {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .action-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 2px;
    }

    .youtube-player-section,
    .action-buttons {
        display: block;
        text-align: center;
        margin: 1px 0;
    }

    .youtube-player-container iframe {
        max-width: 250px;
        height: 140px;
    }

    .control-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .bpm-input {
        padding: 6px 10px;
        font-size: 16px;
    }

    .bpm-step-btn {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .reset-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .control-group {
        margin-bottom: 8px;
    }

    .control-label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .chord-box {
        min-width: 15px;
        min-height: 30px;
        font-size: 12px;
        padding: 2px;
    }

    .size-controls {
        padding: 6px;
    }

    .size-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* Ensure proper spacing for beat dots based on measure width */
.measure-box[data-total-beats="1"] .beats-display {
    justify-content: center;
}

.measure-box[data-total-beats="2"] .beats-display {
    padding: 0 12px;
}

.measure-box[data-total-beats="3"] .beats-display {
    padding: 0 10px;
}

.measure-box[data-total-beats="4"] .beats-display {
    padding: 0 8px;
}

.measure-box[data-total-beats="5"] .beats-display {
    padding: 0 6px;
}

.measure-box[data-total-beats="6"] .beats-display {
    padding: 0 4px;
}

.measure-box[data-total-beats="7"] .beats-display {
    padding: 0 4px;
}

.measure-box[data-total-beats="8"] .beats-display {
    padding: 0 2px;
}

/* Optimize scrollbar appearance */
.controls-panel::-webkit-scrollbar,
.chord-section::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track,
.chord-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb,
.chord-section::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb:hover,
.chord-section::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Better text contrast for readability */
.measure-title,
.chord-box,
.loop-checkbox-label,
.loop-measures-count {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.loop-title {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
