/* Q900 Gold Mediaplayer (SubFooter) */
body {
    padding-bottom: 120px;
}

body.angemeldet {
    padding-bottom: 120px;
}

body.player-offen {
    padding-bottom: min(78vh, 640px);
}

body.player-rate-limited {
    padding-bottom: 48px;
}

body.player-rate-limited.angemeldet {
    padding-bottom: 48px;
}

.q900-player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 40px;
    z-index: 110;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.q900-player > * {
    pointer-events: auto;
}

.q900-player-peek {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    width: min(560px, 96vw);
    line-height: 0;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.45);
}

.q900-player-peek-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center bottom;
    display: block;
}

.q900-player:not(.is-collapsed) .q900-player-peek {
    display: none;
}

.q900-player-body {
    width: min(560px, 96vw);
    background: rgba(12, 12, 12, 0.92);
    border: 1px solid rgba(180, 150, 80, 0.35);
    border-radius: 12px 12px 0 0;
    padding: 0.55rem 0.55rem 0.4rem;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.55);
}

.q900-player.is-collapsed .q900-player-body {
    display: none !important;
}

.q900-player-device {
    position: relative;
    width: 100%;
    line-height: 0;
    user-select: none;
}

.q900-player-face {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    pointer-events: none;
}

.q900-player-text,
.q900-player-cover-wrap,
.q900-player-time {
    position: absolute;
    overflow: hidden;
    box-sizing: border-box;
}

.q900-player-text {
    padding: 0.35rem 0.45rem;
    color: #d8e4ee;
    font-size: clamp(0.62rem, 1.6vw, 0.78rem);
    line-height: 1.25;
    text-align: left;
}

.q900-player-desc {
    max-height: 100%;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.q900-player-cover-wrap {
    background: #000;
    position: absolute;
    overflow: hidden;
}

.q900-player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Quadratische Cover vollständig im Querfenster (seitliche Balken ok) */
    object-fit: contain;
    object-position: center center;
    display: block;
}

.q900-player-time {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ec8dc;
    font-family: Consolas, 'Courier New', monospace;
    font-size: clamp(0.58rem, 1.5vw, 0.72rem);
    letter-spacing: 0.04em;
    background: rgba(0, 0, 0, 0.35);
}

.q900-player-seek {
    position: absolute;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 999px;
    overflow: hidden;
    z-index: 2;
}

.q900-player-seek:focus {
    outline: none;
}

.q900-player-seek:focus-visible {
    box-shadow: inset 0 0 0 1px rgba(255, 230, 140, 0.7);
}

.q900-player-seek-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(180deg, #e2c57a 0%, #b8923f 55%, #8f702c 100%);
    box-shadow: 0 0 6px rgba(226, 197, 122, 0.35);
    pointer-events: none;
}

.q900-player-hit {
    position: absolute;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    border-radius: 50%;
}

.q900-player-hit:focus {
    outline: none;
}

.q900-player-hit:hover,
.q900-player-hit:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 230, 140, 0.65);
}

.q900-player-collapse {
    margin-top: 0.35rem;
    width: 100%;
    border: 1px solid #444;
    background: #1a1a1a;
    color: #ddd;
    font: inherit;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

.q900-player-collapse:hover {
    background: #252525;
}

.q900-player-settings {
    margin-top: 0.45rem;
    max-height: 220px;
    overflow: auto;
    border-top: 1px solid #333;
    padding-top: 0.4rem;
}

.q900-player-shuffle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #ccc;
    margin-bottom: 0.35rem;
}

.q900-player-tracklist button {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: #cde;
    font: inherit;
    font-size: 0.78rem;
    padding: 0.28rem 0.2rem;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
}

.q900-player-tracklist button.is-current {
    color: #ffe08a;
}

.q900-player-tracklist button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.q900-player-track-art {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    object-fit: cover;
    border-radius: 3px;
    background: #111;
    display: block;
}

.q900-player-track-art.is-empty {
    background: #1a1a1a;
    box-shadow: inset 0 0 0 1px #333;
}

.q900-player-track-title {
    min-width: 0;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.q900-player-status {
    margin: 0.25rem 0 0;
    min-height: 1em;
    font-size: 0.72rem;
    color: #999;
}

.q900-player-status.error {
    color: #e08080;
}

/* Tracks Admin */
.tracks-seite {
    max-width: 960px;
}

.tracks-hinweis {
    color: #aaa;
    margin-top: 0;
}

.tracks-token-board {
    margin: 0.85rem 0 1rem;
    padding: 0.75rem 0.9rem;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid #3a3a3a;
    border-radius: 8px;
}

.tracks-token-line {
    margin: 0 0 0.35rem;
    color: #ddd;
    font-size: 0.88rem;
    line-height: 1.45;
}

.tracks-token-hint {
    margin: 0 0 0.65rem;
    color: #999;
    font-size: 0.78rem;
    line-height: 1.4;
}

.tracks-sync-btn {
    border: 1px solid #555;
    background: #1a1a1a;
    color: #eee;
    font: inherit;
    font-size: 0.82rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}

.tracks-sync-btn:hover:not(:disabled) {
    background: #252525;
}

.tracks-sync-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tracks-sync-status {
    margin-left: 0.55rem;
    font-size: 0.78rem;
    color: #aaa;
}

.tracks-sync-status.success {
    color: #9fd49f;
}

.tracks-sync-status.error {
    color: #e08080;
}

.tracks-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.tracks-kachel {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 0.55rem;
    color: #eee;
}

.tracks-kachel.is-excluded {
    opacity: 0.55;
}

.tracks-cover {
    aspect-ratio: 1;
    background: #111;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.tracks-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tracks-titel {
    font-size: 0.88rem;
    margin: 0 0 0.25rem;
    line-height: 1.25;
}

.tracks-meta {
    margin: 0 0 0.45rem;
    font-size: 0.75rem;
    color: #999;
}

.tracks-toggle {
    width: 100%;
    border: 1px solid #555;
    background: #222;
    color: #eee;
    font: inherit;
    font-size: 0.78rem;
    padding: 0.3rem;
    cursor: pointer;
    border-radius: 4px;
}

@media (max-width: 700px) {
    .q900-player {
        bottom: 36px;
    }

    .q900-player-body {
        width: 100vw;
        border-radius: 10px 10px 0 0;
    }

    .q900-player-peek {
        width: 100vw;
        border-radius: 0;
    }
}
