/* Theme Farben */
:root {
    --bg-color: #ffffff;
    --text-color: #222222;
    --card-bg: #f5f5f5;
    --border-color: #dddddd;
    --accent: #2ecc71;
}

/* Dunkles Theme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #eeeeee;
        --card-bg: #1e1e1e;
        --border-color: #333333;
        --accent: #2ecc71;
    }
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    margin: 20px;
}

h1 {
    margin-bottom: 20px;
}

.search-bar input,
.search-bar button {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.search-bar button {
    background: var(--accent);
    color: white;
    border: none;
}

.album-block {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

#result-count {
    margin-bottom: 15px;
    font-weight: bold;
}

/* GRID */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* CARD */
.music-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.music-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.music-card h3 {
    margin-top: 0;
}

/* RESPONSIVE */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
}

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-bar input {
    padding: 8px;
    font-size: 16px;
}

.search-bar button {
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
}

.album-block {
    margin-top: 20px;
}

.track {
    font-weight: bold;
    margin-right: 10px;
}

/* 📱 Mobile Anpassung */
@media (max-width: 600px) {

    body {
        margin: 10px;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar input,
    .search-bar button {
        width: 100%;
        box-sizing: border-box;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }
}

/* Modernen Look */
input, button {
    border-radius: 6px;
    border: 1px solid #ccc;
}

button {
    background: #2ecc71;
    color: white;
    border: none;
}

button:hover {
    opacity: 0.9;
}

/* Track Highlighting */
track-item {
    padding: 10px 8px;
    transition: background 0.2s ease;
}

.playing {
    background: linear-gradient(
        90deg,
        rgba(46,204,113,0.25),
        rgba(46,204,113,0.08)
    );
    border-left: 5px solid #2ecc71;
    border-radius: 6px;
    font-weight: 600;
}

/* Mobile extra sichtbar */
@media (max-width: 768px) {
    .playing {
        border-left: none;
        border: 2px solid #2ecc71;
        background: rgba(46,204,113,0.18);
    }
}

.track-item {
    scroll-margin-top: 80px;
}

.play-link {
    cursor: pointer;
    color: #2ecc71;
}

.play-link:hover {
    text-decoration: underline;
}

#mini-player {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #121212;
    color: white;
    padding: 10px 12px;
    border-bottom: 1px solid #333;
}

#mini-info {
    font-size: 14px;
    margin-bottom: 6px;
}

#mini-controls audio {
    width: 100%;
}
