* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f8f5ff 0%, #e8deff 50%, #f0ebff 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    font-size: clamp(2em, 5vw, 3em);
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #9333ea;
    font-size: 1.1em;
    font-weight: 500;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 25px auto 0;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 16px;
    color: #6b21a8;
    font-size: 1em;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.search-input:focus {
    border-color: #a78bfa;
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.2);
}

.search-input::placeholder {
    color: #c4b5fd;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

.player-container {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 20px;
    padding: clamp(20px, 5vw, 40px);
    display: none;
    box-shadow: 0 8px 40px rgba(139, 92, 246, 0.15);
    margin-bottom: 40px;
}

.player-container.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.player-header {
    margin-bottom: 24px;
    text-align: center;
}

.player-title {
    font-size: clamp(1.5em, 4vw, 2em);
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-artist {
    font-size: clamp(1em, 3vw, 1.2em);
    color: #9333ea;
    font-weight: 600;
}

.player-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    background: #f3e8ff;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95em;
    color: #8b5cf6;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e9d5ff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border-color: #8b5cf6;
}

.player-content {
    display: none;
}

.player-content.active {
    display: block;
}

iframe {
    width: 100%;
    height: clamp(300px, 50vw, 500px);
    border-radius: 16px;
    border: none;
    background: #000;
}

audio {
    width: 100%;
    margin-top: 20px;
}

.audio-placeholder {
    text-align: center;
    padding: 80px 40px;
    background: #f9fafb;
    border-radius: 16px;
    border: 2px dashed #e9d5ff;
}

.audio-placeholder p {
    color: #9333ea;
    font-size: 1em;
    margin-bottom: 20px;
    font-weight: 500;
}

.close-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1em;
    display: block;
    margin: 24px auto 0;
    transition: all 0.3s ease;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.4);
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.song-card {
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
}

.song-card.menu-open {
    z-index: 200;
    padding-bottom: 90px;
}

.song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 20px 20px 0 0;
}

.song-card:hover {
    transform: translateY(-6px);
    border-color: #c4b5fd;
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.2);
}

.song-card:hover::before {
    transform: scaleX(1);
}

.song-card.active {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #a78bfa;
}

.song-card.active::before {
    transform: scaleX(1);
}

.song-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.menu-btn {
    background: none;
    border: none;
    color: #8b5cf6;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.menu-btn:hover {
    background: #f3e8ff;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    bottom: auto;
    right: 0;
    left: auto;
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
    display: none;
    z-index: 999;
    min-width: 150px;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    color: #6b21a8;
    font-size: 0.95em;
    font-weight: 500;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f3e8ff;
}

.song-title {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 8px;
    color: #6b21a8;
    line-height: 1.3;
    flex: 1;
}

.song-artist {
    font-size: 1em;
    color: #9333ea;
    margin-bottom: 12px;
    font-weight: 500;
}

.song-date {
    font-size: 0.9em;
    color: #7c3aed;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
    opacity: 0.9;
}

.song-type {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-radius: 20px;
    font-size: 0.8em;
    color: #8b5cf6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    color: #8b5cf6;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #f3e8ff;
    border-color: #c4b5fd;
}

.page-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border-color: #8b5cf6;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top-btn.visible {
    display: flex;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.5);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #9333ea;
    font-size: 1.1em;
    font-weight: 600;
}

.download-btn {
    margin-top: 16px;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    white-space: nowrap;
}
 
.download-btn:active {
    transform: translateY(1px);
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .songs-grid {
        gap: 15px;
    }

    .song-card {
        padding: 20px;
    }

    .scroll-top-btn {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .song-card {
        padding: 18px;
    }

    .download-btn {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .page-btn {
        padding: 10px 18px;
        font-size: 0.9em;
    }
}
