.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.stats-section {
    margin-bottom: 40px;
}

.stats-section h3 {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 4px solid var(--youtube-transparent-color);
    color: var(--youtube-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 10px;
}

.stat-card {
    position: relative;
    width: 350px;
    background-color: var(--form-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    outline: none;
}

.stat-number {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--youtube-color);
    margin-bottom: 8px;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.95em;
    color: var(--text-subtle-color);
    font-weight: 500;
}

.songs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--youtube-color) var(--form-color);
}

.songs-list::-webkit-scrollbar {
    width: 12px;
    background: var(--form-color);
    border-radius: 4px;
}

.songs-list::-webkit-scrollbar-thumb {
    background: var(--youtube-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.song-item {
    position: relative;
    width: 100%;
    background-color: var(--form-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 8px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    overflow: hidden;
    transition: all 0.3s ease;
}

.song-cover {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 20px;
    transition: filter 0.3s ease;
}

.song-item:hover .song-cover {
    filter: brightness(80%);
}

.song-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.song-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 4px;
    max-width: 400px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.song-artist {
    color: var(--text-subtle-color);
    font-size: 0.95em;
    max-width: 400px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.song-stats {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 20px;
}

.play-count {
    font-weight: bold;
    color: var(--youtube-color);
    font-size: 1.1em;
}

.last-played {
    font-size: 0.9em;
    color: var(--neutral-color);
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-subtle-color);
    font-style: italic;
    font-size: 1.1em;
}

/* Section animations */
.stats-section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.stats-section:nth-child(1) { animation-delay: 0.1s; }
.stats-section:nth-child(2) { animation-delay: 0.2s; }
.stats-section:nth-child(3) { animation-delay: 0.3s; }
.stats-section:nth-child(4) { animation-delay: 0.4s; }
.stats-section:nth-child(5) { animation-delay: 0.5s; }
.stats-section:nth-child(6) { animation-delay: 0.6s; }
.stats-section:nth-child(7) { animation-delay: 0.7s; }
.stats-section:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .stats-container {
        padding: 15px;
    }
    
    .stat-card {
        width: 100%;
        max-width: 400px;
    }
    
    .song-item {
        padding: 12px;
    }
    
    .song-cover {
        width: 60px;
        height: 60px;
        margin-right: 15px;
    }
    
    .song-title {
        max-width: 200px;
    }
    
    .song-artist {
        max-width: 200px;
    }
}

/* Number counting animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-number {
    animation: countUp 0.8s ease-out;
}