/* Reset */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}



.toa-player-content {
      position: fixed; 
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #00a862 0%, #008e54 100%);
    color: white;
    padding: 12px 32px;
    box-sizing: border-box;
    border-bottom-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Track Header */
.toa-track-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 5px;
}

.toa-track-header > .fa-music {
    font-size: 20px;
    opacity: 0.9;
}

.toa-music-icon-container {
    position: relative;
    margin-right: 12px;
}

.toa-music-icon-square {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toa-music-icon {
    width: 24px;
    height: 24px;
}

.toa-music-icon-fa {
    font-size: 20px;
    color: #00a862;
    display: block;
}

/* Now Playing Section */
.toa-now-playing {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}

.toa-now-playing-content {
    display: flex;
    flex-direction: column;
}

.toa-track-header > .toa-up-next-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}

.toa-track-title-container {
    flex: 1;
    overflow: hidden;
}

.toa-track-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: white;
}


.toa-menu-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

.toa-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Controls Wrapper */
.toa-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 0;
}

/* Left Controls */
.toa-left-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.toa-label {
    font-size: 16px;
    font-weight: 400;
    /* padding-bottom: 20px; */
    /* opacity: 0.95; */
}

.toa-speed {
    padding: 12px 12px;
    border-radius: 8px;
    border: none;
    background-color: rgba(0, 0, 0, 0.2);
    background-color: #06482e;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    font-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    min-width: 70px;
}

/* Center Controls */
.toa-center-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.toa-control-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid white;
    border-radius: 50%;
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.toa-control-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.toa-control-btn:active {
    transform: scale(0.95);
}

.toa-control-btn i {
    font-size: 30px;
    color: black;
}

.toa-skip-icon {
    width: 30px;
    height: 30px;
    color: black;
}

.toa-skip-icon.reverse {
    transform: rotate(180deg);
}

.toa-play-icon {
    width: 30px;
    height: 30px;
    color: white;
}

.toa-skip-text {
    font-size: 9px;
    font-weight: 700;
    color: black;
    line-height: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.toa-play-btn {
    width: 48px;
    height: 48px;
    background: #1a532e;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); */
    /* transition: all 0.2s ease-in-out; */
}

.toa-play-btn:hover {
    transform: scale(1.05);
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); */
    background: #1a532e;
}

.toa-play-btn:active {
    transform: scale(0.98);
}

/* Right Controls */
.toa-right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    justify-content: flex-end;
}

.toa-volume-icon {
    width: 20px;
    height: 20px;
    display: block;
    filter: brightness(0) invert(1); /* Make icon white */
    transition: opacity 0.2s ease;
}

.toa-icon-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s, transform 0.2s;
}

.toa-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.toa-volume {
    width: 120px;
    height: 6px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.toa-volume::-webkit-slider-runnable-track {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(to right, 
        #ffffff 0%, 
        #ffffff var(--volume-progress, 100%), 
        rgba(255, 255, 255, 0.3) var(--volume-progress, 100%), 
        rgba(255, 255, 255, 0.3) 100%);
}

.toa-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 1px solid #008e54;
    margin-top: -5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toa-volume::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.toa-volume::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(to right, 
        #00a862 0%, 
        #00a862 var(--volume-progress, 100%), 
        rgba(255, 255, 255, 0.3) var(--volume-progress, 100%), 
        rgba(255, 255, 255, 0.3) 100%);
}

.toa-volume::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toa-volume::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

/* Progress Bar Row */
.toa-progress-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 29px
    /* margin: 0 16px;   */
}

.toa-progress {
    width: 100%;
}

.toa-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.toa-time {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    color: white;
}

.toa-progress {
    height: 8px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: 0;
}

.toa-progress::-webkit-slider-runnable-track {
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(to right, 
        #ffffff 0%, 
        #ffffff var(--progress, 0%), 
        rgba(255, 255, 255, 0.3) var(--progress, 0%), 
        rgba(255, 255, 255, 0.3) 100%);
}

.toa-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 1px solid #008e54;
    margin-top: -4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toa-progress::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.toa-progress::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(to right, 
        #ffffff 0%, 
        #ffffff var(--progress, 0%), 
        rgba(255, 255, 255, 0.3) var(--progress, 0%), 
        rgba(255, 255, 255, 0.3) 100%);
}

.toa-progress::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 1px solid #008e54;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toa-progress::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}


/* Playlist Drawer */
.toa-playlist-drawer {
    position: fixed;
    right: 24px;
    bottom: 160px;
    width: 400px;
    max-height: 65vh;
    background: white;
    color: #0a0a0a;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10000;
}

.toa-playlist-drawer.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toa-playlist-header {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toa-playlist-close {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 20px;
    transition: all 0.2s;
}

.toa-playlist-close:hover {
    background: #e9ecef;
    color: #212529;
}

.toa-playlist-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: calc(65vh - 60px);
}

.toa-playlist-list::-webkit-scrollbar {
    width: 8px;
}

.toa-playlist-list::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.toa-playlist-list::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

.toa-playlist-list::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.toa-playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.toa-playlist-item:hover {
    background: #f8f9fa;
    border-color: #008e54;
}

.toa-playlist-item .toa-idx {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e7f7ef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #008e54;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.toa-playlist-item .toa-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #212529;
    font-weight: 500;
}

.toa-playlist-item.active {
    background: #e7f7ef;
    border-color: #008e54;
    box-shadow: 0 2px 8px rgba(0, 142, 84, 0.15);
}

.toa-playlist-item.active .toa-idx {
    background: #008e54;
    color: white;
}

.toa-playlist-item.active .toa-title {
    color: #008e54;
    font-weight: 600;
}

.toa-playlist-footer {
    padding: 0;
}

/* Download Button */
.toa-download-btn {
    background: #06482e;
    border: none;
    padding: 15px 10px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.toa-download-btn:hover {
    background: #164428;
    transform: scale(1.02);
}

.toa-download-btn:active {
    transform: scale(0.98);
}

.toa-download-btn i {
    font-size: 14px;
}

/* Bottom Player iframe support */
.toa-bottom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 15px;
    width: 100%;
    height: 160px;
    border: 0;
    z-index: 9999;
}

/* LEFT SIDE - Legacy support */
.toa-left {
    flex: 1;
    margin-bottom: 10px;
}

/* ROW wrapper - Legacy support */
.toa-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* CENTER SECTION - Legacy support */
.toa-center {
    flex: 1.5;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.toa-controls-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* Skip buttons - Legacy support */
.toa-skip-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    color: white;
    cursor: pointer;
}

.toa-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.toa-ss {
    font-size: 11px;
    margin-left: 6px;
}

/* RIGHT SIDE - Legacy support */
.toa-right {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.toa-speed-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.95;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toa-player-container {
        padding: 16px 20px;
        border-bottom-left-radius: 16px;
        border-top-right-radius: 16px;
    }

    .toa-controls-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .toa-left-controls,
    .toa-right-controls {
        width: 100%;
        justify-content: center;
    }

    .toa-playlist-drawer {
        right: 12px;
        left: 12px;
        width: auto;
    }
}