:root {
    --bg-dark: #09090b;
    --primary-color: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.4);
    --secondary-color: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.08);
}

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

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

/* Background Animated Gradient Mesh */
.background-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200vw;
    height: 200vh;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.15), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1), transparent 30%);
    z-index: -1;
    animation: rotateGradient 40s linear infinite;
    opacity: 0.8;
}

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

/* Glassmorphism Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
    margin: 2rem 0;
}

/* Header */
header {
    text-align: center;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.glow-dot {
    width: 12px;
    height: 12px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--secondary-color);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

h1 {
    font-weight: 800;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--text-main), #d1d5db);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Station Selector */
.station-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.station-selector label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.custom-select {
    position: relative;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.custom-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

select {
    width: 100%;
    padding: 1rem;
    background: transparent;
    color: var(--text-main);
    border: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    outline: none;
}

select option {
    background-color: #1e1e24; /* Fallback for select options UI */
    color: #fff;
}

/* Search Box */
.search-section {
    position: relative;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(0, 0, 0, 0.4);
}

.search-box input::placeholder {
    color: #64748b;
}

/* Results Content */
.results-container {
    min-height: 250px;
    position: relative;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
.song-list::-webkit-scrollbar {
    width: 6px;
}
.song-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.song-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.song-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 2rem;
    animation: fadeIn 0.5s ease forwards;
}

/* Song Item */
.song-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
    animation: fadeIn 0.4s ease forwards;
    gap: 1rem;
}

.song-item:hover {
    background: var(--card-hover);
    border-color: var(--glass-border);
    transform: translateX(4px); /* Spotify-style subtle slide or no transform */
}

.song-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    overflow: hidden;
}

.song-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background-color: #1e1e24; /* Placeholder background */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.song-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.song-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* Request Button */
.request-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.9;
    white-space: nowrap;
    margin-left: 1rem;
}

.request-btn:hover {
    opacity: 1;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: scale(1.05);
}

.request-btn:active {
    transform: scale(0.95);
}

.request-btn:disabled {
    background: #475569;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

/* Spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
}

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

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toast Notifcation */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

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

.toast.success { border-bottom: 2px solid #10b981; }
.toast.error { border-bottom: 2px solid #ef4444; }
