.toggle-checkbox {
    right: 0;
    transition: all 0.3s ease;
}

.toggle-checkbox:checked {
    right: 0;
    border-color: #a855f7;
}

.toggle-checkbox:not(:checked) {
    right: 20px;
    border-color: #d1d5db;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #a855f7;
}

.toggle-checkbox:not(:checked) + .toggle-label {
    background-color: #4b5563;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 280px;
    background-color: #374151;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    border: 1px solid #4b5563;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-left: -80px;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Custom Scrollbar Styles */
.scrollbar-custom::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.scrollbar-custom::-webkit-scrollbar-track {
    background: #2d3748; /* Tailwind CSS bg-gray-800 */
    border-radius: 9999px;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
    background-color: #718096; /* Tailwind CSS bg-gray-600 */
    border-radius: 9999px;
    border: 2px solid #2d3748; /* Tailwind CSS bg-gray-800 */
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
    background-color: #a0aec0; /* Tailwind CSS bg-gray-500 */
}

/* Music Tag Selector Styles */
.music-tag {
    transition: all 0.2s ease;
}

.music-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.music-tag.selected {
    background-color: #7c3aed !important;
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.5);
}

.category-toggle {
    transition: all 0.2s ease;
}

.category-toggle:hover {
    background-color: #4b5563;
}

.tag-container {
    max-height: 200px;
    overflow-y: auto;
}

.tag-container::-webkit-scrollbar {
    width: 4px;
}

.tag-container::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 2px;
}

.tag-container::-webkit-scrollbar-thumb {
    background-color: #6b7280;
    border-radius: 2px;
}

.tag-container::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* Mode Tab Styles */
.mode-tab {
    position: relative;
    border-bottom: 4px solid transparent;
    background: transparent;
    transition: all 0.3s duration-300;
}

.mode-tab.active {
    color: white;
    border-bottom: 4px solid transparent;
    position: relative;
}

.mode-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: calc(100% - 16px);
    height: 4px;
    background-color: #7c3aed;
    border-radius: 2px;
}

.mode-tab:not(.active) {
    color: #9ca3af;
    border-bottom: 4px solid transparent;
}

.mode-tab:not(.active):hover {
    color: #d1d5db;
}

/* Model Selection Modal Styles */
.model-option.selected {
    border-color: #7c3aed !important;
    background-color: transparent !important;
}

.model-option:hover {
    background-color: transparent !important;
}

.style-dropdown select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem top 50%;
    background-size: 1.5rem auto;
    padding-right: 2.5rem;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.song-grid .song_container {
    padding: 1rem !important;
    overflow: hidden;
}

.song-grid .song_container > .flex-shrink-0:first-child img {
    width: 3.5rem !important;
    height: 3.5rem !important;
    border-radius: 0.375rem !important;
}

.song-grid .song_container > .flex-grow {
    padding: 0;
}

@media (max-width: 768px) {
    .song-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .song-grid {
        grid-template-columns: 1fr;
    }
}
