*,
::before,
::after {
    box-sizing: border-box;
}

body {
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: #111;
}

/* Mobile-First Ansatz */
.body {
    background: url('background_low.jpeg') no-repeat center center;
    background-size: cover;
    position: relative;
    min-height: 100dvh;
    /* Stellt sicher, dass der gesamte Viewport abgedeckt wird */
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    /* Horizontale Zentrierung */
    justify-content: center;
    margin: 0;
    font-family: "Rubik", sans-serif;
    /* Standardschrift */
    font-optical-sizing: auto;
    /* Automatische optische Anpassung */
    padding: 16px;
    height: 100dvh;
}

.body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #00000033;
    /* Kopiert das Hintergrundbild von body */
    background-size: cover;
    /* Sichert die gleiche Skalierung wie im body */
    backdrop-filter: blur(7px);
    /* Blur-Effekt */
    z-index: 1;
    /* Hinter den Inhalt legen */
}

/* Zusätzliche Stile für andere Elemente */
.container {
    width: 100%;
    max-width: 600px;
    /* Optionale Maximalbreite */
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    padding: 10px;
    box-shadow: 2px 5px 10px 6px #00000033;
    margin-bottom: 160px;
    z-index: 2;
    border-radius: 4px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* Höhe ist 100% der Breite */
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: all 2s ease;
}

.hidden {
    opacity: 0;
}


h1 {
    margin: 0;
    margin-top: 12px;
    color: #222;
}

p {
    margin-top: 8px;
    color: #555;
}

.controls {
    display: flex;
    justify-content: space-between;
    /* Verteil die Items mit gleichmäßigem Abstand */
}

#back,
#play,
#next {
    width: 32px;
    height: 32px;
    color: #333;
    cursor: pointer;
    transition: all .8s ease-out;
}

#back:hover,
#play:hover,
#next:hover {
    transform: scale(1.3);
}

.artist_counter {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#artist {
    flex-grow: 1;
    text-align: left;
}

#counter {
    background: #ececec;
    padding: 6px;
    border-radius: 8px;
    color: #555;
    font-size: 10px;
    margin-top: 4px;
    opacity: 0;
}

.credits {
    position: absolute;
    display: block;
    color: #ffffff99;;
    opacity: 1;
    bottom: 0;
    margin: 0;
    right: 0;
    padding: 8px;
    z-index: 1;
    font-size: 8px;
    background: #00000022;
    border-radius: 8px 0 0 0;
    backdrop-filter: blur(4px);
    border: 1px solid #ffffff33;
    border-bottom: none;
    border-right: none;
    transition: transform 3s ease;
    transform: translateY(50px);
}

/* Toolbar Glassmorphism Style */
.toolbar-glass {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    width: 95vw;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    z-index: 10;
    padding: 18px 28px 14px 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    box-sizing: border-box;
}

.toolbar-glass h1 {
    margin: 0 0 2px 0;
    font-size: 1.2rem;
    color: #111;
    text-align: center;
}

.toolbar-glass .artist_counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.toolbar-glass #artist {
    font-size: 1rem;
    color: #222;
    margin: 0;
    text-align: center;
}

.toolbar-glass #counter {
    position: absolute;
    bottom: 0;
    left: 50%;
    bottom: -18px;
    transform: translateX(-50%);
    background: #ececec;
    padding: 6px 12px;
    border-radius: 8px;
    color: #555;
    font-size: 10px;
    opacity: 0;
}

.toolbar-glass .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 4px;
    overflow: hidden;
    transition: all 2s ease;
}

.toolbar-glass #back,
.toolbar-glass #play,
.toolbar-glass #next {
    width: 32px;
    height: 32px;
    color: #333;
    cursor: pointer;
    transition: all .8s ease-out;
}

.toolbar-glass #back:hover,
.toolbar-glass #play:hover,
.toolbar-glass #next:hover {
    transform: scale(1.3);
}

/* Moderner Play-Button mit Gradient */
#play_button {
    background: linear-gradient(90deg, #c0417c 0%, #e96443 100%);
    color: #111;
    width: 150px;
    align-self: center;
    justify-content: center;
    border: 2.5px solid #380e26;
    border-radius: 999px;
    padding: 12px 28px 12px 18px;
    font-size: 1.1rem;
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    box-shadow: 0 4px 16px 0 #c0417c44;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    height: 48px;
    overflow: hidden;;
    transition: background 0.4s, transform 0.2s, box-shadow 0.2s, border-color 0.3s, height 3s, margin 3s, padding 3s, scale 0.8s;
}

#play_button:hover {
    background: linear-gradient(90deg, #c0417c 0%, #e96443 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 24px 0 #c0417c66;
    border-color: #461531;
}

#play_button_img {
    margin-right: 8px;
}

/* Index Button Styles */
.index-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    z-index: 10;
    color: #333;
    transition: all 0.3s ease;
}

@media (min-width: 800px) {
  .index-button {
    z-index: 5;
  }
}

.index-button:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.1);
}

/* Song Index Styles */

.container {
    position: relative;
    overflow: hidden;
}


.song-index {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100%;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-left: 1.5px solid rgba(255, 255, 255, 0.28);
    padding: 20px;
    transition: right 0.3s ease-in-out, opacity 0.3s;
    overflow-y: auto;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
}

/* Hover-Effekt NUR auf Desktop (breiter Viewport und Maus) */
@media (hover: hover) and (pointer: fine) and (min-width: 800px) {
  .container:hover .song-index {
    right: 0;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Auf Touch/Mobile zählt nur .active */
.song-index.active {
  right: 0;
  opacity: 1;
  pointer-events: auto;
}

.song-index.active {
    right: 0;
    opacity: 1;
    pointer-events: auto;
}

.song-index h2 {
    color: #333;
    margin-bottom: 20px;
}

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

.song-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.song-item.active {
    background: rgba(192, 65, 124, 0.2);
    border-color: rgba(192, 65, 124, 0.4);
}

@media (max-width: 600px) {
    .toolbar-glass {
        max-width: 80vw;
        padding: 12px 8px 10px 8px;
        bottom: 64px
    }
    .toolbar-glass h1 {
        font-size: 1rem;
    }
    .toolbar-glass #artist {
        font-size: 0.9rem;
    }
}