/* ===============================
   GLOBAL
==================================*/

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: url("../images/background.jpg") no-repeat center center fixed;
    background-size: cover;
    color: #fff;
}

/* ===============================
   GLASS HEADER
==================================*/

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    /* echtes Glassmorphism */
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);

    border-bottom: 1px solid rgba(255,255,255,0.08);

    /* Neon Unterkante */
    box-shadow: 0 0 40px rgba(0, 180, 255, 0.25);
}

/* sanftes Einblenden beim Laden */
.main-header {
    animation: headerFade 0.8s ease forwards;
    opacity: 0;
}
@keyframes headerFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ============================
   Hauptnavigation
============================ */
.main-header {
    background: rgba(20,20,20,0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    transition: 0.2s;
}

.nav-links li a:hover,
.nav-links li a:focus {
    background: rgba(0,192,255,0.2);
    border-radius: 6px;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* ============================
   Mobile Styles
============================ */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(20,20,20,0.95);
        flex-direction: column;
        width: 220px;
        padding: 1rem;
        gap: 0.5rem;
        border-radius: 0 0 12px 12px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-links.nav-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-toggle {
        display: block;
    }

    .nav-links li a {
        padding: 0.6rem 1rem;
        display: block;
    }
}

/* ===============================
   LOGO
==================================*/

.logo {
    display: flex;
    align-items: center;
}

/* Bilderlogo */
.logo-img {
    height: 52px;
    width: auto;
    border-radius: 16px;

    transition: 0.35s ease;
    box-shadow: 0 0 15px rgba(255,255,255,0.12);
}

/* 🔥 Hover Neon Effekt */
.logo-img:hover {
    transform: scale(1.06) rotate(-1deg);
    box-shadow:
        0 0 15px rgba(0, 200, 255, 0.6),
        0 0 40px rgba(0, 200, 255, 0.35);
}

/* Mobile kleiner */
@media (max-width: 768px) {
    .logo-img { height: 38px; }
}

/* ===============================
   MENU LINKS
==================================*/

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.8rem;
}

/* Dashboard Link Style */
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;

    position: relative;
    transition: 0.25s ease;
}

/* Unterstrich Animation */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #00d1ff, #8a2be2);
    box-shadow: 0 0 10px #00d1ff;
    transition: width 0.25s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    text-shadow: 0 0 15px rgba(0, 200, 255, 0.6);
}

/* ===============================
   MOBILE BURGER MENU + ANIMATION
==================================*/

.nav-toggle {
    display: none;
    font-size: 2.2rem;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}

/* Klick Feedback */
.nav-toggle:active {
    transform: scale(0.85);
}

@media (max-width: 768px) {

    /* geschlossen = versteckt */
    .nav-links {
        position: absolute;
        right: 10px;
        top: 80px;

        display: flex;
        flex-direction: column;

        background: rgba(0,0,0,0.85);
        backdrop-filter: blur(14px);

        padding: 1.2rem 1.6rem;
        border-radius: 18px;
        gap: 1rem;

        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 0 40px rgba(0,0,0,0.6);

        /* Animation Start */
        transform: translateY(-15px);
        opacity: 0;
        pointer-events: none;
        transition: 0.35s ease;
    }

    /* geöffnet */
    .nav-links.open {
        transform: translateY(0px);
        opacity: 1;
        pointer-events: auto;
    }

    /* jeder Link einzeln fliegt rein */
    .nav-links.open li {
        opacity: 0;
        animation: menuItem 0.35s ease forwards;
    }

    .nav-links.open li:nth-child(1){ animation-delay: .05s }
    .nav-links.open li:nth-child(2){ animation-delay: .10s }
    .nav-links.open li:nth-child(3){ animation-delay: .15s }
    .nav-links.open li:nth-child(4){ animation-delay: .20s }
    .nav-links.open li:nth-child(5){ animation-delay: .25s }
    .nav-links.open li:nth-child(6){ animation-delay: .30s }

    @keyframes menuItem {
        from { opacity: 0; transform: translateX(10px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    .nav-toggle {
        display: block;
    }
}

/* ===============================
   FOOTER
==================================*/

.footer {
    text-align: center;
    padding: 2rem;
    opacity: 0.8;
}

/* ===============================
   Charts
==================================*/

.charts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chart-row {
    display: grid;
    grid-template-columns: 28px 1fr 110px 110px;
    gap: 6px;
    padding: 6px 4px;
    border-bottom: 1px solid #444;
}

.chart-pos {
    font-weight: bold;
}

.vote-btn {
    padding: 4px 8px;
    cursor: pointer;
}

.vote-disabled {
    font-size: 11px;
    opacity: 0.6;
}

/* ===============================
   Charts Box Breiter & Scrollbar
==================================*/
.card.info-card:nth-of-type(2) { /* zweite Card = Charts */
    width: auto; /* maximal möglich innerhalb des Grids */
    max-width: 600px; /* optional, damit sie nicht zu breit wird */
}

.charts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;

    max-height: calc(5 * 48px + 30px); /* 5 Songs * geschätzte Höhe + etwas Padding */
    overflow-y: auto; /* Scrollbar bei mehr als 5 Songs */
    padding-right: 4px; /* Platz für Scrollbar */
}

/* Optional: Scrollbar schön gestalten */
.charts-list::-webkit-scrollbar {
    width: 8px;
}

.charts-list::-webkit-scrollbar-track {
    background: rgba(50,50,50,0.3);
    border-radius: 6px;
}

.charts-list::-webkit-scrollbar-thumb {
    background: rgba(120,120,255,0.6);
    border-radius: 6px;
}

.charts-list::-webkit-scrollbar-thumb:hover {
    background: rgba(160,160,255,0.9);
}

/* Optional: Chart-Row etwas größer, damit besser lesbar */
.chart-row {
    grid-template-columns: 28px 1fr 130px 110px; /* Titel-Spalte etwas breiter */
    padding: 8px 6px;
}

/* ===============================
  Cookies anzeige
==================================*/
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15,15,25,0.97);
    color: #fff;
    padding: 1.2rem;
    z-index: 9999;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.6);
}

.cookie-content {
    max-width: 1100px;
    margin: auto;
    font-size: 0.95rem;
}

.cookie-content h3 {
    margin-top: 0;
}

.cookie-content ul {
    margin-left: 1.2rem;
}

.cookie-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.cookie-buttons button {
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.cookie-accept {
    background: #4caf50;
    color: #fff;
}

.cookie-decline {
    background: #b71c1c;
    color: #fff;
}

/* Cookie Banner hidden state (CSP-safe) */
.cookie-banner.is-hidden {
    display: none;
}

/* ===============================
   Mobile Charts Fix
==================================*/
@media (max-width: 600px) {
    .chart-row {
        grid-template-columns: 24px 1fr;
        grid-template-areas:
            "pos title"
            "votes vote";
        row-gap: 4px;
    }

    .chart-pos { grid-area: pos; }
    .chart-title { grid-area: title; }
    .chart-votes { grid-area: votes; font-size: 0.8rem; }
    .vote-btn,
    .vote-disabled { grid-area: vote; justify-self: start; }
}

/* ===============================
   Live Slot Styles
==================================*/
.live-slot {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-top: 0.8rem;
    padding: 0.5rem;
    background: rgba(25,25,35,0.85);
    border-radius: 10px;
}

.live-slot .genre-cover {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}

.live-slot .slot-text {
    display: flex;
    flex-direction: column;
}

.live-slot .moderator-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-top: 4px;
}

.live-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    background: #ff3b3b;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #fff;
    font-weight: bold;
}
