.player-container {
    max-width: 1000px;
    margin: 90px auto;
    font-family: "Roboto", sans-serif;
    color: #f0f0f0;
    padding: 0 15px;
}

.player-header {
    text-align: center;
    margin-bottom: 25px;
    color: #e62e2e;
    font-size: 2.2rem;
    font-weight: bold;
}

.playlist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.playlist-item {
    background: #1c1c1c;
    background:
        linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)),
        url('../img/sound.webp') center/cover no-repeat;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;

    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .playlist {
        grid-template-columns: 1fr;
    }
}

.playlist-item:hover {
    background:
        linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 0.7)),
        url('../img/sound.webp') center/cover no-repeat;
    border-color: #444;
}

.playlist-item.active {
    background:
        linear-gradient(rgba(18, 18, 18, 0.5), rgba(18, 18, 18, 0.5)),
        url('../img/sound.webp') center/cover no-repeat;
    border-color: #292929;
    color: #fff;
}

.playlist-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 4px solid #ffffff33;
    border-top: 4px solid #e62e2e;
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

.track-info {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.control-btn {
    background-color: #212121;
    border: 1.5px solid #ffffff33;
    color: #fff;
    width: 42px;
    height: 42px;
    padding: 8px;
    border-radius: 25%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background-color: #696969;
    border-color: #696969;
}

.control-btn.active {
    background-color: #b68c00;
    border-color: #696969;
}

.control-btn i {
    pointer-events: none;
    font-size: 1.2rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.progress-time {
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
    color: #ffffff;
}

.progress-bar {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #ffffff;
    border-radius: 3px;
    border: 1px solid #444;
    outline: none;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #e62e2e;
    cursor: pointer;
}

.progress-bar::-moz-range-thumb {
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #e62e2e;
    cursor: pointer;
}

.playlist-item {
    position: relative; 
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 16px;
    border-radius: 8px;
    color: #cc0000;
    font-weight: bold;
    font-size: 14px;
    z-index: 10;
    pointer-events: none;
}

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #cc0000;
    font-size: 18px;
    z-index: 9999;
}

.loading-indicator {
    margin-top: 10px;
    color: #cc0000;
    font-size: 14px;
    font-weight: bold;
}

@media (max-width: 600px) {
    .track-info {
        font-size: 0.9rem;
    }

    .control-btn {
        font-size: 1rem;
        padding: 6px 10px;
    }

    .control-btn i {
        font-size: 1rem;
    }
}

.stars {
    margin: 5px 0;
}

.star {
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.star.active {
    color: gold;
}

.volume-container {
    position: relative;
    display: flex;
    align-items: center;
}

.volume-slider {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #1c1c1c;
    padding: 8px;
    border-radius: 6px;
    display: none;
}

.volume-container:hover .volume-slider {
    display: block;
}

.volume-range {
    width: 6px;
    height: 80px;
    writing-mode: vertical-lr;
    direction: rtl;
    -webkit-appearance: slider-vertical;
}

.playlist-item.active {
    border: 2px solid #e62e2e;
    box-shadow: 0 0 15px rgba(230, 46, 46, 0.4);
    transform: scale(1.02);
}

.playlist-item {
    transition: all 0.3s ease;
}

.playlist-item.active::after {
    content: "▶ Tocando";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e62e2e;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
}

.playlist-item.paused::after {
    content: "Pausado";
}

.playlist-item.active::before {
    content: "";
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 20px;
    height: 10px;
    background: linear-gradient(to top,
            #e62e2e 20%,
            transparent 20%);
    animation: pulse 0.6s infinite alternate;
}

.share-btn {
    color: #25D366;
}

.share-btn:hover {
    transform: scale(1.1);
}


@keyframes pulseLogo {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-content span {
    font-size: 14px;
    opacity: 0.8;
}

.skeleton {
    background: #2a2a2a;
    animation: pulse 1.2s infinite;
}

.skeleton-img {
    width: 100%;
    height: 150px;
    background: #444;
    border-radius: 8px;
}

.skeleton-text {
    height: 15px;
    background: #555;
    margin-top: 10px;
    border-radius: 4px;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

@keyframes pulse {
    from {
        height: 10px;
    }

    to {
        height: 18px;
    }
}