* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: "Poppins", sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #ff6ec7, #7b61ff, #00c6ff);
}

.hero {
    margin-bottom: 2.5rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
}

.hero p {
    margin-top: 1rem;
    opacity: 0.9;
}

.music-card {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 3vw, 1.875rem);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
}

.cover {
    width: clamp(140px, 18vw, 180px);
    aspect-ratio: 1;
    flex: 0 0 auto;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb36b, #ff6ea8);
    font-size: clamp(2.8rem, 6vw, 3.75rem);
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover.play {
    animation: spin 8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.trackName,
.singerName {
    overflow-wrap: anywhere;
}

.btn-play,
.search-btn {
    border: none;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(45deg, #ff6ec7, #ff9671);
}

.btn-play {
    padding: 10px 24px;
    border-radius: 30px;
}

.btn-play:hover {
    color: #fff;
    transform: scale(1.05);
}

.btn-pause {
    padding: 10px 24px;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 30px;
    font-weight: 600;
}

.btn-pause:hover {
    color: #6a5cff;
    background: #fff;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    border: none;
    outline: none;
    border-radius: 50px;
}

.search-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 50px;
    transition: 0.3s;
}

.search-btn:hover {
    color: #fff;
    background: #ff3daa;
}

.search-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.status-box {
    margin-top: 25px;
    padding: 15px;
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 18px;
}

.result-list {
    min-width: 0;
    max-height: 350px;
    margin-top: 20px;
    padding-right: 6px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ff5ebc transparent;
}

.result-item {
    min-width: 0;
    margin-top: 15px;
    padding: 16px;
    overflow-wrap: anywhere;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    transition: 0.3s;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateX(5px);
}

.result-item:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.empty-state,
.error-state {
    margin-top: 1.5rem;
    text-align: center;
}

.error-state {
    color: #fff;
}

audio {
    width: 100%;
    margin-top: 25px;
}

#result-list::-webkit-scrollbar {
    width: 8px;
}

#result-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

#result-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff5ebc, #7b61ff);
    border-radius: 20px;
}

@media (max-width: 767.98px) {
    .hero {
        margin-bottom: 1.75rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .music-card {
        padding: 1.25rem;
    }

    .search-btn {
        margin-top: 0;
    }

    .result-list {
        max-height: 300px;
    }
}
