/* ===== STYLES FOR GUITAR SITE-SPECIFIC FEATURES (NOTATION, FRETBOARD) ===== */

/* ===== NOTATION PAGE STYLES ===== */
/* Notation Page CSS Variables - Light/Dark Mode Support */
:root {
    /* Music Domain Colors */
    --color-fretboard-wood-light: #f8f4e3;
    --color-fretboard-wood-dark: #4a3728;
    --color-fretboard-fret: #C0C0C0;
    --color-fretboard-string-light: #d4d4d4;
    --color-fretboard-string-dark: #aaaaaa;
    --color-fretboard-marker-light: #e6e6e6;
    --color-fretboard-marker-dark: #555555;
    --color-notation-position-light: rgba(127, 127, 127, 0.5);
    --color-notation-position-dark: rgba(127, 127, 127, 0.75);
    --color-music-dot-normal: #2CDB57;
    --color-music-dot-highlight: #3737FF;
    --color-music-dot-border-light: #000000;
    --color-music-dot-border-dark: #ffffff;

    /* Base light mode colors */
    --notation-bg-color: var(--bg-color);
    --notation-text-color: var(--text-color);
    --notation-border-color: var(--light-border);
    --notation-highlight-color: var(--focus-color);

    /* Position indicator */
    --notation-position-bg: var(--color-notation-position-light);
    --notation-position-width: var(--spacing-sm);

    /* Chord thumbnails */
    --notation-chord-thumb-text: var(--text-color);
    --notation-chord-thumb-highlight-text: var(--focus-color);
    --notation-chord-thumb-highlight-bg: rgba(0, 123, 255, 0.2);

    /* Hotspots */
    --notation-hotspot-bg: var(--color-danger);
    --notation-hotspot-border: var(--color-danger);
    --notation-hotspot-shadow: rgba(0, 0, 0, 0.6);

    /* Transitions */
    --notation-transition-time: var(--transition-speed);
}

/* Dark mode colors */
[data-theme="dark"] [data-page-type="notation-page"] {
    --notation-bg-color: var(--bg-color);
    --notation-text-color: var(--text-color);
    --notation-border-color: var(--light-border);
    --notation-highlight-color: var(--focus-color);

    /* Position indicator */
    --notation-position-bg: var(--color-notation-position-dark);

    /* Chord thumbnails */
    --notation-chord-thumb-text: var(--text-color);
    --notation-chord-thumb-highlight-text: var(--focus-color);
    --notation-chord-thumb-highlight-bg: rgba(255, 255, 255, 0.15);

    /* Hotspots */
    --notation-hotspot-bg: var(--color-danger);
    --notation-hotspot-border: var(--color-danger);
    --notation-hotspot-shadow: rgba(0, 0, 0, 0.8);
}

/* Basic container styling */
[data-page-type="notation-page"] {
    color: var(--notation-text-color);
    background-color: var(--notation-bg-color);
    transition: color var(--notation-transition-time) ease,
        background-color var(--notation-transition-time) ease;
}

/* Main containers */
[data-page-type="notation-page"] #main-container {
    color: var(--notation-text-color);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ==============================================
 * Metronome and Chord Thumbnails Layout
 * ==============================================
 */

/* Metro and chord thumbnails container - ensure bottom alignment */
[data-page-type="notation-page"] #metroAndThumbContainer {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    margin: var(--spacing-xs) 0;
    min-height: clamp(45px, 8vw, 60px);
    width: 100%;
    overflow-x: auto;
}

/* Metronome container */
[data-page-type="notation-page"] #metronome-container {
    flex: 0 0 auto;
    margin-right: 0;
}

/* Chord thumbnails container - always stay at bottom of metronome */
[data-page-type="notation-page"] #chord-thumbs {
    display: flex;
    flex-direction: column;
    margin: 0 0 0 var(--spacing-sm);
    padding: 0;
    align-self: flex-end;
    flex: 1;
    min-height: 0;
}

/* Chord rows - ensure left alignment */
[data-page-type="notation-page"] .chord-thumb-row {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    margin-bottom: var(--spacing-xs);
    /* TODO(PAT-028): Touch target too small - clamp min 30px below 44px minimum; max 40px below compact toolbar 44px min on touch devices */
    min-height: clamp(30px, 6vw, 40px);
}

/* Individual chord thumbnails - ensure left text alignment */
[data-page-type="notation-page"] #chord-thumbs>div {
    position: relative;
    min-width: clamp(25px, 5vw, 35px);
    margin-right: var(--spacing-xs);
    display: inline-block;
    text-align: left;
    background-color: transparent;
    transition: background-color var(--notation-transition-time) ease,
        color var(--notation-transition-time) ease;
}

/* Chord thumbnail clickable state — cursor set via data-clickable attribute (PAT-009 compliant) */
[data-page-type="notation-page"] #chord-thumbs>div[data-clickable="true"] {
    cursor: pointer;
}

/* Chord thumbnail highlight state (PAT-009 compliant) */
[data-page-type="notation-page"] #chord-thumbs>div:not([data-highlighted]) {
    background-color: transparent;
}

[data-page-type="notation-page"] #chord-thumbs>div[data-highlighted] {
    background-color: var(--notation-chord-thumb-highlight-bg);
}

/* Chord thumbnail name — default and active text states (PAT-009, PAT-029 compliant) */
.chord-thumb-name {
    color: var(--notation-chord-thumb-text);
    /* PAT-029: Responsive font size without JavaScript */
    font-size: clamp(10px, 2.5vw, 12px);
    white-space: nowrap;
    transition: color 0.3s ease;
    text-align: left;
    padding-left: 2px;
}

.chord-thumb-name.chord-name-active {
    font-weight: bold;
    color: var(--notation-chord-thumb-highlight-text);
}

.chord-thumb-number {
    color: var(--color-danger);
    font-size: var(--font-size-xs);
    position: absolute;
    top: 2px;
    left: 2px;
    line-height: 1;
}

/* PAT-029: CSS-driven responsive width for notation main content */
.notation-main-content {
    /* Responsive width: 90% on small screens, 60% on larger screens */
    /* Breakpoint approximately matches window.innerWidth / 1.2 > 799 */
    width: 90%;
}

@media (min-width: 960px) {
    .notation-main-content {
        width: 60%;
    }
}

/* Make scroll indicator more visible */
[data-page-type="notation-page"] #chord-thumbs::-webkit-scrollbar,
[data-page-type="notation-page"] .chord-thumb-row::-webkit-scrollbar {
    height: 4px;
}

[data-page-type="notation-page"] #chord-thumbs::-webkit-scrollbar-thumb,
[data-page-type="notation-page"] .chord-thumb-row::-webkit-scrollbar-thumb {
    background-color: var(--notation-border-color);
    border-radius: var(--border-radius-sm);
}

/* ==============================================
 * Notation display - enhanced for all modes
 * ==============================================
 */

/* Common settings for notation display in all modes */
[data-page-type="notation-page"] #notationDiv {
    position: relative;
    margin: var(--spacing-sm) 0;
    max-width: 100%;
    overflow-x: auto;
    background-color: var(--notation-bg-color);
    opacity: 1;
    image-rendering: auto;
}

/* Measure slots container for small displays */
[data-page-type="notation-page"] #measureSlotsDiv {
    background-color: var(--notation-bg-color);
    opacity: 1;
    max-width: 100%;
    position: relative;
}

/* Individual measure containers */
[data-page-type="notation-page"] [id^="measure-container-"] {
    background-color: var(--notation-bg-color);
    opacity: 1;
    position: relative;
}

/* Blank measure slot — visual indicator for measures beyond the end of the piece */
.notation-blank-measure {
    background-color: var(--notation-bg-color);
}

/* Notation display images — white background so CSS dark-mode inversion renders correctly */
.notation-display-image {
    background-color: white;
    opacity: 0.9;
}

/* Fretboard zoom controls container */
.fretboard-zoom-controls {
    margin-top: var(--spacing-sm);
    text-align: center;
}

/* Individual measure slots */
[data-page-type="notation-page"] #measureSlotsDiv>div>div {
    position: relative;
    opacity: 1;
    image-rendering: auto;
}

/* Measure slot with background image (PAT-009 compliant) */
[data-page-type="notation-page"] #measureSlotsDiv>div>div[style*="background-image"] {
    background-color: white;
}

/* Properly handle images in dark mode with consistent visibility */
[data-theme="dark"] [data-page-type="notation-page"] #notationDiv img:not([data-native-dark="true"]):not([data-no-invert="true"]) {
    filter: invert(0.9) hue-rotate(180deg) brightness(0.9) contrast(1.2);
    background-color: white;
    opacity: 1;
}

/* Force background color for measure slots in dark mode */
[data-theme="dark"] [data-page-type="notation-page"] #measureSlotsDiv {
    background-color: var(--notation-bg-color);
}

[data-theme="dark"] [data-page-type="notation-page"] #measureSlotsDiv [id^="measure-container-"] {
    background-color: var(--notation-bg-color);
}

/* Need white background for background images that will be inverted */
[data-theme="dark"] [data-page-type="notation-page"] [style*="background-image"] {
    background-color: white;
    opacity: 1;
}

/* Special dark mode handling for notation images and backgrounds */
[data-theme="dark"] [data-page-type="notation-page"] {
    background-color: var(--notation-bg-color);
}

/* Images and areas with notation need white backgrounds for proper inversion */
[data-theme="dark"] [data-page-type="notation-page"] img:not([data-native-dark="true"]):not([data-no-invert="true"]),
[data-theme="dark"] [data-page-type="notation-page"] [style*="background-image"] {
    background-color: white;
    filter: invert(0.9) hue-rotate(180deg) brightness(0.9) contrast(1.2);
}

/* Notation image wrapper should maintain dark background */
[data-theme="dark"] [data-page-type="notation-page"] #notationDiv {
    background-color: var(--notation-bg-color);
}

/* But ensure slots with background images have white backgrounds */
[data-theme="dark"] [data-page-type="notation-page"] [style*="background-image"] {
    background-color: white;
}

/* Measure slots container should maintain proper dark background */
[data-theme="dark"] [data-page-type="notation-page"] #measureSlotsDiv {
    background-color: var(--notation-bg-color);
}

/* But inner slots with background images need white */
[data-theme="dark"] [data-page-type="notation-page"] #measureSlotsDiv [style*="background-image"] {
    background-color: white;
}

/* Force proper colors for containers */
[data-theme="dark"] [data-page-type="notation-page"] #metroAndThumbContainer {
    background-color: var(--notation-bg-color);
}

[data-page-type="notation-page"] #notationPositionDiv {
    position: absolute;
    width: var(--notation-position-width);
    background-color: var(--notation-position-bg);
    z-index: var(--z-overlay);
    opacity: 1;
    transition: left 0.1s ease, top 0.1s ease, height 0.1s ease;
    border-radius: var(--border-radius-sm);
    pointer-events: none;
    display: block;
}

/* Keyboard focus styles */
[data-page-type="notation-page"] button:focus-visible,
[data-page-type="notation-page"] #chord-thumbs>span:focus-visible {
    outline: 2px solid var(--notation-highlight-color);
    outline-offset: 2px;
}

/* Notation error styles */
.notation-error {
    padding: var(--spacing-md);
    margin: var(--spacing-md);
    background-color: var(--color-danger-light);
    border: 1px solid var(--color-danger);
    border-radius: var(--border-radius-sm);
    color: var(--color-danger);
}

.notation-error h3 {
    margin-top: 0;
    color: var(--color-danger);
}

/* Fix for very small screens */
@media (max-width: 400px) {

    [data-page-type="notation-page"] #notationDiv,
    [data-page-type="notation-page"] #measureSlotsDiv,
    [data-page-type="notation-page"] [id^="measure-container-"] {
        margin: 0;
        padding: 0;
    }

    [data-page-type="notation-page"] #metroAndThumbContainer {
        min-height: 40px;
    }

    [data-page-type="notation-page"] .chord-thumb-row {
        min-height: 25px;
    }
}

/* GAME BUTTON COMPONENT STYLES - GRID-BASED LAYOUT */
/* CSS custom properties for grid-based button positioning */
:root {
    /* Grid system variables */
    /* Each button spans 2 grid units */

    /* Button sizing */
    --button-height: clamp(50px, 4vw, 80px);
    --button-font-size: clamp(14px, 2.5vw, 16px);

    /* Container sizing */
    /* PAT-032: Using CSS variable pattern - music-specific container dimensions for fretboard games */
    --container-max-width: 800px;
}

/* Game button positioning - minimal overrides of .btn base class */
.game-button {
    /* Inherits from .btn-game base class in mystyle.css */
    height: var(--button-height); /* Override for legacy compatibility */
    font-size: var(--button-font-size); /* Override for legacy compatibility */
}

/* PAT-032: !important used intentionally for state modifiers to ensure visual feedback
   overrides any other button styling. This is an acceptable use case for critical UI states. */
/* ENHANCED: Game button feedback states using semantic color system from mystyle.css */
.game-button--correct {
    background-color: var(--color-success) !important;
    /* Semantic success color */
    color: white !important;
    animation: game-button-pulse-correct 0.3s ease;
}

.game-button--incorrect {
    background-color: var(--color-danger) !important;
    /* Semantic danger color */
    color: white !important;
    animation: game-button-pulse-incorrect 0.3s ease;
}

.game-button--disabled {
    opacity: 0.7 !important;
    pointer-events: none;
}

/* ENHANCED: Game button variants - modular extensions of base .game-button */
/* Note button specific styling - for musical note games */
.note-button {
    font-family: monospace;
    /* Clear note display */
    letter-spacing: 0.5px;
}

/* Number button specific styling - for numerical games */
.number-button {
    font-weight: 600;
    /* Emphasize numbers */
}

/* Labeled button specific styling - for text-based games */
.labeled-button {
    font-size: calc(var(--button-font-size) * 0.9);
    /* Slightly smaller for readability */
    text-align: center;
}

/* Game button container - uses existing container patterns */
.game-button-container {
    max-width: var(--container-max-width);
    width: 100%;
    margin: var(--spacing-lg) auto;
}

/* Note button container - Two-row piano layout */
.note-buttons-container {
    max-width: var(--container-max-width);
    width: auto;
    margin: 0;
    min-width: 400px;
    min-height: 120px;
}

.note-keys {
    width: 100%;
    min-width: 400px;
    /* Ensure the grid has space to work */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center the rows horizontally */
}

.note-buttons-accidental-row {
    position: relative;
    height: var(--button-height);
    margin-bottom: var(--spacing-md);
    width: 100%;
    min-width: 400px;
    max-width: var(--container-max-width);
    /* Constrain to max width for proper centering */
}

.note-buttons-natural-row {
    position: relative;
    height: var(--button-height);
    width: 100%;
    min-width: 400px;
    max-width: var(--container-max-width);
    /* Constrain to max width for proper centering */
}

/* PAT-032: Fretboard-game-specific container widths using CSS variables pattern */
/* Number button container - Single row layout */
.number-buttons-container {
    max-width: var(--container-max-width);
    width: auto;
    margin: var(--spacing-lg) auto;
    min-width: 400px;
}

.number-buttons-row {
    position: relative;
    height: var(--button-height);
    width: 100%;
    min-width: 400px;
}

/* Labeled button container - Multi-row layout */
.labeled-buttons-container {
    max-width: var(--container-max-width);
    width: auto;
    margin: var(--spacing-lg) auto;
    min-width: 400px;
}

.labeled-buttons-top-row {
    position: relative;
    height: var(--button-height);
    margin-bottom: var(--spacing-sm);
    width: 100%;
    min-width: 400px;
}

.labeled-buttons-bottom-row {
    position: relative;
    height: var(--button-height);
    margin-bottom: 0;
    width: 100%;
    min-width: 400px;
}

/* Responsive adjustments removed - letting JavaScript handle natural responsive behavior */

/* Responsive adjustments aligned with mystyle.css breakpoints */
/* TODO(PAT-028): Button font size 14px below 16px - may trigger iOS zoom on touch devices */
/* PAT-032: Using clamp() functions defined in :root for responsive sizing */
@media (max-width: 768px) {
    :root {
        --button-font-size: 14px;
        --button-height: clamp(40px, 3.5vw, 60px);
    }

    /* Reduce button container minimum width for mobile */
    .note-buttons-container,
    .note-keys,
    .note-buttons-accidental-row,
    .note-buttons-natural-row {
        min-width: 320px;
    }

    .note-keys {
        margin-top: -0.5rem;
    }
}

/* TODO(PAT-028): Button font size 12px and min height 35px both below minimums - will trigger iOS zoom and poor touch targets */
@media (max-width: 480px) {
    :root {
        --button-font-size: 12px;
        --button-height: clamp(35px, 3vw, 50px);
    }

    .note-buttons-container,
    .note-keys,
    .note-buttons-accidental-row,
    .note-buttons-natural-row {
        min-width: 280px;
    }
}


/* Fretboard-specific game styling - moved from JavaScript injection */
/* Fretboard CSS Variables - Light/Dark Mode Support */

:root {
    /* Fretboard light mode colors - using semantic variables */
    --fretboard-bg-color: var(--color-fretboard-wood-light);
    --fretboard-fretboard-color: var(--color-fretboard-wood-dark);
    --fretboard-fret-color: var(--color-fretboard-fret);
    --fretboard-string-color: var(--color-fretboard-string-light);
    --fretboard-marker-color: var(--color-fretboard-marker-light);
    --fretboard-text-color: var(--text-color);

    /* Fretboard dot colors - using semantic variables */
    --fretboard-dot-normal-color: var(--color-music-dot-normal);
    --fretboard-dot-highlight-color: var(--color-music-dot-highlight);
    --fretboard-dot-border-color: var(--color-music-dot-border-light);

    /* Fretboard game UI colors - using semantic variables */
    --fretboard-correct-color: var(--color-success);
    --fretboard-incorrect-color: var(--color-danger);

    /* Fretboard game control elements */
    --game-control-height: 40px;
    --game-control-margin: 10px;
    --game-score-font-weight: bold;
    --game-message-min-height: 20px;
}

/* Fretboard dark mode colors */
[data-theme="dark"] {
    /* Dark mode music colors */
    --color-fretboard-wood-light: #2c2c2c;
    --color-fretboard-wood-dark: #1a1a1a;
    --color-fretboard-fret: #888888;

    /* Dark mode fretboard colors - using semantic variables */
    --fretboard-bg-color: var(--color-fretboard-wood-light);
    --fretboard-fretboard-color: var(--color-fretboard-wood-dark);
    --fretboard-fret-color: var(--color-fretboard-fret);
    --fretboard-string-color: var(--color-fretboard-string-dark);
    --fretboard-marker-color: var(--color-fretboard-marker-dark);
    /* Use dark text color for fretboard dot text in dark mode for better contrast against green dots */
    --fretboard-text-color: #333333;

    /* Fretboard dark mode dot colors - using semantic variables */
    --fretboard-dot-normal-color: var(--color-music-dot-normal);
    --fretboard-dot-highlight-color: var(--color-music-dot-highlight);
    --fretboard-dot-border-color: var(--color-music-dot-border-dark);

    /* Fretboard dark mode game UI colors - using semantic variables */
    --fretboard-correct-color: var(--color-success);
    --fretboard-incorrect-color: var(--color-danger);
}

/* Fretboard page basic styling */
[data-page-type="fretboard-page"] {
    color: var(--fretboard-text-color);
    transition: color 0.3s ease;
}

.fretboard-svg {
    background-color: var(--fretboard-bg-color);
    /* Covers background-color (theme change) and width (zoom) transitions (PAT-029 compliant) */
    transition: background-color 0.3s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#fretboard-container {
    position: relative;
}

/* Fretboard game control elements */
#gameControlDiv {
    position: relative;
    margin-top: var(--game-control-margin);
    height: var(--game-control-height);
}

/* PAT-032: Absolute positioning required for game UI overlay - values are intentional for layout */
#remainingDiv {
    position: absolute;
    left: 10px;
    top: 0px;
}

#replayDiv {
    position: absolute;
    left: 150px;
    top: 5px;
    font-weight: var(--game-score-font-weight);
    color: var(--fretboard-incorrect-color);
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

/* Replay button enabled state (PAT-009 compliant) */
#replayDiv[data-disabled="false"] {
    background-color: transparent;
}

/* Fretboard error message styling (PAT-009 compliant) */
.fretboard-error,
.skills-page-error {
    padding: var(--spacing-md);
    margin: var(--spacing-md);
    background-color: var(--color-error-bg, #ffeeee);
    border: 1px solid var(--color-error-border, #ffaaaa);
    border-radius: var(--border-radius);
    color: var(--color-error-text, #cc0000);
}

#scoreDiv {
    position: absolute;
    left: 35px;
    top: 20px;
    font-weight: var(--game-score-font-weight);
}

#scoreMessageDiv {
    position: relative;
    left: 10px;
    top: 0px;
    min-height: var(--game-message-min-height);
    transition: color 0.3s ease;
}

@media (min-width: 800px) {
    #scoreMessageDiv {
        width: 60%;
    }
}

@media (max-width: 799px) {
    #scoreMessageDiv {
        width: 90%;
    }
}

/* Score message state classes (PAT-009 compliant) */
#scoreMessageDiv.score-correct {
    color: var(--fretboard-correct-color);
}

#scoreMessageDiv.score-incorrect {
    color: var(--fretboard-incorrect-color);
}

/* Button answer feedback (PAT-009 compliant) — added/removed by JS with setTimeout */
[data-page-type="fretboard-page"] .note-button.feedback-correct,
[data-page-type="fretboard-page"] .labeled-button.feedback-correct,
[data-page-type="fretboard-page"] .number-button.feedback-correct {
    background-color: var(--fretboard-correct-color) !important;
}

[data-page-type="fretboard-page"] .note-button.feedback-incorrect,
[data-page-type="fretboard-page"] .labeled-button.feedback-incorrect,
[data-page-type="fretboard-page"] .number-button.feedback-incorrect {
    background-color: var(--fretboard-incorrect-color) !important;
}

/* Fretboard-specific container styling - minimal overrides to let JavaScript handle sizing */
/*[data-page-type="fretboard-page"] .note-buttons-container,*/
[data-page-type="fretboard-page"] .number-buttons-container,
[data-page-type="fretboard-page"] .labeled-buttons-container {
    border-radius: var(--border-radius-sm);
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
    background-color: var(--fretboard-bg-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;

    /* Let JavaScript positioning system handle all sizing naturally */
}

/* Fretboard-specific responsive styling removed - JavaScript positioning handles responsiveness naturally */

/* Feedback animations */
@keyframes game-button-pulse-correct {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.4);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes game-button-pulse-incorrect {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.02) rotate(-1deg);
    }

    75% {
        transform: scale(1.02) rotate(1deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Responsive design */
@media (max-width: 400px) {

    .number-buttons-row,
    .labeled-buttons-top-row,
    .labeled-buttons-bottom-row {
        /*   flex-wrap: wrap; */
    }

    .game-button {
        flex: 1 0 auto;
        /*   min-width: calc((100% - var(--spacing-xs) * 2) / 3);*/
    }
}

/* ===== NOTATION ADMIN STYLES ===== */
/* CSS classes replacing inline styles for improved separation of concerns */

.notation-admin-container {
    margin: var(--spacing-sm) 0; /* Any left or right margin is added to notationImageOrigWidth */
    max-width: 100%;
    width: auto;
    position: relative; /* Explicitly set so notationPositionDiv is relative to that corner */
}

.notation-admin-image {
    max-width: 100%;
    width: auto;
    height: auto;
    opacity: 0.9;
}

/* Notation UI Module - CSS classes replacing inline styles */
.notation-flex-container {
    display: flex;
    justify-content: left;
    width: 100%;
    position: relative;
    margin: 0 auto;
}

.notation-hotspot-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow clicks to pass through to image */
}

/* Notation hotspot dots — CSS-driven hover/focus effects (PAT-029 compliant) */
.notation-hotspot {
    position: absolute;
    left: var(--hotspot-left, 0);
    top: var(--hotspot-top, 0);
    width: max(5px, 0.625vw);
    height: max(5px, 0.625vw);
    border-radius: max(5px, 0.625vw);
    background-color: var(--notation-hotspot-bg, red);
    border: 2px solid var(--notation-hotspot-border, red);
    box-shadow: 2px 2px 6px var(--notation-hotspot-shadow, rgba(0, 0, 0, 0.6));
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
}
.notation-hotspot:hover,
.notation-hotspot:focus-visible {
    transform: translate(-50%, -50%) scale(1.2);
}
.notation-hotspot:focus-visible {
    box-shadow: 0 0 0 3px var(--notation-highlight-color, #007bff);
    outline: none;
}

/* Notation measure slot transition — suppressed during metronome playback (PAT-029 compliant) */
.notation-measure-slot {
    transition: background-position 0.2s ease;
}
.notation-measure-slot--playing {
    transition: none;
}

.notation-container-positioned {
    position: relative;
}

.notation-image-responsive {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    opacity: 1;
    image-rendering: auto;
}

/* Additional notation admin components */
.notation-admin-position-div {
    position: absolute;
    width: 12px;
    background-color: var(--color-neutral);
    opacity: 0.4;
}

.notation-admin-position-bar {
    position: absolute;
    width: 12px;
    background-color: var(--color-neutral);
    opacity: 0.4;
}

.notation-admin-highlighted-cell {
    position: absolute;
    background-color: lightgreen;
}

/* ================================
   SECTION - METRONOME COMPONENT STYLES
   ================================ */

.metronome {
    --metronome-text-color: var(--notation-text-color, var(--text-color));
    --metronome-highlight-color: var(--notation-highlight-color, var(--focus-color));
    --metronome-bg-color: var(--notation-bg-color, var(--bg-color));
    --metronome-border-color: var(--notation-border-color, var(--light-border));
    --metronome-spacing: var(--spacing-sm);
    --metronome-transition: var(--transition-speed) ease;
    
    position: relative;
    font-family: system-ui, sans-serif;
    color: var(--metronome-text-color);
    background-color: var(--metronome-bg-color);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--metronome-border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: auto;
    cursor: pointer;
    transition: background-color var(--metronome-transition),
                color var(--metronome-transition),
                border-color var(--metronome-transition),
                box-shadow var(--metronome-transition);
}

.metronome-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
    padding: var(--metronome-spacing);
    transition: transform var(--metronome-transition);
    width: clamp(70px, 15vw, 90px);
    min-width: 70px;
    max-width: 90px;
}

.metronome-container:hover {
    transform: scale(1.02);
}

.metronome-shoe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    position: relative;
}

.metronome-shoe {
    width: auto;
    height: 100%;
    max-height: 40px;
    object-fit: contain;
    transition: opacity var(--metronome-transition);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
}

.metronome-shoe[data-state="hidden"] {
    opacity: 0;
    pointer-events: none;
}

.metronome-text {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--metronome-transition);
}

.metronome-beat {
    font-size: var(--font-size-md);
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
    font-variant-numeric: tabular-nums;
}

.metronome-measure {
    font-size: var(--font-size-sm);
    font-family: 'Roboto Mono', monospace;
    font-variant-numeric: tabular-nums;
}

.metronome-tempo {
    font-size: var(--font-size-xs);
    color: var(--metronome-highlight-color);
    margin-top: var(--spacing-xs);
}

.metronome-loop {
    font-size: var(--font-size-xs);
    opacity: 0.9;
}

/* Small screen adjustments */
.metronome-small .metronome-container {
    width: clamp(60px, 12vw, 70px);
    min-width: 60px;
    max-width: 70px;
    padding: var(--spacing-xs);
}

.metronome-small .metronome-shoe-container {
    height: clamp(25px, 6vw, 30px);
}

.metronome-small .metronome-shoe {
    max-height: clamp(25px, 6vw, 30px);
}

.metronome-small .metronome-beat {
    font-size: var(--font-size-sm);
}

.metronome-small .metronome-measure {
    font-size: var(--font-size-xs);
}

.metronome-small .metronome-loop {
    font-size: var(--font-size-xs);
}

.metronome-small .metronome-tempo {
    font-size: var(--font-size-xs);
}

/* Keyboard accessibility */
.metronome:focus-visible {
    outline: 2px solid var(--metronome-highlight-color);
    outline-offset: 2px;
}

/* Explicitly remove any animation when playing */
.metronome[data-playing="true"] .metronome-beat {
    animation: none !important;
}

/* ===== FRETBOARD QUIZ GAME STYLES ===== */

/* Fretboard game container - leverages existing patterns */
.fretboard-game-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, 
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Breadcrumb styles for fretboard games */
.fretboard-game-breadcrumb {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    color: var(--color-neutral);
}

.fretboard-game-breadcrumb a {
    color: var(--focus-color);
    text-decoration: none;
}

.fretboard-game-breadcrumb a:hover {
    text-decoration: underline;
}

/* Header section for fretboard games */
.fretboard-game-header {
    margin-bottom: 1rem;
}

.fretboard-game-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

/* Dark mode support for fretboard games - uses global semantic variables */
[data-theme="dark"] .fretboard-game-container {
    /* Uses global semantic color variables from mystyle.css */
}

/* Media queries for responsive fretboard game layout */
@media (max-width: 768px) {            
    .fretboard-game-navigation-buttons {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .fretboard-game-title {
        font-size: 1.1rem;
    }
}

/* ===== HOTSPOT PAGE STYLES ===== */
/* Hotspot Page CSS Variables - Light/Dark Mode Support */

:root {
    /* Base light mode colors for hotspot pages */
    --hotspot-bg-color: var(--bg-color);
    --hotspot-text-color: var(--text-color);
    --hotspot-heading-color: var(--text-color);
    --hotspot-border-color: var(--light-border);
    --hotspot-link-color: var(--link-color);
    --hotspot-link-hover-color: var(--button-primary-hover);
    
    /* Images */
    --hotspot-image-bg: var(--bg-color);
    --hotspot-image-border: var(--light-border);
    
    /* Container */
    --hotspot-container-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --hotspot-transition-time: var(--transition-speed);
}

/* Dark mode colors for hotspot pages */
[data-theme="dark"] [data-page-type="hotspot-page"] {
    --hotspot-bg-color: var(--bg-color);
    --hotspot-text-color: var(--text-color);
    --hotspot-heading-color: var(--text-color);
    --hotspot-border-color: var(--light-border);
    --hotspot-link-color: var(--link-color);
    --hotspot-link-hover-color: var(--button-primary-hover);
    
    /* Images */
    --hotspot-image-bg: #ffffff; /* Keep white bg for images in dark mode */
    --hotspot-image-border: var(--light-border);
    
    /* Container */
    --hotspot-container-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Base container styling */
[data-page-type="hotspot-page"] {
    color: var(--hotspot-text-color);
    background-color: var(--hotspot-bg-color);
    transition: color var(--hotspot-transition-time) ease,
                background-color var(--hotspot-transition-time) ease;
}

/* Main container */
.hotspot-page-container {
    margin: var(--spacing-lg) auto;
    max-width: 800px;
    padding: var(--spacing-lg);
    background-color: var(--hotspot-bg-color);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--hotspot-border-color);
    box-shadow: var(--hotspot-container-shadow);
    transition: background-color var(--hotspot-transition-time) ease,
                color var(--hotspot-transition-time) ease,
                border-color var(--hotspot-transition-time) ease,
                box-shadow var(--hotspot-transition-time) ease;
}

/* Title */
.hotspot-page-title {
    color: var(--hotspot-heading-color);
    margin-top: 0;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--hotspot-border-color);
    transition: color var(--hotspot-transition-time) ease,
                border-color var(--hotspot-transition-time) ease;
    font-size: var(--font-size-lg);
}

/* Content area */
.hotspot-page-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Images */
.hotspot-page-images {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.hotspot-page-image-wrapper {
    background-color: var(--hotspot-image-bg);
    border: 1px solid var(--hotspot-image-border);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    max-width: 100%;
    transition: border-color var(--hotspot-transition-time) ease;
}

.hotspot-page-image {
    max-width: 100%;
    height: auto;
    display: block;
    filter: none !important; /* Prevent dark mode inversion */
}

/* Images with data-no-invert should never be inverted in any theme */
img[data-no-invert="true"] {
    filter: none !important;
}

/* Failed image message */
.image-error-message {
    padding: var(--spacing-lg);
    color: var(--color-danger);
    text-align: center;
}

/* Text content */
.hotspot-page-text {
    color: var(--hotspot-text-color);
    line-height: 1.6;
    transition: color var(--hotspot-transition-time) ease;
}

/* List styling */
.hotspot-page-text ul,
.hotspot-page-text ol {
    padding-left: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.hotspot-page-text li {
    margin-bottom: var(--spacing-xs);
}

/* Link styling */
.hotspot-page-text a {
    color: var(--hotspot-link-color);
    text-decoration: none;
    transition: color var(--hotspot-transition-time) ease;
}

.hotspot-page-text a:hover {
    text-decoration: underline;
    color: var(--hotspot-link-hover-color);
}

/* Error message */
.hotspot-page-error {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-danger);
    margin: var(--spacing-lg) auto;
    max-width: 800px;
}

/* Dark mode error styling - uses semantic variables */
[data-theme="dark"] .hotspot-page-error {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
    border-color: var(--color-danger);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .hotspot-page-container {
        padding: var(--spacing-md);
        margin: var(--spacing-sm);
    }
    
    .hotspot-page-images {
        flex-direction: column;
        align-items: center;
    }
}

/* ================================
   SECTION - FRETBOARD GAME UI
   ================================ */

/* PAT-032: Duplicate definitions removed - using earlier definitions at lines 424 and 439.
   Button container styles are defined once and reused for consistency. */

/* Responsive adjustments aligned with mystyle.css breakpoints */
/* TODO(PAT-028): --button-height 2rem (~32px) below 44px minimum and --button-font-size 0.8rem (~13px) below 16px - may trigger iOS zoom and poor touch targets at 768px */
@media (max-width: 768px) {
    .number-buttons-container,
    .labeled-buttons-container {
        --button-height: 2rem;
        --button-font-size: 0.8rem;
    }

    .number-button,
    .labeled-button {
        padding: 0.25rem 0.5rem;
    }
}

/* TODO(PAT-028): --button-height 1.8rem (~29px) below 44px minimum and --button-font-size 0.7rem (~11px) below 16px - will trigger iOS zoom and poor touch targets at 576px */
@media (max-width: 576px) {
    .number-buttons-container,
    .labeled-buttons-container {
        --button-height: 1.8rem;
        --button-font-size: 0.7rem;
    }

    .number-button,
    .labeled-button {
        padding: 0.25rem 0.25rem;
    }
}

/* PAT-032: Music-specific button styles - appropriately located in music site CSS */
/* ===== MUSIC/GUITAR UI COMPONENTS ===== */

/* Game-specific button variant for music/guitar UI */
/* TODO(PAT-028): min-height clamp min 32px below 44px and font-size clamp min 12px below 16px - poor touch targets and iOS zoom risk at small viewports */
.btn-game {
    position: absolute;
    min-width: clamp(40px, 8vw, 80px);
    min-height: clamp(32px, 6vw, 44px);
    padding: var(--spacing-xs);
    font-size: clamp(12px, 2.5vw, 14px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: var(--border-radius-md);
    background: var(--button-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-game:hover {
    background: var(--button-primary-hover);
    transform: translateY(-1px);
}

.btn-game:active {
    transform: translateY(1px);
}

.btn-game:disabled {
    background: var(--button-disabled);
    cursor: not-allowed;
    transform: none;
}

/* Touch optimization for game buttons */
@media (hover: none) and (pointer: coarse) {
    .btn-game {
        min-height: 44px; /* iOS/Android minimum touch target */
        min-width: 44px;
    }
    .btn-game:active {
        transform: scale(0.95);
        background: var(--button-primary-hover);
    }
}

/* PAT-032: Music-specific container with fretboard-specific styling - appropriately site-specific */
/* Music-specific container for guitar/music UI components */
.container-music {
    background-color: var(--light-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.container-music:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Dark mode support */
[data-theme="dark"] .container-music {
    background-color: var(--color-neutral-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .container-music:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Special inversion for fretboard/chord notation images */
[data-theme="dark"] img[data-fretboard-notation="true"] {
    filter: invert(0.9) hue-rotate(180deg) brightness(0.9) contrast(1.2) !important;
}

/* Quiz fretboard settings */
.quiz-fretboard-settings {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.quiz-fretboard-title {
    font-size: var(--font-size-md);
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-color);
}

.quiz-fretboard-info {
    font-size: var(--font-size-xs);
    margin: var(--spacing-sm) 0 0 0;
    opacity: 0.7;
    color: var(--color-neutral);
}

/* ================================
   SECTION - SKILLS PAGE STYLES
   ================================ */

.skills-page-separator {
    margin: calc(var(--spacing-xs) * 1.25) 0;
    height: 1px;
    width: 100%;
    max-width: 640px;
    background-color: var(--text-color);
    opacity: 0.3;
}

/* Overall progress section */
.skills-page-overall-row {
    margin: clamp(8px, 2vw, 10px) clamp(4px, 1vw, 5px) clamp(12px, 3vw, 15px) clamp(4px, 1vw, 5px);
    padding: clamp(6px, 1.5vw, 8px) clamp(12px, 3vw, 15px) clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 15px);
    border-radius: var(--border-radius-lg);
    background-color: var(--light-bg);
    border: 1px solid var(--light-border);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

[data-theme="dark"] .skills-page-overall-row {
    background-color: var(--header-bg);
    border-color: var(--light-border);
}

.skills-page-overall-title-row {
    font-weight: bold;
    font-size: clamp(var(--font-size-md), 2.5vw, 1.1rem);
}

.skills-page-overall-progress-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.skills-page-overall-progress-row .progress-bar {
    height: 20px;
    margin: 0;
    flex: 1;
    max-width: 200px;
    background-color: var(--bg-color);
}

.skills-page-score-text {
    margin: 0;
    min-width: 35px;
    font-size: var(--font-size-sm);
}

.skills-page-link {
    margin-right: calc(var(--spacing-sm) * 1.5);
}

/* Data table */
.skills-table {
    /* Base table styling provided by .table-base */
    /* Ensure width inheritance from base class is not overridden */
    width: 100%;
}

/* Table headers */

[data-theme="dark"] .skills-table th {
    background-color: var(--header-bg);
    border-bottom-color: var(--light-border);
}

.skills-table th:hover {
    background-color: var(--toggle-bg);
}

[data-theme="dark"] .skills-table th:hover {
    background-color: var(--hover-bg);
}

/* Table cells */
.skills-table td {
    /* Base cell styling provided by .table-cell-base */
    vertical-align: middle;
}

[data-theme="dark"] .skills-table td {
    border-bottom-color: var(--light-border);
}

/* Skill title styling */
.skill-title {
    cursor: pointer;
    color: var(--focus-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.skill-title:hover {
    color: var(--text-color);
}

/* Goal star */
.goal-star {
    /* Uses .goal-star-base from mystyle.css */
}

.goal-star-empty {
    /* Uses .goal-star-base-empty from mystyle.css */
}

/* Search container */
.search-page-content-wrapper .search-container {
    margin: var(--spacing-md) 0;
    max-width: 600px;
}

/* Mobile responsive styles */
@media (max-width: 600px) {      
    .skills-page-overall-title-row {
        font-size: var(--font-size-md);
    }
    
    .skills-page-overall-progress-row .progress-bar {
        width: 50%;
    }

    /* Hide the table header in mobile view */
    .skills-table thead {
        display: none;
    }
    
    /* Change table display from table to block */
    .skills-table,
    .skills-table tbody {
        display: block;
        width: 100%;
    }
    
    /* Transform rows into cards with two rows - uses .mobile-card-base */
    .skills-table tr {
        /* Card styling provided by .mobile-card-base */
    }
    
    [data-theme="dark"] .skills-table tr {
        box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
    }
    
    /* Reset table cell styling */
    .skills-table td {
        border: none;
        padding: 0;
    }
    
    /* First row - Skill title and goal star */
    .skills-table td:nth-child(2) {
        width: calc(100% - 50px); /* Make room for star */
        order: 1;
        font-size: clamp(16px, 4vw, 18px);
        font-weight: bold;
        margin-bottom: clamp(8px, 2vw, 10px);
        padding-right: clamp(8px, 2vw, 10px);
    }

    .skills-table td:nth-child(4) {
        order: 2;
        width: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    .skills-table td:nth-child(4) .goal-star {
        font-size: clamp(1.5rem, 4vw, 1.75rem);
    }
    
    /* Second row - Progress bar and chart link */
    .skills-table td:nth-child(1) {
        order: 3;
        width: 65%;
        display: flex;
        align-items: center;
    }
    
    .skills-table td:nth-child(1) .progress-bar {
        width: calc(100% - 40px); /* Make room for percentage */
        min-width: 100px;
    }
    
    .skills-table td:nth-child(1) .progress-text {
        margin-left: var(--spacing-xs);
        min-width: 30px;
        text-align: right;
    }
    
    .skills-table td:nth-child(3) {
        order: 4;
        width: 35%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    
    .skills-table td:nth-child(3) .skills-page-link {
        margin: 0;
        font-size: var(--font-size-sm);
    }
}

/* ================================
   SECTION - SONGLIST PAGE STYLES
   ================================ */

/* Songlist variant */
.testout-toggle-songlist {
    justify-content: flex-start; /* Left justify instead of center */
    padding: 0;
    margin: var(--spacing-sm) 0;

    /* No background - inherits from parent */
}

.testout-toggle-songlist .testout-toggle-label {
    font-size: var(--font-size-sm);
    opacity: 0.8; /* Slightly muted */
}   

/* Table container */
.songlist-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
}

.songlist-table {
    /* Base table styling provided by .table-base */
    width: 100%; /* Explicit width for proper display */
    min-width: 600px; /* Ensure minimum width to show all columns */
}

/* Sort buttons */
.sort-buttons {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Sort buttons label - prefer using .control-label class from mystyle.css */
/* This provides fallback styling for labels without .control-label */
.sort-buttons label:not(.control-label) {
    font-weight: 600;
    margin-right: var(--spacing-md);
    color: var(--text-color);
}

.sort-buttons button {
    background-color: var(--light-bg);
    border: 1px solid var(--light-border);
    padding: var(--spacing-sm) clamp(10px, 2.5vw, 12px);
    margin-right: clamp(8px, 2vw, 10px);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

[data-theme="dark"] .sort-buttons button {
    background-color: var(--header-bg);
    border-color: var(--light-border);
}

.sort-buttons button:hover {
    background-color: var(--toggle-bg);
}

[data-theme="dark"] .sort-buttons button:hover {
    background-color: var(--hover-bg);
}

.sort-buttons button.active {
    background-color: var(--focus-color);
    color: white;
    border-color: var(--focus-color);
}

/* Table headers */
.songlist-table th {
    /* Base header styling provided by .table-header-base */
}

.songlist-table th[data-sort="artist"] {
    width: 4vw; /* make Artist column narrower than natural */
}

[data-theme="dark"] .songlist-table th {
    background-color: var(--header-bg);
    border-bottom-color: var(--light-border);
}

.songlist-table th:hover {
    background-color: var(--toggle-bg);
}

[data-theme="dark"] .songlist-table th:hover {
    background-color: var(--color-neutral-dark);
}

/* Table cells */
.songlist-table td {
    /* Base cell styling provided by .table-cell-base */
    vertical-align: middle;
}

[data-theme="dark"] .songlist-table td {
    border-bottom-color: var(--light-border);
}

/* Difficulty badges */
.difficulty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px clamp(8px, 2vw, 10px);
    border-radius: var(--border-radius-lg);
    font-size: clamp(10px, 2vw, 12px);
    font-weight: bold;
    text-transform: uppercase;
}

.difficulty-easy {
    background-color: var(--color-success);
    color: white;
}

.difficulty-medium {
    background-color: var(--color-warning);
    color: black;
}

.difficulty-hard {
    background-color: var(--color-danger);
    color: white;
}

/* Song title styling */
.song-title {
    cursor: pointer;
    color: var(--focus-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.song-title:hover {
    color: var(--text-color);
}

/* Video links */
.video-links {
    display: flex;
    gap: clamp(8px, 2vw, 10px);
    align-items: center;
    min-height: 22px;
}

/* Tablet/narrow desktop responsive table */
@media (max-width: 768px) {
    .songlist-table {
        font-size: var(--font-size-sm);
    }
    
    /* Make columns more flexible and ensure table fits */
    .songlist-table th,
    .songlist-table td {
        padding: var(--spacing-sm) var(--spacing-xs);
        vertical-align: top;
        min-width: 0;
    }
    
    /* Adjust specific column widths for better fit */
    .songlist-table th[data-sort="artist"] {
        width: 12vw; /* Increase from 4vw to prevent overcrowding */
    }
    
    /* Make progress column narrower */
    .songlist-table th:nth-child(1),
    .songlist-table td:nth-child(1) {
        width: 15vw;
        min-width: 80px;
    }
    
    /* Videos column should be narrower but visible */
    .songlist-table th:nth-child(6),
    .songlist-table td:nth-child(6) {
        width: 15vw;
        min-width: 70px;
    }
    
    /* Ensure video links wrap if needed */
    .video-links {
        flex-direction: column;
        gap: var(--spacing-xs);
        align-items: flex-start;
    }
    
    /* Make video link text smaller */
    .video-links a {
        font-size: var(--font-size-xs);
        line-height: 1.2;
    }
    
    /* Ensure table doesn't overflow container */
    .songlist-table {
        table-layout: fixed;
        width: 100%;
    }
    
    /* Table wrapper provides horizontal scroll if needed */
    .songlist-table-wrapper {
        overflow-x: auto;
        border: 1px solid var(--light-border);
        border-radius: var(--border-radius);
    }
    
    /* Make song titles and artists wrap if needed */
    .songlist-table td:nth-child(2),
    .songlist-table td:nth-child(3) {
        word-wrap: break-word;
        white-space: normal;
        overflow: hidden;
        line-height: 1.2;
    }
}


/* Mobile card layout */
@media (max-width: 600px) {
    /* Remove horizontal scroll for mobile card layout */
    .songlist-table-wrapper {
        overflow-x: visible;
        border: none;
        border-radius: 0;
    }
    
    /* Hide the table header in mobile view */
    .songlist-table thead {
        display: none;
    }
    
    /* Change table display from table to block */
    .songlist-table,
    .songlist-table tbody {
        display: block;
        width: 100%;
        min-width: 0; /* Remove minimum width for mobile */
    }
    
    /* Transform rows into cards - uses .mobile-card-base */
    .songlist-table tr {
        /* Card styling provided by .mobile-card-base */
        margin-bottom: clamp(16px, 4vw, 20px); /* Unique spacing for songlist */
    }
    
    [data-theme="dark"] .songlist-table tr {
        box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
    }
    
    /* Reset table cell styling */
    .songlist-table td {
        border: none;
        padding: var(--spacing-xs) 0;
    }
    
    /* Song title - First row, takes full width */
    .songlist-table td:nth-child(2) {
        width: 100%;
        order: 1;
        font-size: clamp(16px, 4vw, 18px);
        font-weight: bold;
        margin-bottom: var(--spacing-xs);
        padding-right: 40px; /* Make space for the goal star */
    }
    
    /* Artist name - Second row, takes full width */
    .songlist-table td:nth-child(3) {
        width: 100%;
        order: 2;
        font-size: clamp(14px, 3.5vw, 16px);
        color: var(--text-color);
        margin-bottom: var(--spacing-sm);
    }
    
    /* Difficulty badge */
    .songlist-table td:nth-child(4) {
        order: 3;
        padding-right: clamp(8px, 2vw, 10px);
        display: flex;
        align-items: center;
    }
    
    /* Progress bar */
    .songlist-table td:nth-child(1) {
        order: 4;
        display: flex;
        align-items: center;
        flex: 1;
    }
    
    /* Make progress bar fit available space - same approach as skills page */
    .songlist-table .progress-bar {
        width: calc(100% - 40px); /* Make room for percentage text */
        min-width: 60px;
        height: 10px;
        margin: 0;
        display: inline-block;
        vertical-align: middle;
    }
    
    .songlist-table .progress-bar-fill {
        height: 10px;
    }
    
    .songlist-table .progress-text {
        margin-left: var(--spacing-xs);
        min-width: 30px;
        text-align: right;
    }
    
    /* Video links - Bottom row */
    .songlist-table td:nth-child(6) {
        width: 100%;
        order: 5;
        margin-top: var(--spacing-sm);
    }
    
    /* Goal star - Position in the top right */
    .songlist-table td:nth-child(5) {
        position: absolute;
        top: clamp(10px, 2.5vw, 12px);
        right: clamp(10px, 2.5vw, 12px);
        order: 0;
        padding: 0;
    }

    .songlist-table td:nth-child(5) .goal-star {
        font-size: clamp(1.5rem, 4vw, 1.75rem);
    }
}

/* Custom scrollbar for hotspot content — rules consolidated into mystyle.css */

/* Hotspot footer styling */
.hotspot-footer {
    padding: var(--spacing-md) 0 0 0;
    margin-top: var(--spacing-md);
    border-top: 1px solid var(--light-border);
    text-align: center;
    flex-shrink: 0;
}

/* ================================
   SECTION - PLAY OPTIONS DIALOG STYLES
   ================================ */

/* Play options dialog - Uses existing modal system and base classes */
.play-options-body {
    padding: var(--spacing-xs);
}

/* Uses .form-group base class pattern */
.play-options-section {
    margin-bottom: var(--spacing-md);
}

.play-options-section:last-child {
    margin-bottom: 0;
}

/* Uses .form-label base class styling */
.play-options-section label,
.play-options-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-color);
}

/* Radio group using .input-section pattern */
.play-options-radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

/* Enhanced radio using .radio-pair.inline base class */
.play-options-radio {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    margin-bottom: 0;
}

.play-options-radio input[type="radio"] {
    margin: 0;
    margin-right: var(--spacing-xs);
    vertical-align: middle;
    flex-shrink: 0;
}

.play-options-radio span {
    font-weight: normal;
    vertical-align: middle;
    line-height: 1.2;
}

/* Tempo control using .input-section pattern */
.tempo-control {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.tempo-target-info {
    font-size: var(--font-size-xs);
    color: var(--list-marker-color);
    margin-top: var(--spacing-xs);
}

/* Checkbox styling similar to .radio-pair.inline */
.play-options-checkbox {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    font-weight: normal;
    margin: 2px 0;
}

.play-options-checkbox input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
    flex-shrink: 0;
}

.play-options-checkbox span {
    font-weight: normal;
    vertical-align: middle;
    line-height: 1.2;
}

/* Loop control using flexbox patterns */
.play-options-loop-control {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
}

.play-options-loop-count {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.play-options-loop-count.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Loop count input following form input patterns */
.play-options-loop-count input {
    width: 50px;
    padding: 6px var(--spacing-xs);
    text-align: center;
    margin: 2px;
    /* All other styling inherited from base input {} rule */
}

/* Responsive adjustments following page-styles patterns */
@media (max-width: 480px) {
    .play-options-section label,
    .play-options-label {
        font-size: var(--font-size-sm);
    }
    
    .play-options-checkbox span,
    .play-options-radio span {
        font-size: var(--font-size-sm);
    }
}

/* Modal container */
.goals-modal-container {
    position: relative;
    max-height: 80vh;
    max-width: 800px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.goals-header {
    margin: 0.5rem 0;
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.goals-title {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
}

.goals-link {
    color: var(--focus-color);
    text-decoration: none;
    margin-right: 0.75rem;
}

.goals-link:hover {
    text-decoration: underline;
}

/* Settings section */
.goals-settings {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .goals-settings {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.goals-settings-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.goals-settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.goals-settings-label {
    margin-right: 0.5rem;
}

.goals-dropdown {
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
}

[data-theme="dark"] .goals-dropdown {
    border-color: rgba(255, 255, 255, 0.2);
}

.goals-checkbox {
    margin-right: 0.5rem;
    accent-color: var(--focus-color);
}

/* Dashboard */
.goals-dashboard {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

[data-theme="dark"] .goals-dashboard {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Progress overview */
.goal-progress-overview {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .goal-progress-overview {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.goal-progress-bar-container {
    height: 24px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    margin: 0.5rem 0;
    display: flex;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .goal-progress-bar-container {
    border-color: rgba(255, 255, 255, 0.1);
}

.goal-progress-bar-container .goal-progress-segment {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    transition: width 0.3s ease;
}

.goals-segment-green {
    background-color: var(--color-success);
}

.goals-segment-yellow {
    background-color: var(--color-warning);
    color: rgba(0, 0, 0, 0.8);
}

.goals-segment-red {
    background-color: var(--color-danger);
}

/* Goals table */
.goals-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .goals-table {
    border-color: rgba(255, 255, 255, 0.1);
}

.goals-table thead th {
    text-align: left;
    padding: var(--spacing-md);
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .goals-table thead th {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.goals-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .goals-table tbody tr {
    border-color: rgba(255, 255, 255, 0.1);
}

.goals-table tbody tr:last-child {
    border-bottom: none;
}

.goals-table td {
    padding: 12px 15px;
}

.goals-table tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .goals-table tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Goal item */
.goals-activity-title {
    font-weight: 500;
}

.goals-title-link {
    color: var(--focus-color);
    text-decoration: none;
    cursor: pointer;
}

.goals-title-link:hover {
    text-decoration: underline;
}

.goals-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.goals-action-link {
    color: var(--focus-color);
    text-decoration: none;
    cursor: pointer;
}

.goals-action-link:hover {
    text-decoration: underline;
}

/* Goal details panel */
.goal-details-panel {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

[data-theme="dark"] .goal-details-panel {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.goal-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: var(--spacing-xs);
}

.goal-details-title {
    font-size: var(--font-size-lg);
    font-weight: bold;
    margin: 0;
    padding-right: 2rem;
}

.goal-details-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: var(--font-size-lg);
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
}

.goal-details-close:hover {
    opacity: 1;
}

.goal-settings-form {
    margin-bottom: 1.5rem;
}

.goal-settings-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.goal-numeric-input {
    width: 80px;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .goal-numeric-input {
    border-color: rgba(255, 255, 255, 0.2);
}

.chart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    max-width: 800px;
    background-color: var(--chart-container-bg, var(--bg-color));
    color: var(--chart-container-text, var(--text-color));
    transition: background-color 0.3s ease;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
    padding: var(--spacing-sm);
}

.chart-wrapper {
    flex: 1 1 300px;
    min-height: 250px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem;
    background-color: var(--bg-color);
}

[data-theme="dark"] .chart-wrapper {
    border-color: rgba(255, 255, 255, 0.1);
}

.goals-button {
    padding: 0.5rem 1rem;
    background-color: var(--focus-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.goals-button:hover {
    opacity: 0.9;
}

.goals-button-secondary {
    background-color: transparent;
    border: 1px solid var(--focus-color);
    color: var(--focus-color);
}

.goals-button-secondary:hover {
    background-color: rgba(77, 144, 254, 0.1);
}

[data-theme="dark"] .goals-button-secondary:hover {
    background-color: rgba(93, 159, 255, 0.1);
}

.goals-button-danger {
    background-color: var(--color-danger);
}

.goals-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.goals-empty-message {
    padding: 2rem;
    text-align: center;
    color: var(--text-color);
    font-style: italic;
}

/* Notification settings */
.goals-notifications {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .goals-notifications {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.goals-notifications-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Footer */
.goals-footer {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-top: auto;
}

/* Close button for modal view */
.goals-close-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.goals-close-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .goals-close-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Chart empty message */
.chart-empty-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-style: italic;
    font-size: var(--font-size-md);
    color: var(--text-color);
    opacity: 0.7;
    text-align: center;
    padding: var(--spacing-lg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .goals-table th:nth-child(2),
    .goals-table td:nth-child(2) {
        display: none;
    }

    .goals-settings-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .goal-settings-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .goals-modal-container {
        max-width: 95%;
        max-height: 85vh;
    }
}

@media (max-width: 576px) {
    .goals-table th:nth-child(2),
    .goals-table td:nth-child(2),
    .goals-table th:nth-child(3),
    .goals-table td:nth-child(3) {
        display: none;
    }

    .goals-table td {
        padding: 10px;
    }

    .goals-activity-title {
        font-size: 0.9rem;
    }

    .goal-details-title {
        font-size: 1rem;
    }
}

