* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #a755ff;
    --white: #ffffff;
    --black: #000000;
    --beat-cols:
        60px            /* Nummer + Play + Bars */
        minmax(0,1fr)   /* Titel */
        70px            /* BPM */
        70px            /* Key */
        90px;           /* Länge / Progress */
}

/* UNIVERSAL */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    height: 6%;
    background: #0d0018;
    color: #ffffff;

    background: rgba(0, 0, 0, 0.2); /* sehr leichtes Schwarz */
    backdrop-filter: blur(12px);     /* das verschmilzt es mit dem BG */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    box-shadow: 0 0 25px rgba(0,0,0,0.45);

    z-index: 1000;
}

/*
.background-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: saturate(0.8) contrast(1.05);
}

video::-webkit-media-controls {
    display:none !important;
}
*/

.background-image {
    position: fixed;
    inset: 0;
    background-image: url("images/background_web.png");
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.background-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at top,
        rgba(122,0,255,0.1),
        rgba(0,0,0,0.7) 70%
      );
    z-index: -1;
    pointer-events: none;
}

body {
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;

    background-color: #050010;
}

footer {
    margin-top: 10rem;
}

@media (max-width: 600px) {
    .background-video {
      display: none;
    }
    .background-overlay {
      background-image: url("images/background_web.png");
    }
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-nav {
    padding: 0;
    position: absolute;
    display: flex;
    align-items: center;
    left: clamp(3.5rem, 6vw, 6rem);
    gap: clamp(0.9rem, 2vw, 1.6rem);
}

.main-nav a {
    margin-left: 0.2rem;
    font-size: 0.8rem;
    color: white;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-decoration: none;
}

.main-nav a:hover {
    color:#a755ff;
}

.main-nav a.active {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(122,0,255,0.9);
    font-weight: 600;
}
  
.main-nav a.active:hover {
    color: var(--accent);
}

.main-nav a.active::after {
    content: "";
    display: block;
    margin: 0 auto;
    width: 60%;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
    margin-top: 4px;
    box-shadow: 0 0 6px rgba(122,0,255,0.8);
}

/* Checkbox verstecken */
.nav-toggle {
    display: none;
  }
  
  /* Burger-Icon (Desktop: hidden) */
  .burger {
    display: none;
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1100;
  }
  
  .burger span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #e8ddff;
    border-radius: 999px;
    box-shadow: 0 0 6px rgba(122,0,255,0.7);
    transition: 0.2s ease;
  }
  
  .burger span:nth-child(1) { top: 0; }
  .burger span:nth-child(2) { top: 9px; }
  .burger span:nth-child(3) { bottom: 0; }
  
  /* Burger wird zum X im Open-State */
  .nav-toggle:checked + .burger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .nav-toggle:checked + .burger span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked + .burger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* MOBILE */
  @media (max-width: 600px) {
    .burger { display: block; }
  
    .main-nav {
      position: fixed;
      top: 6%;     /* oder z.B. 60px wenn dein Header fix 60px hoch ist */
      left: 0;
      width: 100vw;
  
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
  
      padding: 1rem 1.2rem;
      background: rgba(0,0,0,0.75);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(232,221,255,0.08);
  
      transform: translateY(-120%);
      transition: transform 0.25s ease;
      z-index: 1050;
    }
  
    /* nav öffnet sich */
    .nav-toggle:checked + .burger + .main-nav {
      transform: translateY(0);
    }
  
    .main-nav a {
      margin-left: 0;
      font-size: 1.05rem;
      text-align: left;
    }
  }

/* Logo-Bild */
.logo-img {
    margin-left: -0.75rem;
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(122,0,255,0.7));
}

/* BEATS */
.beat-page {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    padding-top: 2rem;
}

.playlist-stash {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 65vh;

    /* align with header width */
    width: min(95vw, 1300px);
    margin: 0.8rem auto 0;
}

#playlist-stash::-webkit-scrollbar {
    display: none;
}

.track {
    display: grid;
    grid-template-columns: var(--beat-cols);
    align-items: center;
    gap: 1rem;
    width: min(95vw, 1300px);
    margin: 0 auto;
    padding: 1.2rem 1rem;

    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    backdrop-filter: blur(6px);
    transition: 0.25s ease;
    position: relative;
}


.track:hover {
    background: rgba(255,255,255,0.1);
}

.track.active {
    background: rgba(122, 0, 255, 0.12);
    box-shadow: 0 0 14px rgba(122, 0, 255, 0.45);
    border: 1px solid rgba(232, 221, 255, 0.08);
}
  
/* optional: leichter „line“-accent links */
.track.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 3px;
    background: #7a00ff;
    box-shadow: 0 0 8px rgba(122,0,255,0.9);
    border-radius: 999px;
}

.track-number {
    opacity: 1;
    transition: 0.15s ease;
    color: rgba(232,221,255,0.9);
    text-align: center;
    position: relative;
    display: flex;
    justify-self: center;
}  

.stash-play-button {
    opacity: 0;
    font-size: 1.1rem;
    justify-self: center;
    position: absolute;
    left: 40px;
    cursor: pointer;
    background: none;
    border: none;
    appearance: none;
    box-shadow: none;
    -webkit-appearance: none;
    color: #e8ddff;
}

.track:hover .track-number {
    opacity: 0;
}

.track:hover .stash-play-button {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.track:hover {
    background: rgba(255,255,255,0.06);
    cursor: context-menu;
}

.num-text {
    opacity: 1;
    transition: 0.15s ease;
    display: inline-block;
}

/* Hover: Zahl weg, Play sichtbar */
.track:hover .num-text {
    opacity: 0;
}

/* Playing (nicht hover): Zahl weg, Bars sichtbar */
.track.active .num-text {
    opacity: 0;
}

.track.active:not(:hover) .playing-bars {
    opacity: 1;
}

.playing-bars {
    position: absolute;
    left: 40px;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;

    opacity: 0;
}

.playing-bars span {
    width: 10px;
    border-radius: 2px;
    background: #7a00ff;
    animation: playing 0.8s infinite ease-in-out;
}

.playing-bars span:nth-child(1) { animation-delay: 0ms; }
.playing-bars span:nth-child(2) { animation-delay: 120ms; }
.playing-bars span:nth-child(3) { animation-delay: 240ms; }

@keyframes playing {
    0% { height: 3px; }
    50% { height: 12px; }
    100% { height: 3px; }
}

.track-title {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);

    justify-self: start;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-bpm {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);

    justify-self: center;
    text-align: center;
}

.track-key {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);

    justify-self: center;
    text-align: center;
}

.track-length {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);

    justify-self: center;
    text-align: center;
    position: relative;
    min-width: 0;
}

/* die Bar selbst */
.stash-progress {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    width: 80%;
    height: 4px;
    border-radius: 999px;
    background: #7a00ff;
    box-shadow: 0 0 6px rgba(122,0,255,0.7);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.1s linear;

    transform: translateX(-50%) scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

.stash-progress-bg {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Wenn aktiv → Länge ausblenden, Bar einblenden */

.track.active:not(:hover) .stash-progress-bg,
.track.active:not(:hover) .stash-progress {
    opacity: 1;
}
.track.active:not(:hover) .track-length {
    color: transparent;
}

.heading {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 550;
    width: 100%;
    text-align: center;
    margin-top: 5rem;
    margin-bottom: -6.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);
}

.table {
    display: grid;
    grid-template-columns: var(--beat-cols);
    align-items: center;
    justify-items: center;
  
    width: min(95vw, 1300px);
    margin: 7% auto 1%;
    padding: 1rem;
  
    color: #e8ddff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

#th-number {
    justify-self: center;
}

#th-title {
    justify-self: start;
    text-align: left;
}

.table span {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
    font-weight: 500;
  }

#th-bpm,
#th-key,
#th-length {
    text-align: center;
}

/* Volume */
.stash-volume {
    position: fixed;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
  
    display: flex;
    align-items: center;
    gap: 0.8rem;
  
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(10px);
  
    border: 1px solid rgba(232,221,255,0.08);
    box-shadow: 0 0 18px rgba(122,0,255,0.25);

    width: auto;
    inline-size: fit-content;
    max-width: none;
}
  
#stash-volume-slider {
    width: 180px;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    cursor: pointer;
}
  
#stash-volume-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #7a00ff;
    box-shadow: 0 0 8px rgba(122,0,255,0.8);
}
  
#stash-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #7a00ff;
    border: none;
    box-shadow: 0 0 8px rgba(122,0,255,0.8);
}
  
.vol-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    user-select: none;
    transition: 0.15s ease;
    filter: drop-shadow(0 0 4px rgba(122,0,255,0.4));
    flex: 0 0 20px;   /* nimmt immer exakt 20px Platz, schrumpft nicht */
    display: block;   /* kein baseline/inline-shift */
    margin: 0;
    padding: 0;
}

.vol-icon:hover{
    transform: scale(1.08);
    text-shadow: 0 0 8px rgba(122,0,255,0.8);
}
  
.vol-value {
    font-size: 0.8rem;
    min-width: 3.2ch;
    text-align: right;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
  
/* Mobile kleiner */
@media (max-width: 600px) {
    .stash-volume {
      bottom: 1.2rem;
      padding: 0.6rem 0.9rem;
    }
    #stash-volume-slider {
      width: 130px;
    }
}

/* ============================= */
/* MOBILE BEATSTASH LAYOUT */
/* ============================= */
@media (max-width: 600px) {

    /* 1) Grid auf 3 Spalten reduzieren:
       #/Play | Title | Length (als kleine Infozeile)
    */
    :root {
      --beat-cols: 36px minmax(0,1fr) 44px;
    }
  
    /* 2) Layout-Container etwas luftiger unter Header */
    .beat-page {
      padding-top: 5rem; /* falls Header reindrückt */
    }
  
    /* 3) Header-Row vereinfachen */
    #th-bpm, #th-key, #th-length {
      display: none;
    }
  
    .table {
      font-size: 0.75rem;
      padding: 0.7rem;
    }
  
    /* 4) Track-Zeilen kompakter */
    .track {
      padding: 0.9rem 0.8rem;
      gap: 0.6rem;
    }
  
    .track-title {
      font-size: 0.95rem;
    }
  
    /* 5) BPM/Key/Length unter den Titel stapeln */
    .track-bpm,
    .track-key,
    .track-length {
      grid-column: 2;        /* unter Title */
      justify-self: start;
      font-size: 0.78rem;
      opacity: 0.8;
      text-shadow: none;
    }
  
    /* kleine inline Info-Chain */
    .track-bpm::after { content: " BPM • "; }
    .track-key::after { content: " • "; }
  
    /* 6) Play-Button auf mobile immer sichtbar + größer */
    .stash-play-button {
      opacity: 1;
      font-size: 1.2rem;
      left: 18px;            /* innerhalb Spalte 1 */
    }
  
    /* 7) Nummer nur zeigen wenn NICHT aktiv / nicht hover relevant */
    .track-number { font-size: 0.85rem; }
  
    /* 8) Playing bars gut sichtbar */
    .playing-bars span {
      width: 3px;
    }
  
    /* 9) Progressbars etwas breiter im mobile layout */
    .stash-progress,
    .stash-progress-bg {
      width: 92%;
    }
  
    /* 10) Playlist etwas mehr Höhe, damit man scrollen kann */
    .playlist-stash {
      max-height: 75vh;
      padding: 0.6rem;
      gap: 0.6rem;
    }
  
    /* 11) Heading kleiner */
    .heading {
      font-size: 1.35rem;
      margin-top: 4rem;
      margin-bottom: -4.5rem;
    }
}

@media (max-width: 900px) {
    :root {
      --beat-cols: 50px minmax(0,1fr) 60px 60px 80px;
    }
  
    .track-title,
    .track-bpm,
    .track-key,
    .track-length {
      font-size: 1rem;
    }
  }

/* Overlay (ganzes Dunkel hinter dem Modal) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;

    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);

    display: flex;
    justify-content: center;
    align-items: center;

    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;

    z-index: 999;
    overflow: hidden;
}

/* Box selbst */
.modal-box {
    background: rgba(20, 0, 40, 0.9);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-height: 80vh;
    max-width: 800px;
    box-shadow: 0 0 20px rgba(122, 0, 255, 0.5);

    transform: scale(0.8);
    transition: transform 0.25s ease;
    color: white;
    animation: fadeInModal 0.3s ease;

    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

/* Schließen-Button */
.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #e8ddff;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

/* Wenn sichtbar */
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

#modal-title {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#modal-info {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8ddff;
    text-shadow: 0 0 6px rgba(122,0,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    text-align: center;
}

.modal-license {
    color: rgba(232,221,255,0.8);
    line-height: 1.4;
    margin-top: 12vh;
    font-size: 0.75rem;
    opacity: 0.8;
    text-align: left;
    white-space: normal;
    max-width: 100%;
    word-wrap: break-word;   
}

.modal-btn {
    display: inline-block;
    padding: 0.75rem 1.4rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 8px;
    border: 1px solid rgba(232,221,255,0.2);
    text-decoration: none;
    transition: 0.2s ease;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    margin-right: 0.6rem;

    color: #e8ddff;
    background: rgba(122,0,255,0.15);
    box-shadow: 0 0 10px rgba(122,0,255,0.3);
}

/* hover */
.modal-btn:hover {
    background: rgba(122,0,255,0.25);
    box-shadow: 0 0 16px rgba(122,0,255,0.6);
    transform: translateY(-1px);
}

/* Free-Button Style */
.modal-btn-free {
    border-color: rgba(232,221,255,0.35);
}

/* Optional: eigener Hover für free */
.modal-btn-free:hover {
    background: rgba(122,0,255,0.35);
}

/* Buy-Button Style */
.modal-btn-buy {
    background: linear-gradient(90deg, #7a00ff, #a755ff);
    border: none;
    box-shadow: 0 0 12px rgba(122,0,255,0.6);
    font-weight: 600;
}

/* Buy Hover */
.modal-btn-buy:hover {
    background: linear-gradient(90deg, #8e2aff, #b57fff);
    box-shadow: 0 0 18px rgba(122,0,255,0.9);
}

.modal-actions {
    margin-top: 9vh;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 600px) {
    .modal-box {
        width: 94%;
        max-height: calc(100vh - 2rem); /* bessere Nutzung */
        padding: 1.4rem;
    }

    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-btn {
        width: 100%;
        text-align: center;
    }
}
