:root {
    --primary-color: #1DB954;
    --background-color: #121212;
    --surface-color: #282828;
    --text-color: #FFFFFF;
    --text-secondary: #B3B3B3;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
}

.genre-selector {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.genre-input {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #404040;
    border-radius: 6px;
    background-color: #404040;
    color: var(--text-color);
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #1ed760;
}

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #404040;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

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

.song-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

.song-image {
    flex-shrink: 0;
}

.song-image img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.song-info {
    flex-grow: 1;
}

.song-info h2 {
    margin-bottom: 0.5rem;
}

.song-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.preview-controls {
    margin: 1.5rem 0;
}

audio {
    width: 100%;
    height: 40px;
}

.spotify-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.spotify-button:hover {
    background-color: #1ed760;
}

@media (max-width: 600px) {
    .song-card {
        flex-direction: column;
        text-align: center;
    }

    .song-image img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

.genre-dropdown {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #404040;
    border-radius: 6px;
    background-color: #404040;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.6%205.4-7.9%205.4-12.9%200-5-1.9-9.2-5.5-12.7z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%;
    background-size: 0.65em auto;
    padding-right: 2em;
}

.genre-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
}

.genre-dropdown option {
    background-color: #404040;
    color: var(--text-color);
}

.fallback-message {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-style: italic;
} 