@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: transparent;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Track Effects */
.track-glow-blue {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
    border: 3px solid #3b82f6;
}

.track-glow-green {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
    border: 3px solid #22c55e;
}

.track-glow-yellow {
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.6);
    border: 3px solid #eab308;
}

/* Trend Overlay Effects */
.trend-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

/* The color wash (gradient) */
.trend-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, var(--trend-color) 0%, transparent 35%);
    opacity: 0.7;
    mix-blend-mode: hard-light;
}

/* The particle lines pattern */
.trend-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Diagonal dash/dot pattern simulation - Thicker dots (2px) */
    background-image: radial-gradient(var(--trend-color) 2px, transparent 2px);
    background-size: 4px 4px;
    background-position: 0 0;
    opacity: 0.6;
    /* Fade out mask for the pattern - matches gradient direction */
    -webkit-mask-image: linear-gradient(45deg, black 0%, transparent 35%);
    mask-image: linear-gradient(45deg, black 0%, transparent 35%);
    mix-blend-mode: hard-light;
}

.trend-blue { --trend-color: #3b82f6; }
.trend-green { --trend-color: #22c55e; }
.trend-yellow { --trend-color: #eab308; }


/* Badges */
.badge-ribbon {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.badge-trend {
    background: linear-gradient(45deg, #ff3366, #ff6b6b);
    color: white;
}

.badge-new {
    background: linear-gradient(45deg, #22c55e, #4ade80);
    color: white;
}

/* Corner Ribbon Badges */
.badge-corner-ribbon {
    position: absolute;
    top: 12px;
    right: -22px;
    width: 80px;
    text-align: center;
    transform: rotate(45deg);
    font-size: 9px;
    font-weight: bold;
    color: white;
    padding: 3px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 20;
    text-transform: uppercase;
    line-height: 1;
}

.badge-corner-ribbon.small {
    top: 7px;
    right: -16px;
    width: 60px;
    font-size: 7px;
    padding: 2px 0;
}

.badge-trend-red {
    background: linear-gradient(to bottom, #ff3333, #cc0000);
}

.badge-new-green {
    background: linear-gradient(to bottom, #33cc33, #009900);
}

.now-playing-track-title {
    color: #0066ff !important;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.now-playing-track-title:hover {
    color: #0052cc !important;
}

.now-playing-track-title-paused {
    color: #0066ff !important;
    opacity: 0.7;
    transition: color 0.15s ease, opacity 0.15s ease;
}

/* Playing track title highlighting for all lists */
.playing-title-blue {
    color: #3b82f6 !important;
    font-weight: bold !important;
    transition: color 0.3s ease;
}

/* Playing PAUSE button highlighting (only when playing) */
.playing-pause-button-blue, .playing-active-button {
    background-color: #3b82f6 !important;
    color: white !important;
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    opacity: 1 !important;
    transform: scale(1) !important;
}

.playing-pause-button-blue:hover {
    background-color: #2563eb !important;
}

/* Ensure icon inside blue button is white */
.playing-pause-button-blue i {
    color: inherit !important;
}

/* Keep overlay visible for current playing track when needed */
.playing-active-overlay {
    opacity: 1 !important;
}

/* Square cover helper for track lists */
.track-cover-square {
    position: relative;
    overflow: hidden;
    width: 44px; /* Added for consistency */
    height: 44px; /* Added for consistency */
}

.track-cover-square img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    border-radius: 4px; /* Added for rounded corners */
}

/* Track list grid alignment fixes */
.track-grid .group {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.track-grid .group > div:first-child {
    flex-shrink: 0;
}

.track-grid .group > div:last-child {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.track-grid .group h3 {
    min-height: 1.5em;
    line-height: 1.4;
}

.track-grid .group .flex.justify-between {
    margin-top: auto;
}

/* Right-align stats and hearts in all track lists */
.track-item .track-stats,
.track-card .track-stats {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Space between stats */
    flex-shrink: 0; /* Prevent shrinking */
}

/* Ensure consistent spacing in track lists */
.track-item, .track-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.track-item > div:first-child,
.track-card > div:first-child {
    flex-shrink: 0;
}

.track-item > div:last-child,
.track-card > div:last-child {
    flex-grow: 1;
    min-width: 0;
}

/* Table row alignment for track lists */
table tbody tr {
    vertical-align: middle;
}

table tbody td {
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
}

/* Mobile track list improvements */
@media (max-width: 768px) {
    .track-item {
        gap: 0.75rem;
        padding: 0.5rem;
    }
    
    .track-item img {
        width: 3rem;
        height: 3rem;
    }
    
    .track-item h3 {
        font-size: 0.875rem;
        line-height: 1.3;
    }
    
    .track-item p {
        font-size: 0.75rem;
    }
}

/* Library list alignment fixes */
.flex.items-center.gap-4.p-3.border-b {
    align-items: center !important;
    min-height: 72px;
}

.flex.items-center.gap-4.p-3.border-b > div:first-child {
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.flex.items-center.gap-4.p-3.border-b > div:nth-child(2) {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

.flex.items-center.gap-4.p-3.border-b > div:nth-child(3) {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flex.items-center.gap-4.p-3.border-b > div:last-child {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Ensure consistent line heights for track titles */
.flex.items-center.gap-4.p-3.border-b .font-medium.truncate {
    line-height: 1.4;
    margin-bottom: 2px;
}

.flex.items-center.gap-4.p-3.border-b .text-xs.text-gray-500 {
    line-height: 1.3;
}
