:root {
    --player-transition: all 0.3s ease;
    --cover-size: 120px;
    --cover-size-lg: 160px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Cover Art ─────────────────────────────────────────────────────────── */
#cover-art {
    width: var(--cover-size);
    height: var(--cover-size);
    object-fit: cover;
    border-radius: 12px;
    transition: var(--player-transition);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    /* Sicherstellen dass kein ungewollter Filter aktiv ist */
    filter: none;
    opacity: 1;
}

@media (min-width: 768px) {
    #cover-art {
        width: var(--cover-size-lg);
        height: var(--cover-size-lg);
    }
}

#cover-art.loading {
    filter: blur(4px);
    opacity: 0.6;
}

#cover-art.playing {
    animation: spin 8s linear infinite;
    border-radius: 50%;
}

/* ─── Player Card ───────────────────────────────────────────────────────── */
#player-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: var(--player-transition);
}

/* ─── Visualizer ────────────────────────────────────────────────────────── */
#visualizer {
    height: 40px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    overflow: hidden;
}

.vis-bar {
    flex: 1;
    border-radius: 2px 2px 0 0;
    background: var(--bs-primary);
    opacity: 0.7;
    transition: height 0.15s ease;
    min-height: 4px;
}

.vis-bar.active {
    animation: wave calc(var(--speed, 0.8s)) ease-in-out infinite;
}

/* ─── Live Badge ────────────────────────────────────────────────────────── */
#live-badge {
    animation: pulse-badge 2s infinite;
}

/* ─── Volume Slider ─────────────────────────────────────────────────────── */
.volume-slider {
    cursor: pointer;
    accent-color: var(--bs-primary);
}

/* ─── Marquee ───────────────────────────────────────────────────────────── */
.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-text {
    display: inline-block;
    animation: marquee 12s linear infinite;
}

.marquee-text:hover {
    animation-play-state: paused;
}

/* ─── History ───────────────────────────────────────────────────────────── */
.history-item {
    transition: var(--player-transition);
}

.history-item:hover {
    transform: translateX(4px);
}

.history-cover {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

/* ─── Tabs ──────────────────────────────────────────────────────────────── */
.nav-tabs .nav-link {
    font-size: 0.85rem;
}

/* ─── Toast ─────────────────────────────────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
}

/* ─── Social Buttons ────────────────────────────────────────────────────── */
.social-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--player-transition);
    text-decoration: none;
}

.social-btn:hover {
    transform: scale(1.15);
}

/* ─── Cookie Banner ─────────────────────────────────────────────────────── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: none;
}

/* ─── Theme Options ─────────────────────────────────────────────────────── */
.theme-option {
    cursor: pointer;
    transition: var(--player-transition);
    border: 2px solid transparent !important;
}

.theme-option:hover,
.theme-option.active {
    border-color: var(--bs-primary) !important;
    transform: scale(1.02);
}

/* ─── Genre Badge ───────────────────────────────────────────────────────── */
.genre-badge {
    font-size: 0.75rem;
}

/* ─── Skeleton Loader ───────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(108,117,125,0.2) 25%,
        rgba(108,117,125,0.4) 50%,
        rgba(108,117,125,0.2) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
footer {
    margin-top: auto;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bs-secondary); border-radius: 3px; }

/* ─── Animationen ───────────────────────────────────────────────────────── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes wave {
    0%, 100% { height: 4px; }
    50%       { height: var(--max-h, 30px); }
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

@keyframes marquee {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
#btn-play {
    position: relative;
    z-index: 10;
}

#visualizer {
    pointer-events: none;
}