.player-with-search {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    background-color: #eee;
    z-index: 99999;
    transition: transform .3s ease;
    animation: bounce1 .3s 2 ease alternate;
}

#player-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 80px;
    background: transparent;
    color: black;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid gainsboro;
}

div#thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 100%;
    z-index: -1;
    height: 80px;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Play / Pause */
#player-container #play-pause {
    cursor: pointer;
    text-indent: -999999px;
    width: 80px;
    height: 80px;
    position: relative;
    float: left;
    z-index: 2;
    background-repeat: no-repeat !important;
    background-position: center;
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    background-color: transparent;
}

div#thumb::after {
    position: absolute;
    content: "";
    width: 38px;
    height: 38px;
    top: 21px;
    border-radius: 50%;
    left: 20px;
    background-color: rgba(34, 35, 58, 0.2);
    background-color: #b8a07e99;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.5);
}

.play {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256' viewBox='0 0 256 256'%3E%3Cpath fill='white' d='M240 128a15.74 15.74 0 0 1-7.6 13.51L88.32 229.65a16 16 0 0 1-16.2.3A15.86 15.86 0 0 1 64 216.13V39.87a15.86 15.86 0 0 1 8.12-13.82a16 16 0 0 1 16.2.3l144.08 88.14A15.74 15.74 0 0 1 240 128Z'/%3E%3C/svg%3E");
}

#player-container #play-pause.pause {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M17.276 5.47c.435.16.724.575.724 1.039V17.49c0 .464-.29.879-.724 1.039a3.69 3.69 0 0 1-2.552 0A1.107 1.107 0 0 1 14 17.491V6.51c0-.464.29-.879.724-1.04a3.69 3.69 0 0 1 2.552 0Zm-8 0c.435.16.724.575.724 1.039V17.49c0 .464-.29.879-.724 1.039a3.69 3.69 0 0 1-2.552 0A1.107 1.107 0 0 1 6 17.491V6.51c0-.464.29-.879.724-1.04a3.69 3.69 0 0 1 2.552 0Z'/%3E%3C/svg%3E");
    background-size: 24px;
}

/* Timeline */
#timeline {
    width: 100%;
    height: 5px;
    background: #bebebe;
    float: left;
    z-index: 9;
    position: absolute;
}

#scrub {
    height: 5px;
    background-color: var(--paddle-color-accent);
    border: none;
    color: #fff;
    float: left;
}

#playhead {
    width: 5px;
    height: 5px;
    background: #f0d9d6;
}

/* Time */
.item-inner {
    display: block;
    float: left;
    padding-left: 15px;
    padding-top: 15px;
    padding-bottom: 9px;
    -ms-flex-item-align: stretch;
    -webkit-align-self: stretch;
    align-self: stretch;
    max-width: 60%;
}

#time-holder {
    font-size: 12px;
    margin-top: 5px;
}

div#is-right,
div#is-left {
    display: inline;
    bottom: auto;
    padding: 3px 7px;
    padding-left: 0;
}

/* Title */
.item-inner .item-title {
    -webkit-flex-shrink: 1;
    -ms-flex: 0 1 auto;
    flex: 0 1 auto;
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 14px;
    letter-spacing: 1px;
    font-weight: 300;
}

@media (min-width:768px) {
    .item-inner {
        max-width: 90%;
    }
}

.item-inner .item-subtitle {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 700;
    line-height: 16px;
}

/* Repeat */
.repeat-button {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 24px;
    right: 10px;
    border-radius: 30px;
    -webkit-border-radius: 30px;
    -moz-border-radius: 30px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    outline: 0;
    background-color: var(--paddle-color-accent);
}

.icon-repeat {
    border: none;
    overflow: auto;
    border-radius: 3px;
    cursor: pointer;
    height: 30px;
    width: 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13.5 2c-5.288 0-9.649 3.914-10.377 9h-3.123l4 5.917 4-5.917h-2.847c.711-3.972 4.174-7 8.347-7 4.687 0 8.5 3.813 8.5 8.5s-3.813 8.5-8.5 8.5c-3.015 0-5.662-1.583-7.171-3.957l-1.2 1.775c1.916 2.536 4.948 4.182 8.371 4.182 5.797 0 10.5-4.702 10.5-10.5s-4.703-10.5-10.5-10.5z"/></svg>') 5px center no-repeat;
    background-size: 24px;
    background-position: center;
    filter: invert(1);
    margin-left: -3px;
    margin-top: -3px;
}

.icon-repeat-again {
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"><path d="M8 6.012h-6.58l1.935-6.012 1.718 2.223c1.958-1.389 4.346-2.211 6.927-2.211 6.623 0 12 5.377 12 12s-5.377 11.988-12 11.988-12-5.365-12-11.988c0-1.036.132-2.041.379-3h2.079c-.297.947-.458 1.955-.458 3 0 5.52 4.481 10 10 10 5.52 0 10-4.48 10-10 0-5.519-4.48-10-10-10-2.121 0-4.083.668-5.703 1.796l1.703 2.204zm4 1.988c2.208 0 4 1.792 4 4s-1.792 4-4 4-4-1.792-4-4 1.792-4 4-4z"/></svg>');
    margin-left: unset;
    margin-top: unset;
    background-size: 22px;
}

/* Progress locator */
.progress-locator {
    width: 100%;
    overflow: auto;
}

.timer-container {
    display: flex;
    flex-wrap: nowrap;
}

.timer-progress-wrapper {
    flex: 0 0 auto;
    width: 200px;
    border: 1px solid #ccc;
    padding: 10px;
    margin-right: 10px;
    background-color: var(--paddle-color-white);
    box-shadow: 0px 14px 80px rgba(34, 35, 58, 0.2);
    cursor: pointer;
}

.progress-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.search-duration,
.search-duration-title {
    font-weight: bold;
    margin-right: 5px;
}

.progress-item.item-left {
    align-items: start;
    padding-right: 1em;
}

.search-duration-title .count {
    background-color: var(--paddle-color-accent);
    padding: 2px;
    margin-right: 5px;
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 1px solid;
    text-align: center;
    color: var(--paddle-color-white);
    border-radius: 50%;
}

.progress-item.item-right {
    padding-left: 40px;
}

/* Lyrics Button */
.lyrics-button {
    position: absolute;
    top: 24px;
    right: 50px;
    z-index: 10;
}

.icon-lyrics {
    width: 30px;
    height: 30px;
    background: var(--paddle-color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

/* Lyrics Bottom Sheet */
.lyrics-bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 90vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 100000;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    transition: bottom 0.3s ease;
    visibility: visible;
    opacity: 0;
    color: white;
}

.lyrics-bottom-sheet.active {
    bottom: 0;
    visibility: visible;
    opacity: 1;
}

/* Lyrics Content Area - Dark Theme */
.lyrics-content {
    height: calc(100% - 70px);
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px;
    scroll-behavior: smooth;
    background: transparent;
    transition: scroll-behavior 0.4s ease;
    overflow-x:hidden;
}

.lyrics-content.sliding {
    scroll-behavior: smooth;
}

/* Container for better line management */
#lyrics-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    justify-content: flex-start;
}

/* Ensure smooth scrolling to active line */
.lyrics-content.smooth-scroll {
    scroll-behavior: smooth;
}

/* Lyrics Lines with Swipe Up Animation */
.lyric-line {
    padding: 18px 0;
    margin: 8px 0;
    font-size: 22px;
    line-height: 1.4;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.6;
    border-left: 4px solid transparent;
    padding-left: 20px;
    position: relative;
    color: white;
    transform-origin: left center;
    transform: translateY(0) scale(1);
    max-height: 100px;
    overflow: hidden;
}

/* Past lines - swipe up and disappear completely */
.lyric-line.past {
    opacity: 0;
    transform: translateY(-100%) scale(0.8);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    border-left-color: transparent;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53);
}


.lyric-line.past + .lyric-line.upcoming {
    opacity: 1;
    filter: blur(1px);
}

/* Active line - prominent and in focus */
.lyric-line.active {
    opacity: 1;
    font-weight: 700;
    color: white;
    background: linear-gradient(90deg, rgba(184, 160, 126, 0.2) 0%, transparent 100%);
    transform: scale(1.05);
    border-left-color: var(--paddle-color-accent);
    margin-left: -8px;
    padding-left: 25px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    -webkit-font-smoothing: antialiased;
    border-radius: 0 12px 12px 0;
    font-size: 24px;
    filter: drop-shadow(0 4px 8px rgba(184, 160, 126, 0.4));
    margin-bottom: 30px; /* Extra space after active line */
}


/* Upcoming lines - ready to become active */
.lyric-line.upcoming {
    opacity: 0.7;
    font-size: 20px;
    transform: translateY(10px) scale(0.95);
    filter: blur(1px);
    color: #ddd;
    transition-delay: 0.1s;
}

/* Exclude the first upcoming line */
.lyric-line.upcoming:first-of-type {
    filter: none;
    opacity: 1;
}

/* First upcoming line after active - more prominent */
.lyric-line.active + .lyric-line.upcoming {
    opacity: 0.9;
    transform: translateY(5px) scale(0.98);
    filter: blur(0.5px);
    color: #eee;
    font-size: 22px;
}

/* Second upcoming line and beyond */
.lyric-line.upcoming + .lyric-line.upcoming {
    opacity: 0.5;
    transform: translateY(15px) scale(0.9);
    filter: blur(1.5px);
}

/* Smooth entry for new lines */
.lyric-line:not(.past):not(.active):not(.upcoming) {
    opacity: 0;
    transform: translateY(20px);
}

/* Sliding out animation for lines disappearing */
.lyric-line.sliding-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    pointer-events: none;
}

/* Lyrics Header */
.lyrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
    background: rgba(40, 40, 40, 0.95);
    flex-wrap: wrap;
    gap: 15px;
}

.lyrics-track-info {
    flex: 1;
    min-width: 150px;
    overflow: hidden;
    position: relative;
}

/* Scrolling Title Animation */
.lyrics-track-title {
    font-weight: bold;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    height: 20px;
    line-height: 20px;
    margin-bottom: 0;
    width:100%;
}

.lyrics-track-title .sep {
    margin: 0 10px;
    opacity: 0.7;
}

.lyrics-track-title .scrolling-content {
    display: inline-block;
    padding-right: 30px; /* Space between original and clone */
}

.lyrics-track-title span:not(.sep) {
    color: #ccc;
    font-weight: 500;
}

/* Optional fade effects */
.fade-left {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, rgba(37,37,37,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 2;
}

.fade-right {
    position: absolute;
    right: 15px;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(270deg, rgba(37,37,37,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 2;
}

@keyframes scrollTitle {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.lyrics-track-artist {
    position: relative;
    font-size: 14px;
    color: #ccc;
    z-index: 2;
    font-weight: 600;
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    display: none; /* Hide artist name for now */   
}

.lyrics-track-artist span {
    background: #282828;
}

/* Lyrics Controls Toggle */
.lyrics-controls-toggle {
    position: absolute;
    bottom: 20px;
    right: 28px;
    z-index: 10;
    width: 44px!important;
    height: 44px!important;
    border-radius: 1000%!important;
    background: var(--paddle-color-accent);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    padding: 0!important;
}

.lyrics-controls-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.lyrics-controls-toggle:active {
    transform: scale(0.95);
}

/* Toggle icon */
.toggle-icon {
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform 0.3s ease;
}



/* When controls are hidden (show icon) */
.lyrics-bottom-sheet.controls-hidden .toggle-icon::after {
    height: 0;
}

/* Lyrics controls hide/show transition */
.lyrics-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 2;
    min-width: 250px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
}

.lyrics-bottom-sheet.controls-hidden .lyrics-controls {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Adjust header when controls are hidden */
.lyrics-bottom-sheet.controls-hidden .lyrics-header {
    padding-top: 0;
    padding-bottom: 9px;
    min-height: auto;
}

/* Adjust content area when controls are hidden */
.lyrics-bottom-sheet.controls-hidden .lyrics-content {
    height: calc(100% - 60px);
}

.lyrics-mini-timeline {
    flex: 1;
    height: 4px;
    background: #555;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    min-width: 100px;
}

.lyrics-mini-scrub {
    height: 100%;
    background: var(--paddle-color-accent);
    border-radius: 2px;
    width: 0%;
}

.lyrics-mini-playhead {
    width: 12px;
    height: 12px;
    background: var(--paddle-color-accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 0%;
}

.lyrics-time-display {
    font-size: 12px;
    color: #ccc;
    white-space: nowrap;
}

.lyrics-control-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lyrics-play-pause {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--paddle-color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: white;
}

.lyrics-close {
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #444;
    color: white;
    transition: background 0.2s ease;
}

.lyrics-close:hover {
    background: #666;
}

/* Overlay */
.lyrics-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: none;
}

.lyrics-overlay.active {
    display: block;
}

/* Animation for when lyrics first load */
@keyframes lyricEntry {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 0.6;
        transform: translateY(0);
    }
}

.lyric-line:first-child {
    animation: lyricEntry 0.6s ease-out;
}

@keyframes scrollTitle {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.lyrics-track-title.scrolling {
    display: block;
    overflow: hidden;
}

.lyrics-track-title.scrolling .scrolling-content {
    display: inline-block;
    white-space: nowrap;
    padding-right: 50px; /* Space between original and duplicate */
    animation: scrollTitle 20s linear infinite;
}

/* Adjust speed based on content length if needed */
.lyrics-track-title.scrolling.slow {
    animation-duration: 25s;
}

.lyrics-track-title.scrolling.fast {
    animation-duration: 15s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lyrics-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .lyrics-controls {
        order: -1;
    }

    .lyrics-track-title {
        overflow: visible;
        text-overflow: unset;
        max-width: none;
    }

    @keyframes scrollTitleMobile {
        0% {
            transform: translateX(100%);
        }
        100% {
            transform: translateX(-100%);
        }
    }

    .lyrics-track-info {
        flex-direction: column;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 9px;
    }

     .lyric-line {
        font-size: 20px;
        padding: 16px 0;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .lyric-line.active {
        font-size: 22px;
        padding-right: 20px;
        margin-bottom: 25px;
        transform: scale(1.03);
    }

    .lyric-line.upcoming {
        font-size: 18px;
        transform: translateY(8px) scale(0.95);
    }

    .lyric-line.active + .lyric-line.upcoming {
        font-size: 20px;
        transform: translateY(4px) scale(0.97);
    }

    .lyrics-content {
        padding-bottom: 120px;
    }

     .lyrics-controls-toggle {
        bottom: 15px;
    }
    
    .toggle-icon {
        width: 18px;
        height: 18px;
    }
    
    .lyrics-bottom-sheet.controls-hidden .lyrics-content {
        height: calc(100% - 50px);
    }
}

@media (max-width: 480px) {
    .lyrics-header {
        padding: 10px 15px;
    }
    .timer-progress-wrapper {
        width: auto;
    }

    .lyric-line {
        font-size: 18px;
        padding: 14px 0;
    }

     .lyric-line.active {
        font-size: 20px;
        padding-right: 30px;
        margin-bottom: 20px;
    }

    .lyric-line.upcoming {
        font-size: 16px;
    }

    .lyric-line.active + .lyric-line.upcoming {
        font-size: 18px;
    }

}

@keyframes bounce1 {
    0% {
        transform: translateY(0px);
    }

    100% {
        transform: translateY(-10px);
    }
}

/* Optional: Add background pattern for better visual appeal */
.lyrics-bottom-sheet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(184, 160, 126, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(184, 160, 126, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    border-radius: 20px 20px 0 0;
}