:root {
    --bg: #16140f;
    --bg-erhoben: #1f1c16;
    --linie: #332e24;
    --text: #ece4d3;
    --text-gedaempft: #a89d87;
    --gold: #c9a24c;
    --rost: #a8532f;
    --schrift-anzeige: 'Fraunces', Georgia, serif;
    --schrift-text: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 3px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--schrift-text);
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ---------- Kopfbereich ---------- */

.kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--linie);
}

.marke {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--schrift-anzeige);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.01em;
}

.marke-scheibe {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at center, var(--gold) 0 3px, #0c0a07 3px 4px, #0c0a07 4px 5px, var(--text) 5px 6px, #0c0a07 6px 100%);
    flex-shrink: 0;
}

.zurueck {
    font-size: 0.9rem;
    color: var(--text-gedaempft);
    transition: color 0.15s ease;
}
.zurueck:hover { color: var(--gold); }

.kopf-rechts {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.suche-form {
    display: flex;
    align-items: center;
    background: var(--bg-erhoben);
    border: 1px solid var(--linie);
    border-radius: 20px;
    padding: 4px 6px 4px 14px;
    gap: 6px;
}

.suche-form input[type="search"] {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--schrift-text);
    font-size: 0.85rem;
    width: 170px;
    outline: none;
}
.suche-form input[type="search"]::placeholder { color: var(--text-gedaempft); }

.suche-form button {
    background: transparent;
    border: none;
    color: var(--text-gedaempft);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
}
.suche-form button:hover { color: var(--gold); }

@media (max-width: 640px) {
    .suche-form input[type="search"] { width: 110px; }
}

.ansicht-umschalter {
    display: flex;
    gap: 4px;
    background: var(--bg-erhoben);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 3px;
}

.umschalter-btn {
    font-family: var(--schrift-text);
    font-size: 0.85rem;
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--text-gedaempft);
    border-radius: 2px;
    cursor: pointer;
}

.umschalter-btn[aria-pressed="true"] {
    background: var(--gold);
    color: #16140f;
    font-weight: 600;
}

.admin-link {
    font-size: 0.82rem;
    color: var(--text-gedaempft);
    padding: 6px 10px;
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    margin-left: 8px;
}
.admin-link:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Inhalt / Sortierleiste ---------- */

.inhalt {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px;
}

.sortierleiste {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--linie);
    flex-wrap: wrap;
}

.sortierleiste-label {
    color: var(--text-gedaempft);
    font-size: 0.85rem;
}

.sort-link {
    font-size: 0.9rem;
    color: var(--text-gedaempft);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.sort-link.aktiv {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.sort-link:hover { color: var(--text); }

.anzahl {
    margin-left: auto;
    color: var(--text-gedaempft);
    font-size: 0.85rem;
}

.leer {
    color: var(--text-gedaempft);
    padding: 40px 0;
    text-align: center;
}
.leer a { color: var(--gold); }

/* ---------- Kartenansicht ---------- */

.ansicht-karten {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .ansicht-karten { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .ansicht-karten { gap: 12px; }
    .karte-titel { font-size: 0.92rem; }
    .karte-meta { font-size: 0.72rem; }
    .karte-interpret { font-size: 0.72rem; }
}

.ansicht-karten[hidden],
.ansicht-tabelle[hidden] {
    display: none;
}

.karte {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.karte-cover {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-erhoben);
    border: 1px solid var(--linie);
}

.karte-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.karte:hover .karte-cover img { transform: scale(1.04); }

.karte-cover-platzhalter {
    display: block;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at center, var(--gold) 0 3%, transparent 3% 100%),
        repeating-radial-gradient(circle at center, var(--linie) 0 2px, transparent 2px 8px);
}

.karte-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.karte-interpret {
    font-size: 0.78rem;
    color: var(--text-gedaempft);
    text-transform: none;
}

.karte-titel {
    font-family: var(--schrift-anzeige);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.karte-meta {
    font-size: 0.78rem;
    color: var(--text-gedaempft);
}

/* ---------- Tabellenansicht ---------- */

.ansicht-tabelle table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.ansicht-tabelle th {
    text-align: left;
    padding: 10px 14px;
    color: var(--text-gedaempft);
    font-weight: 500;
    font-size: 0.78rem;
    border-bottom: 1px solid var(--linie);
}

.ansicht-tabelle td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--linie);
}

.ansicht-tabelle tr:hover { background: var(--bg-erhoben); cursor: pointer; }
.ansicht-tabelle tr.buchstaben-trenner-zeile:hover { background: var(--bg-erhoben); cursor: default; }

.zelle-wert { color: var(--gold); text-align: right; }

/* ---------- Detailseite ---------- */

.inhalt-detail { max-width: 780px; }

.detail-kopf {
    display: flex;
    gap: 32px;
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--linie);
}

.detail-cover {
    width: 220px;
    flex-shrink: 0;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-erhoben);
    border: 1px solid var(--linie);
}

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

.detail-cover-platzhalter {
    display: block;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at center, var(--gold) 0 3%, transparent 3% 100%),
        repeating-radial-gradient(circle at center, var(--linie) 0 2px, transparent 2px 8px);
}

.detail-interpret {
    color: var(--text-gedaempft);
    margin: 0 0 4px;
    font-size: 0.95rem;
}

.detail-titel {
    font-family: var(--schrift-anzeige);
    font-size: 1.9rem;
    font-weight: 600;
    margin: 0 0 18px;
}

.detail-fakten {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    margin: 0 0 18px;
}

.detail-fakten div { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--linie); padding-bottom: 4px; }
.detail-fakten dt { color: var(--text-gedaempft); font-size: 0.82rem; margin: 0; }
.detail-fakten dd { margin: 0; font-size: 0.85rem; }

.externer-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
}

.songliste-seite { margin-bottom: 24px; }

.seiten-titel {
    font-family: var(--schrift-anzeige);
    font-size: 1rem;
    color: var(--text-gedaempft);
    margin: 0 0 8px;
}

.songs { list-style: none; margin: 0; padding: 0; }

.song {
    display: grid;
    grid-template-columns: 28px 1fr auto auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--linie);
}

.song-nr { color: var(--text-gedaempft); font-size: 0.85rem; }
.song-titel { font-size: 0.95rem; }
.song-laufzeit { color: var(--text-gedaempft); font-size: 0.82rem; }

.song-apple,
.song-spotify {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.song-apple {
    color: var(--rost);
    border: 1px solid var(--rost);
}
.song-apple:hover { background: var(--rost); color: var(--bg); }

.song-spotify {
    color: #1DB954;
    border: 1px solid #1DB954;
}
.song-spotify:hover { background: #1DB954; color: #0c0a07; }

/* ---------- Startbildschirm (index.php) ---------- */

.start {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    text-align: center;
}

.plattenspieler {
    position: relative;
    width: 220px;
    height: 220px;
}

.plattenspieler-scheibe {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--gold) 0 7%, #0c0a07 7% 8%,
        #0c0a07 8% 100%),
        repeating-radial-gradient(circle at center, #201c15 0 2px, #16140f 2px 6px);
    animation: dreh 2.8s linear infinite;
    box-shadow: 0 0 0 1px var(--linie), 0 20px 40px -10px rgba(0,0,0,0.6);
}

/* Ein Lichtstreifen, der sich mit der Scheibe mitdreht - ohne ihn
   wäre die Drehung fast unsichtbar, weil konzentrische Rillen aus
   sich selbst heraus keine erkennbare Bewegung zeigen. */
.plattenspieler-scheibe::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.14) 6deg,
        transparent 22deg,
        transparent 360deg
    );
}

/* Kleiner Strich wie ein Fingerabdruck/Kratzer auf dem Label - macht
   die Rotation zusätzlich klar erkennbar. */
.plattenspieler-scheibe::after {
    content: '';
    position: absolute;
    top: 9%;
    left: 50%;
    width: 2px;
    height: 12%;
    background: rgba(22, 20, 15, 0.55);
    transform: translateX(-50%);
}

.plattenspieler-arm {
    position: absolute;
    top: -6px;
    right: 6px;
    width: 90px;
    height: 5px;
    background: var(--text-gedaempft);
    border-radius: 3px;
    transform-origin: right center;
    transform: rotate(-28deg);
}

.plattenspieler-arm::after {
    content: '';
    position: absolute;
    left: -3px;
    top: -3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--gold);
}

@keyframes dreh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .plattenspieler-scheibe { animation: none; }
}

.start-titel {
    font-family: var(--schrift-anzeige);
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
}

.start-untertitel {
    color: var(--text-gedaempft);
    margin: -20px 0 0;
    font-size: 0.95rem;
}

.start-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    padding: 24px 40px;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.start-link:hover { transform: translateY(-2px); }
.start-link:hover .plattenspieler-scheibe { box-shadow: 0 0 0 1px var(--gold), 0 20px 40px -10px rgba(0,0,0,0.6); }

.start-btn {
    font-family: var(--schrift-text);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--linie);
}

.start-btn.primaer {
    background: var(--gold);
    color: #16140f;
    border-color: var(--gold);
}

.start-btn.sekundaer {
    color: var(--text);
}

.start-btn:hover.sekundaer { border-color: var(--gold); color: var(--gold); }

/* ---------- Formulare (neue Platte) ---------- */

.inhalt-formular { max-width: 720px; }

.login-fehler {
    color: var(--rost);
    background: rgba(168, 83, 47, 0.12);
    border: 1px solid var(--rost);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.88rem;
    margin: 0 0 16px;
}

.formular-schritte {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 0.82rem;
    color: var(--text-gedaempft);
}

.schritt.aktiv { color: var(--gold); font-weight: 600; }

.formular-titel {
    font-family: var(--schrift-anzeige);
    font-size: 1.7rem;
    font-weight: 600;
    margin: 0 0 10px;
}

.formular-hinweis {
    color: var(--text-gedaempft);
    font-size: 0.92rem;
    margin: 0 0 24px;
    max-width: 60ch;
}
.formular-hinweis code {
    background: var(--bg-erhoben);
    padding: 1px 5px;
    border-radius: 2px;
    font-size: 0.85em;
}

.formular {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.formular-zeile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.feld {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-gedaempft);
}

.feld input[type="text"],
.feld input[type="file"] {
    font-family: var(--schrift-text);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-erhoben);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 10px 12px;
}

.feld input[type="text"]:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.feld-mit-auswahl {
    display: flex;
    gap: 8px;
}

.feld-mit-auswahl input[type="text"] {
    flex: 1;
    min-width: 0;
}

.feld-mit-auswahl select {
    font-family: var(--schrift-text);
    font-size: 0.82rem;
    color: var(--text-gedaempft);
    background: var(--bg-erhoben);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 0 8px;
    max-width: 130px;
}

@media (max-width: 520px) {
    .feld-mit-auswahl { flex-direction: column; }
    .feld-mit-auswahl select { max-width: none; padding: 8px 10px; }
}

.formular-zwischentitel {
    font-family: var(--schrift-anzeige);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 12px 0 0;
}

.track-tabelle {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track-zeile {
    display: grid;
    grid-template-columns: 60px 1fr 90px;
    gap: 8px;
}

.track-zeile-bearbeiten {
    grid-template-columns: 56px 56px 1fr 90px;
}

.track-zeile-neu input {
    border-style: dashed;
}

.track-zeile input {
    font-family: var(--schrift-text);
    font-size: 0.88rem;
    color: var(--text);
    background: var(--bg-erhoben);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 8px 10px;
}

.songs-textarea {
    font-family: var(--schrift-text);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg-erhoben);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 10px 12px;
    resize: vertical;
}

.formular-aktionen {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 8px;
}

.formular-link {
    font-size: 0.88rem;
    color: var(--text-gedaempft);
    border-bottom: 1px solid var(--linie);
}
.formular-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

.start-btn { cursor: pointer; }

/* ---------- Trefferliste (Discogs-Suche) ---------- */

.treffer-liste {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.treffer { margin: 0; }

.treffer-inhalt {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
}

.treffer-inhalt:hover {
    background: var(--bg-erhoben);
    border-color: var(--linie);
}

.treffer-cover {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
    background: var(--bg-erhoben);
}
.treffer-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.treffer-info { display: flex; flex-direction: column; gap: 3px; }
.treffer-titel { font-size: 0.92rem; color: var(--text); }
.treffer-meta { font-size: 0.78rem; color: var(--text-gedaempft); }

.richtung-umschalter {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
}
.richtung-umschalter a { color: var(--text-gedaempft); border-bottom: 1px solid transparent; }
.richtung-umschalter a.aktiv { color: var(--gold); border-bottom-color: var(--gold); }
.richtung-umschalter a:hover { color: var(--text); }

.interpret-kopf-titel {
    font-family: var(--schrift-anzeige);
    font-size: 1.3rem;
    font-weight: 600;
}

.karte-og {
    justify-content: center;
    padding: 18px;
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    background: var(--bg-erhoben);
}
.karte-og:hover { border-color: var(--gold); }
.karte-info-og { text-align: center; align-items: center; }

/* ---------- A-Z-Schnellsprungleiste ---------- */

.inhalt-mit-az { padding-right: 52px; }

.az-leiste {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.68rem;
    z-index: 5;
}

.az-leiste a,
.az-inaktiv {
    width: 18px;
    text-align: center;
    line-height: 1.5;
    color: var(--text-gedaempft);
}

.az-leiste a { color: var(--gold); }
.az-leiste a:hover { color: var(--text); }
.az-inaktiv { color: var(--linie); }

html { scroll-behavior: smooth; }

@media (max-width: 640px) {
    .inhalt-mit-az { padding-right: 28px; }
    .az-leiste { right: 2px; font-size: 0.6rem; }
    .az-leiste a, .az-inaktiv { width: 14px; }
}

/* ---------- Wert-Schätzung (Discogs) ---------- */

.wert-fehlt {
    color: var(--text-gedaempft);
    font-style: italic;
}

.wert-schaetzung {
    display: block;
    font-size: 0.8rem;
    color: var(--gold);
    margin-top: 2px;
}

.wert-uebernehmen-link {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--rost);
    border-bottom: 1px solid var(--rost);
    margin-top: 2px;
}
.wert-uebernehmen-link:hover { color: var(--text); border-bottom-color: var(--text); }

.buchstaben-trenner {
    grid-column: 1 / -1;
    font-family: var(--schrift-anzeige);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold);
    padding: 18px 0 6px;
    margin-top: 4px;
    border-bottom: 2px solid var(--gold);
}
.buchstaben-trenner:first-child { margin-top: 0; padding-top: 0; }

.buchstaben-trenner-zeile td {
    font-family: var(--schrift-anzeige);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gold);
    background: var(--bg-erhoben);
    border-bottom: 2px solid var(--gold);
    padding: 8px 14px;
    cursor: default;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .detail-kopf { flex-direction: column; }
    .detail-cover { width: 100%; }
    .detail-fakten { grid-template-columns: 1fr; }
    .song { grid-template-columns: 22px 1fr; row-gap: 6px; }
    .song-laufzeit { grid-column: 2; justify-self: start; }
    .song-apple, .song-spotify { grid-column: 2; justify-self: start; display: inline-block; margin-right: 8px; }
}
