:root {
    --primary: #8b5cf6;
    --primary-dark: #6d28d9;
    --accent: #facc15;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-white: #f8fafc;
    --text-dim: #94a3b8;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --glass: rgba(15, 23, 42, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 100px;
    /* Space for player bar */
}

header {
    padding: 2rem;
    display: flex;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.logo h1 {
    font-size: 2.5rem;
    letter-spacing: 0.2rem;
    font-weight: 900;
    font-style: italic;
    text-shadow: 2px 2px 0 var(--primary);
}

.logo h1 span {
    color: var(--accent);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-dim);
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.song-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.song-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 25px -5px rgba(139, 92, 246, 0.3);
}

.song-card .cover {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 0.5rem;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.song-card .info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.song-card .title {
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card .artist {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.track-info .album {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 2px;
}

/* Player Bar */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
}

.current-track {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 300px;
}

.current-track img {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 600px;
}

.main-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.ctrl-btn:hover {
    transform: scale(1.2);
    color: var(--primary);
}

.play-btn {
    background: var(--primary);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.5);
}

.play-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s linear;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 150px;
}

#volume-slider {
    width: 100%;
    accent-color: var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .player-bar {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .current-track,
    .volume-container {
        width: 100%;
        justify-content: center;
    }
}