:root {
    --bg-dark: #0f172a;
    --primary: #ec4899;
    --primary-hover: #db2777;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Dynamic Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 50%, rgba(236, 72, 153, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    filter: blur(40px);
    animation: pulse 15s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-20px, 20px); }
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 40px 20px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

h1 span {
    color: var(--primary);
    background: linear-gradient(to right, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.search-box {
    display: flex;
    gap: 12px;
}

input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    padding: 14px 20px;
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 1px var(--primary);
    z-index: 2;
    position: relative;
}

select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 1px var(--primary);
    z-index: 2;
    position: relative;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    z-index: 1;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

button:active {
    transform: translateY(0);
}

.controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
}

select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.song-card {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px;
}

.song-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.song-cover {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    background: #1e293b;
    flex-shrink: 0;
}

.song-info {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.song-title {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.song-artist {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist span.clickable, .song-title span.clickable {
    cursor: pointer;
}
.song-artist span.clickable:hover, .song-title span.clickable:hover {
    text-decoration: underline;
    color: #fff;
}

.download-btn {
    width: auto;
    padding: 6px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    border-radius: 20px;
}

/* Loader */
.hidden { display: none !important; }

.loader {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

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

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
