html, body, footer, header {
    max-width: 600px;
}

html {
    height: 100%;
    margin: auto;
    padding: 0;
    /* max-width: 425px; */
    background-color: #000; /* Ensure the background color covers the entire viewport */
}

body {
    background-color: whitesmoke;
    font-family: sans-serif;
    margin: 0px;
    margin-bottom: 15px;
    font-size: 16px;
    background-color: #fff;
    /* margin-top: 50px; */
    word-break: break-word;
    /* padding-top: env(safe-area-inset-top); Add padding to account for the floating island */
}

header, footer {
    background-color: #3d4242;
    color: ghostwhite;
}

header {
    height: 50px;
    line-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; 
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}

footer {
    height: 80px;
    width: 100%;
    position: fixed;
    bottom: 0px;
    font-size: 0.9em;
    line-height: 4em;
    /* max-width: 425px; */
}

footer.warning {
    height: 50px;
    bottom: 80px;
    background-color: wheat;
    color: #311b1b;
    text-indent: 20px;
    display: none;
}

footer.warning .dismiss-warning {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 1.2em;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

footer.warning .dismiss-warning:hover {
    opacity: 1;
}

footer table {
    width: 100%;
    font-size: 1.7em;
    font-weight: 800;
    text-align: center;
}

.la-spotify {
    font-size: 1em;
}

a:any-link {
    text-decoration: none;
    color: darkslategray;
}

ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

p {
    margin: 0;
}

#loading {
    display: none;
    position: fixed;
    z-index: 9999;
    overflow: visible;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: black;
    opacity: 0.7;
    color: white;
    font-size: 2.4em;
    text-align: center;
    padding-top: 100%;
    padding-bottom: 100%;
}

.left {
    position: absolute;
    left: 15px;
    font-size: 2em;
}

.right {
    position: absolute;
    right: 15px;
    font-size: 1.6em;
}

.float-left {
    float:left;
}

.no-break {
    word-break: normal;
}

#header-title {
    text-align: center;
    margin: 0;
    font-size: 1em;
}

.container {
    width: 100%;
/*    max-width: 600px;*/
    margin: 0 auto;
/*    background-color: #fff;*/
/*    min-height: 100vh;*/
    min-height: 85vh;
    display: inline-block;
    margin-bottom: 160px;
}

.header {
    position: relative;
    width: 100%;
}

.sticky-top {
    display: block;
    position: sticky;
    max-width: 100%;
    top: 50px;
    z-index: 10;
    background-color: #fff;
}

.attribution {
    color: #5e5b5b;
    font-size: 0.8em;
    line-height: 1.4em;
    font-family: sans-serif;
    margin: 15px 0px;
    text-align: center;
    display: inline-block;
    width: 100%;
}

.no-content {
    font-style: italic;
    color: #5e5b5b;
    font-size: 0.9em;
}

.infobox {
    background-color: lightyellow;
    padding: 20px;
    margin: 20px 0px;
    font-size: 0.9em;
    font-style: italic;
}

.artist-comment {
    font-size: 0.8em;
    margin-top: 5px;
    opacity: 0.6;
}

/**/

.block {
    padding: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #cdcdcd;
}

.block:last-of-type {
    border-bottom: 0;
    padding-bottom: 0px;
}

#class-notes {
    border-bottom: 0;
    padding-bottom: 0px;
}

.empty-block {
    padding-bottom: 5px;
}

.page-banner {
/*    background-color: antiquewhite;*/
    aspect-ratio: 1 / 0.75;
/*    aspect-ratio: 1 / 1;*/
    margin: 0px !important;

    overflow: hidden; 
    display: flex; 
    justify-content: center;
    align-items: center;
}

#play-song-info {
    position: sticky;
    background-color: #fff;
    top: 50px;
    /* width: 100%; */
    z-index: 10;
}

.page-info {
    display: grid;
/*    border-bottom: 1px solid #cdcdcd;*/
/*    padding-top: 15px;*/
    /* padding-bottom: 45px; */
}

.info-first {
    font-size: 1.6em;
    line-height: 1em;
    font-weight: 600;
}

.info-second {
    font-size: 1.3em;
    color: #5e5b5b;
    margin-top: 4px;
}

.info-third {
    font-size: 1em;
    color: #5e5b5b;
    margin-top: 2px;
}

.info-second i {
    font-size: 0.8em;
/*    margin-left: 5px;*/
}

.underline {
    text-decoration: underline;
    cursor: pointer;
}

/**/

.small-title {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 20px;
    display: block;
    text-transform: capitalize;
}

.credits-first i,
.small-title i {
    float: right;
}

/**/

.text {
    color: #5e5b5b;
    font-size: 1.0em;
    line-height: 1.4em;
    font-family: serif;
}

.text p{
    margin-bottom: 10px;
}

.short-bio {
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
}

/**/

.full-discography {
    margin-top: 15px;
}

.full-discography ul,
.short-discography ul {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}


.full-discography ul li,
.short-discography ul li {
    flex: 0 1 calc(50% - 10px);
    aspect-ratio: 1 / 1;
    margin-right: 15px;
    margin-bottom: 30px;
}

.full-discography ul li:nth-child(2n),
.short-discography ul li:nth-child(2n) {
    margin-right: 0;
}


/* Hide all items by default */
/*.short-credits-list li,*/
.short-discography li {
    display: none; 
}

/* Only display the first two items */
/* .short-credits-list li:nth-child(-n+2),*/
.short-discography li:nth-child(-n+2) {
    display: list-item;
}

.full-discography .square,
.short-discography .square {
    width: 100%; 
    min-height: 80%; /* temporary fix for lack of images */
/*    padding-top: 100%;*/
    background: antiquewhite;
    position: relative;
    margin-bottom: 10px;
    overflow: hidden; 
    display: flex; 
    justify-content: center;
    align-items: center;
}

.small-cover img,
.page-banner img,
.square img {
    width: 100%;
    height: 100%;
    object-fit: cover;

}

#search-results ul li p,
.full-discography ul li p,
.short-discography ul li p {
     display: inline;
}

.album-info {
    padding: 0px 2px;
    margin: 0;
}

.result-first,
.album-title {
    font-size: 1.0em;
    font-weight: 600;
    color: #5e5b5b;
}

.result-second,
.album-year {
    font-size: 1.0em;
    color: #5e5b5b;
}

/**/

.discography-list select,
.discography-release-list select,
.release-list select {
    margin-bottom: 20px;
    max-width: 215px;
    min-width: 140px;
    font-size: 0.9em;
    line-height: 1em;
    padding: 3px;
}

.short-release-list li {
    display: none;
}

.short-release-list li:nth-child(-n+2) {
    display: flex; 
}

.full-release-list li {
    display: flex;
}

.full-release-list li:not(:last-child),
.full-credits-list li:not(:last-child),
.short-release-list li:not(:last-child),
.short-credits-list li:not(:last-child) {
    margin-bottom: 20px;
}

.full-release-list span,
.full-credits-list span,
.short-release-list span,
.short-credits-list span {
    display: block;
    font-family: sans-serif;
/*    font-size: 0.9em;*/
}

.short-credits-list ul {
    text-indent: 15px;
}

.credits-first,
.song-first {
    font-weight: 600;
    color: #5e5b5b;
    padding-right: 15px;
    flex: 1;
    min-width: 0;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notes-full .song-first {
    font-size: 1.4em;
}

.comment {
    font-size: 0.9em;
    color: #5e5b5b;
    font-weight: 400;
}

.release-info,
.credits-second {
    font-size: 0.9em;
    margin-top:5px;
    color: #5e5b5b;
}

.credits-second > i {
    font-size: 0.8em;
    text-transform: capitalize;
}

.credits-third {
    font-size: 0.8em;
    font-weight: 600;
    margin-top:5px;
    color: #5e5b5b;

    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4; /* Limit text to two lines */
    line-clamp: 4; /* Standard property for compatibility */
    line-clamp: 4; /* Standard property for compatibility */
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%; /* Optional: Adjust width as needed */
    text-transform: capitalize;
}

/**/

.full-song-list ul {
    list-style-type: none; /* Remove default numbering */
    padding-left: 27px;
    counter-reset: custom-counter; /* Use custom counter */
}

/* Safari-compatible list numbering with flexbox children */
.full-song-list ul li {
    position: relative;
    counter-increment: custom-counter;
}

.full-song-list ul li::before {
    content: counter(custom-counter) ". ";
    position: absolute;
    left: -25px;
}

.full-song-list ul li {
    margin-bottom: 15px;
}

.song-second {
    color: #5e5b5b;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.notes-full .song-second {
    font-size: 1.6em;
}

.song-item i {
    margin-left: 10px;
    padding-top: 2px;
}

.song-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.song-left-column {
    flex: 1;
    min-width: 0;
    padding-right: 15px;
}

.song-right-column {
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
}

/**/

#search-results {
    padding: 0px 30px;
}

#search-results .small-title {
    border-bottom: 1px solid gray;
    margin-top: 30px;
    line-height: 2.2em;
}

.search-panel {
    margin-top: 40px;
    border-bottom: none;
    padding-bottom: 0;
}

.search-panel input {
    width: 100%;
    padding: 0;
    font-size: 1.4em;
    line-height: 1.8em;
    border: 1px solid #5e5b5b;
    border-radius: 15px;
    color: #5e5b5b;
    text-indent: 20px;
}

.search-panel form {
    position: relative;
}

.clear-button {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 4px;
    border: none;
    background-color: transparent;
    color: gray;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}

.see-more {
    font-size: 0.8em;
    text-align: center;
    text-decoration: underline;
}

/**/

.small-cover {
    aspect-ratio: 1 / 1;
    float: left;
    min-width: 140px;
    max-width:140px;
    margin-right: 15px;
    background-color: antiquewhite;
}

/* SPING YOURSELF */

.music-controls-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background-color: #fff;
    z-index: 1000;
    padding: 10px 0px;
    border-top: 1px solid #cdcdcd;
}

.music-controls {
    width: 100%;
    text-align: center;
    font-size: 3.2em;
}

.control-subtitle{
    font-size: 0.4em;
}

.time-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px
}

.time-display {
    font-size: 2em;
}

.active2 {
    color: #cdff40;
}

.active {
    background-color: lightgreen;
    padding: 5px;
    border: 2px solid #2e8b57;
    border-radius: 8px;
    margin: 5px 0;
}

.expiring {
    background-color: antiquewhite;
}

.class-full-note {
    cursor: pointer;
}

.song-left-column .song-first {
    display: block;
}

.secondary-instruction {
    font-size: 1.1em;
    color: #8a96a8;
    margin-top: 4px;
    display: block;
}

.song-right-column .song-second {
    display: block;
}

.note-time {
    font-size: 1.1em;
    color: #8a96a8;
    margin-top: 2px;
    display: block;
}

/* Timer display states */
.interpolating {
    color: #666;
}

/* Define the blinking animation */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Apply the animation to elements with the .active class */
.blink {
    animation: blink 1s steps(5, start) infinite;
}

.btn {
    color: black;
    background-color: #42d760;
    font-size: 1em;
    font-weight: 800;
    line-height: 1;
    border-radius: 500px;
    padding: 18px 48px 16px;
    /*transition-property: background-color;
    transition-duration: .3s;*/
    border-width: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: normal;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.block.page-info .btn:first-of-type{
    margin-top: 25px;
}

.btn-c2 {
    color: white;
    background-color: #c9062c;
}

.btn-c3 {
    background-color: transparent;
    border: 1px solid #3d4242;
    margin-top: 30px;
}

.btn i {
    font-weight: normal;
/*    font-size: 2em;*/
}

#footer-menu {
    margin-top: 4px;
}

#footer-menu i span {
    font-family: sans-serif;
    font-size: 0.5em;
}

.center {
    text-align: center;
}

.stronger {
    font-weight: 800;
}

.show {
    display: block !important;
}

#spotify-logout {
    font-size: 2em;
    position: absolute;
    right: 10px;
    bottom: 90px;
}

.link {
    cursor: pointer;
}

#modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    display: none;
}

#modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    z-index: 101;
}

#availableClassesDropdown {
    font-size: 1em;
    font-weight: 800;
    line-height: 1;
    border-radius: 500px;
    padding: 18px 30px 16px;
    border: 1px solid #c9062c;
    white-space: normal;
    cursor: pointer;
    margin: 10px 0px;
    width: 100%;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\25BE'; /* Unicode for downward arrow */
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* Allows clicks to pass through */
    font-size: 1.5em;
}

.select-wrapper select {
    width: 100%;
    padding-right: 30px; /* Space for the arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.note-builder-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#note-builder-panel {
    width: calc(50% - 20px);
    float: left;
    background-color: #1e2127;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#note-builder-json {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: #282c34;
    color: #abb2bf;
    border-radius: 6px;
    padding: 15px;
    margin: 0;
    overflow-x: auto;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2);
    line-height: 1.5;
    font-size: 0.9em;
    white-space: pre-wrap;
}

#note-builder-json .json-key {
    color: #e06c75;
}

#note-builder-json .json-string {
    color: #98c379;
}

#note-builder-json .json-number {
    color: #d19a66;
}

#note-builder-panel::before {
    content: 'JSON Notes';
    display: block;
    font-size: 0.8em;
    color: #8a96a8;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#note-builder-actions {
    width: 50%;
    float: left;
    border-left: 1px solid gray;
    padding-left: 10px;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Adjust the gap between buttons as needed */
    justify-content: center;
}

.button-container .btn {
    flex: 0 0 calc(33.33% - 10px); /* Three buttons per row */
    box-sizing: border-box; /* Ensure padding and border are included in the width */
    border-radius: 50%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.6em;
    transition: all 0.2s ease;
    max-width: 80px;
    min-width: 60px;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.button-container .btn:active {
    transform: scale(0.95);
    opacity: 0.8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.button-container .btn-full-width {
    flex: 1 1 100%; /* Make this button take the full width */
    border-radius: 25px;
    aspect-ratio: auto;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    #note-builder-panel, 
    #note-builder-actions {
        width: 100%;
        float: none;
        border-left: none;
        padding-left: 0;
    }
    
    #note-builder-actions {
        order: -1;
        margin-bottom: 20px;
    }
    
    .block {
        display: flex;
        flex-direction: column;
    }
    
    .note-builder-container {
        flex-direction: column;
        gap: 20px;
    }
    
    #note-builder-panel {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }
}

/* Sticky notes container */
.sticky-notes-container {
    display: flex;
    position: sticky;
    top: 50px; /* Accounts for the header height */
    background-color: #fff;
    z-index: 5;
    margin-bottom: 0;
    /* padding: 15px 0px; */
    border-bottom: 1px solid #cdcdcd;
}

/* Add a shadow to the sticky container when it's fixed */
.sticky-notes-container.is-sticky {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced Pill Selector Styles */
.pill-selector-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.pill-selector {
    display: flex;
    position: relative;
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 2px;
    width: 250px;
    border: 1px solid #d0d7de;
}

.pill-option {
    flex: 1;
    text-align: center;
    padding: 4px 12px;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
    border-radius: 4px;
    position: relative;
    user-select: none;
    font-size: 14px;
    color: #24292f;
}

.pill-option.pill-selected {
    color: #24292f;
}

.pill-slider {
    position: absolute;
    height: calc(100% - 4px);
    width: calc(50% - 4px);
    background-color: #ffffff;
    border-radius: 4px;
    transition: transform 0.2s ease;
    top: 2px;
    left: 2px;
    z-index: 1;
    box-shadow: 0 1px 2px rgba(31, 35, 40, 0.08);
    border: 1px solid rgba(31, 35, 40, 0.15);
}

/* Loading indicator styles */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #1DB954; /* Spotify green */
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Update notification */
.update-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1DB954; /* Spotify green */
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: bottom 0.3s ease-in-out;
    max-width: 90%;
    width: 400px;
}

.update-notification.visible {
    bottom: 20px;
}

.update-notification.hiding {
    bottom: -100px;
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-content i.la-sync-alt {
    font-size: 24px;
    margin-right: 15px;
}

.notification-content p {
    flex: 1;
    margin: 0;
}

.close-notification {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

.close-notification i {
    font-size: 18px;
}

/* Section title for owner view */
.section-title {
    /* text-align: center; */
    padding: 20px;
    color: #333;
    font-size: 1.3em;
    font-weight: 600;
    background-color: #fff;
}

/* Error message */
.error-message {
    padding: 20px;
    background-color: #fff0f0;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    color: #c00;
}

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
}

.compact-header .track-info {
    flex: 1;
}

.compact-header .time-display {
    text-align: right;
    font-size: 1.1em;
    font-weight: 500;
}

.compact-controls {
    padding-top: 0;
    margin-top: 0;
}

.compact-controls .music-controls {
    width: 100%;
    text-align: center;
    font-size: 2em;
    padding: 0;
    margin: 0;
}

.compact-controls .music-controls td {
    padding: 5px;
}

.note-builder-container {
    display: flex;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .note-builder-container {
        flex-direction: column;
    }
}

.download-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1em;
    padding: 10px 20px;
    border-radius: 6px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.download-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.download-btn i {
    font-size: 1.2em;
}

/* Playlist Selector Styles */
.playlist-selector {
    margin-bottom: 15px;
}

.playlist-dropdown {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #fff;
}

.warning-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #ffeeba;
}

.hidden {
    display: none;
}

/* AI Playlist Builder */
#notes-input {
    width: 100%;
    height: 200px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: monospace;
    resize: vertical;
    box-sizing: border-box;
}

#notes-input-panel {
    width: 100%;
}

.preview-container {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.preview-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

#preview-json {
    width: auto;
    max-height: 300px;
    overflow-y: auto;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 0.8em;   
    margin-bottom: 20px;
}

.preview-panel {
    margin-top: 15px;
}

.pill-selector-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.pill-selector {
    display: flex;
    position: relative;
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 2px;
    width: 250px;
}

.pill-option {
    flex: 1;
    text-align: center;
    padding: 4px 12px;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
    border-radius: 4px;
    position: relative;
    user-select: none;
    font-size: 14px;
    color: #24292f;
}

.pill-option.pill-selected {
    color: #24292f;
}

.pill-slider {
    position: absolute;
    height: calc(100% - 4px);
    width: calc(50% - 4px);
    background-color: #ffffff;
    border-radius: 4px;
    transition: transform 0.2s ease;
    top: 2px;
    left: 2px;
    z-index: 1;
    box-shadow: 0 1px 2px rgba(31, 35, 40, 0.08);
    border: 1px solid rgba(31, 35, 40, 0.15);
}

#track-selector-container {
    margin-bottom: 15px;
}

#preview-rendered .block {
    margin-top: 0;
    padding-top: 0;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

.warning-message {
    color: #e74c3c;
    margin-top: 5px;
    font-size: 0.9em;
}

/* JSON Editor Styles */
.json-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.code-editor {
    width: 100%;
    height: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: monospace;
    resize: vertical;
    box-sizing: border-box;
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-size: 0.9em;
    line-height: 1.5;
    tab-size: 2;
}

.btn-small {
    padding: 4px 10px;
    font-size: 12px;
    background-color: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    cursor: pointer;
    color: #24292f;
    transition: background-color 0.2s;
}

.btn-small:hover {
    background-color: #ddf4ff;
    border-color: #54aeff;
}

#json-editor-container {
    margin-top: 10px;
}

#json-display {
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

#btn-update-json {
    margin-top: 8px;
}

/* =======================
   Desktop View Styles
   ======================= */

/* Desktop-specific styles extending the existing mobile-first design */
html.desktop-view,
html.desktop-view body {
    max-width: none !important;
    background-color: #f5f5f5;
}

/* Hide footer and back button for desktop view */
html.desktop-view footer {
    display: none !important;
}

html.desktop-view #back {
    display: none !important;
}

/* Add logout button to header */
.desktop-header-actions {
    position: absolute;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-btn {
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

html.desktop-view header,
html.desktop-view footer {
    max-width: none;
}

html.desktop-view .container {
    max-width: none;
    width: 100vw;
    height: calc(100vh - 50px);
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
}

html.desktop-view .music-controls-container {
    max-width: none;
}

/* Desktop Player Info Header */
.desktop-player-info {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    padding: 15px 20px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 5;
}

.player-info-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.player-track-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.player-info-first {
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-info-second {
    font-size: 1.1em;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-info-second i {
    font-size: 0.8em;
    opacity: 0.7;
}

.player-time-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 120px;
}

.player-time-display {
    font-size: 1.3em;
    font-weight: 500;
    font-family: monospace;
    letter-spacing: 1px;
}

.player-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-status-indicator span {
    font-size: 0.9em;
    opacity: 0.8;
}

#desktop-status.playing::before {
    content: "▶";
    animation: pulse 2s infinite;
}

#desktop-status.paused::before {
    content: "⏸";
}

#desktop-status.stopped::before {
    content: "●";
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Desktop columns layout */
.desktop-columns {
    display: flex;
    flex: 1;
    height: 100%;
    background-color: #fff;
    border-radius: 8px;
    margin: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.column {
    flex: 1;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.column:last-child {
    border-right: none;
}

.column-header {
    background-color: #3d4242;
    color: white;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column-content {
    flex: 1;
    overflow-y: auto;
    background-color: #fff;
}

.item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    min-height: 48px;
}

.item:hover {
    background-color: #f8f9fa;
}

.item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #1976d2;
}

.item-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-subtitle {
    font-size: 0.9em;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #999;
    font-style: italic;
    flex-direction: column;
}

.empty-state i {
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.3;
}

.loading-item {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.notes-content {
    padding: 20px;
    line-height: 1.6;
}

.note-entry {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #1976d2;
}

.note-timestamp {
    font-weight: bold;
    color: #1976d2;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.note-instruction {
    color: #333;
}

.column-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

/* Header action buttons */
.notes-header-actions {
    display: flex;
    gap: 5px;
    margin-left: auto;
    margin-right: 10px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.header-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

.header-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modern note display matching the design */
.note-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
    min-height: 40px;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

.note-item:hover {
    background-color: #fafafa;
}

.note-item.editing {
    background-color: #fff3cd;
}

.note-position-controls {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.position-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
    width: 24px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
    touch-action: manipulation;
}

.position-btn:hover:not(:disabled) {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
    transform: scale(1.1);
}

.position-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.note-time-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 80px;
}

.note-time-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.note-time-dot.red {
    background-color: #ff5722;
}

.note-time-dot.green {
    background-color: #4caf50;
}

.note-time-dot.blue {
    background-color: #2196f3;
}

.note-time-dot.orange {
    background-color: #ff9800;
}

.note-time-display {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.3px;
}

.note-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.note-text {
    color: #333;
    line-height: 1.4;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 0;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.note-primary {
    display: block;
    color: #333;
    font-weight: 500;
}

.note-secondary {
    display: block;
    color: #757575;
    font-size: 0.9em;
    font-weight: 400;
    margin-top: 4px;
    font-style: italic;
}

.note-text:hover {
    background-color: rgba(25, 118, 210, 0.05);
}

.note-subtitle {
    color: #757575;
    font-size: 0.85em;
    font-weight: 400;
}

.note-text-input {
    border: 1px solid #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.time-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
    width: 24px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
    touch-action: manipulation;
}

.time-btn:hover:not(:disabled) {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
    transform: scale(1.05);
}

.time-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.note-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    opacity: 1;
    transition: opacity 0.2s;
}

.note-action-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.15s;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    touch-action: manipulation;
}

.note-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.note-action-btn.delete {
    border-color: #ffcdd2;
    color: #d32f2f;
}

.note-action-btn.delete:hover {
    background: #ffebee;
    border-color: #d32f2f;
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.2);
}

.note-action-btn.save {
    border-color: #c8e6c9;
    color: #2e7d32;
}

.note-action-btn.save:hover {
    background: #e8f5e8;
    border-color: #2e7d32;
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.2);
}

.note-action-btn.cancel {
    border-color: #ffe0b2;
    color: #f57c00;
}

.note-action-btn.cancel:hover {
    background: #fff3e0;
    border-color: #f57c00;
    box-shadow: 0 2px 4px rgba(245, 124, 0, 0.2);
}

.notes-list {
    position: relative;
}

.add-note-form {
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 2px solid #1976d2;
    display: none;
}

.add-note-form.active {
    display: block;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.time-input {
    width: 60px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.text-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.position-select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9em;
}

.changes-indicator {
    display: none;
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-bottom: 1px solid #ffeeba;
    font-size: 0.9em;
    text-align: center;
}

.changes-indicator.visible {
    display: block;
}

/* Responsive adjustments for player info */
@media (max-width: 1200px) {
    .desktop-player-info {
        margin: 5px;
        padding: 12px 15px;
    }

    .player-info-first {
        font-size: 1.2em;
    }

    .player-info-second {
        font-size: 1em;
    }

    .player-time-display {
        font-size: 1.1em;
    }
    
    .desktop-columns {
        margin: 5px;
    }

    .column-header {
        padding: 12px;
        font-size: 1em;
    }

    .item {
        padding: 10px 12px;
    }
}

/* Ensure mobile compatibility */
@media (max-width: 768px) {
    .player-info-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .player-time-controls {
        align-items: flex-start;
        flex-direction: row;
        gap: 15px;
    }
    
    .desktop-columns {
        flex-direction: column;
        height: auto;
    }

    .column {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 300px;
    }

    .column:last-child {
        border-bottom: none;
        max-height: none;
        flex: 2;
    }
}

/* Help Modal Styles - Slide-up/roll-up style */
.help-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.help-modal {
    width: 100%;
    max-width: 600px;
    background-color: white;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.help-modal-content {
    padding: 25px 20px;
}

.help-modal-title {
    font-size: 1.5em;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: #3d4242;
    text-align: center;
}

.help-form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.help-feedback-text {
    width: 100%;
    padding: 15px;
    border: 2px solid #3d4242;
    border-radius: 8px;
    font-size: 1em;
    font-family: sans-serif;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
}

.help-feedback-text:focus {
    outline: none;
    border-color: #c9062c;
}

.help-error-message {
    color: #c9062c;
    font-size: 0.9em;
    padding: 10px;
    background-color: #ffe6e6;
    border-radius: 5px;
    text-align: center;
}

.help-thanks-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.help-thanks-message {
    font-size: 1.2em;
    font-weight: 600;
    color: #3d4242;
    text-align: center;
    margin: 0;
}

/* Desktop view adjustments for help modal */
html.desktop-view .help-modal {
    max-width: 500px;
    border-radius: 20px;
    max-height: 70vh;
}

html.desktop-view .help-modal-backdrop {
    align-items: center;
}