/* Juhu!Party Live — Dark Theme */
:root {
    --jp-bg: #0a0e1a;
    --jp-bg-elevated: #111827;
    --jp-bg-card: #151c2f;
    --jp-border: rgba(255, 255, 255, 0.08);
    --jp-text: #f1f5f9;
    --jp-text-muted: #94a3b8;
    --jp-primary: #d946ef;
    --jp-primary-dark: #a21caf;
    --jp-secondary: #06b6d4;
    --jp-accent: #8b5cf6;
    --jp-gradient: linear-gradient(135deg, #d946ef 0%, #8b5cf6 50%, #06b6d4 100%);
    --jp-danger: #ef4444;
    --jp-success: #22c55e;
    --jp-warning: #f59e0b;
    --jp-radius: 12px;
    --jp-radius-lg: 18px;
    --jp-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --jp-font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    --jp-bottom-nav-h: 64px;
    --jp-sidebar-w: 240px;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--jp-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--jp-primary); color: #fff; padding: 8px 16px; z-index: 9999;
}
.skip-link:focus { left: 8px; top: 8px; }

.container { width: min(1100px, 100% - 2rem); margin-inline: auto; }
.container.narrow { max-width: 480px; }

/* Typography */
h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.2; }
.lead { color: var(--jp-text-muted); margin-bottom: 1.5rem; }
.hint { color: var(--jp-text-muted); font-size: 0.875rem; }
.center { text-align: center; }
.gradient-text {
    background: var(--jp-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--jp-border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0; gap: 1rem;
}
.header-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.logo img { display: block; }

/* Hero */
.hero {
    position: relative; min-height: clamp(420px, 70vh, 640px);
    display: flex; align-items: center; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-img {
    width: 100%; height: 100%; object-fit: cover;
    background: linear-gradient(160deg, #1a1035 0%, #0a0e1a 50%, #0c1929 100%);
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,14,26,0.3) 0%, rgba(10,14,26,0.92) 70%);
}
.hero-content { position: relative; z-index: 1; padding: 3rem 0; }
.hero-kicker {
    text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem;
    color: var(--jp-secondary); margin-bottom: 0.75rem;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; margin-bottom: 1rem; }
.hero-lead { font-size: 1.125rem; color: var(--jp-text-muted); max-width: 520px; margin-bottom: 2rem; }
.hero-claim {
    color: #e9d5ff; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em;
    margin: 0 0 0.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-actions--stack {
    max-width: 380px; flex-direction: column; align-items: stretch;
}
.header-dj-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.85rem; border-radius: 999px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--jp-border);
    color: var(--jp-text-muted); font-size: 0.8rem; font-weight: 600;
}
.features--compact { padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--jp-border); }
.feature-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.feature-item {
    text-align: center; color: var(--jp-text-muted); font-size: 0.875rem;
}
.feature-item .feature-icon { margin-bottom: 0.5rem; width: 44px; height: 44px; }
@media (max-width: 720px) {
    .feature-row { grid-template-columns: repeat(2, 1fr); }
    .header-dj-chip span { display: none; }
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem; border-radius: 999px; border: none;
    font-family: inherit; font-size: 0.9375rem; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary {
    background: var(--jp-gradient); color: #fff;
    box-shadow: 0 4px 20px rgba(217, 70, 239, 0.35);
}
.btn--secondary {
    background: rgba(255,255,255,0.08);
    color: var(--jp-text);
    border: 1px solid var(--jp-border);
}
.btn--cyan { background: var(--jp-secondary); color: #0a0e1a; }
.btn--outline {
    background: transparent; color: var(--jp-text);
    border: 1px solid var(--jp-border);
}
.btn--ghost { background: transparent; color: var(--jp-text-muted); padding: 0.5rem 0.75rem; }
.btn--ghost:hover { color: var(--jp-text); }
.btn--danger { background: var(--jp-danger); color: #fff; }
.btn--accent { background: var(--jp-accent); color: #fff; }
.btn--lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn--sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn--block { width: 100%; }
.btn--icon { padding: 0.5rem; background: transparent; border: none; color: var(--jp-text); cursor: pointer; }

/* Cards */
.card {
    background: var(--jp-bg-card);
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--jp-shadow);
}
.section { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; font-size: 1.75rem; }

.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem;
}
.feature-card { text-align: center; }
.feature-icon {
    width: 56px; height: 56px; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(217, 70, 239, 0.15); border-radius: 50%; color: var(--jp-primary);
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.375rem; font-weight: 500; font-size: 0.875rem; }
.input {
    width: 100%; padding: 0.75rem 1rem;
    background: var(--jp-bg-elevated); border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius); color: var(--jp-text);
    font-family: inherit; font-size: 1rem;
}
.input:focus { outline: 2px solid var(--jp-primary); outline-offset: 2px; }
.input--code { text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; font-size: 1.25rem; text-align: center; }
textarea.input { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.checkbox-group { border: none; padding: 0; margin-bottom: 1rem; }
.checkbox-group label { display: inline-flex; align-items: center; gap: 0.5rem; margin-right: 1rem; font-weight: 400; }

.alert {
    padding: 0.875rem 1rem; border-radius: var(--jp-radius); margin-bottom: 1rem;
}
.alert--error { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--jp-danger); color: #fca5a5; }

/* Badges */
.badge {
    display: inline-block; padding: 0.2em 0.6em; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge--offen { background: rgba(6, 182, 212, 0.2); color: var(--jp-secondary); }
.badge--vorgemerkt { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.badge--als_naechstes { background: rgba(217, 70, 239, 0.25); color: #f0abfc; }
.badge--gespielt { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.badge--passt_nicht { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.badge--abgelehnt { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.badge--event.badge--entwurf { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.badge--event.badge--aktiv { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.badge--event.badge--pausiert { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.badge--event.badge--beendet { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }

/* Event pages */
.page-event { padding-bottom: calc(var(--jp-bottom-nav-h) + 80px); }
.event-header {
    background: var(--jp-bg-elevated); border-bottom: 1px solid var(--jp-border);
    padding: 1rem 0;
}
.event-header__inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.event-kicker { font-size: 0.75rem; color: var(--jp-secondary); letter-spacing: 0.1em; margin: 0; }
.event-title { font-size: 1.25rem; margin: 0; }
.event-guest { color: var(--jp-text-muted); font-size: 0.875rem; margin: 0; }
.event-main { padding: 1rem 0; }

/* Song list */
.song-card__main { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.song-title { font-size: 1.0625rem; margin: 0.25rem 0 0; }
.song-artist { color: var(--jp-text-muted); margin: 0; font-size: 0.9375rem; }
.song-message { font-style: italic; color: var(--jp-text-muted); font-size: 0.875rem; margin: 0.25rem 0; }
.genre-tag {
    display: inline-block; margin-top: 0.35rem; padding: 0.15rem 0.55rem;
    border-radius: 999px; font-size: 0.7rem; font-weight: 700;
    background: rgba(217, 70, 239, 0.18); color: #e879f9;
}
.song-meta { font-size: 0.75rem; color: var(--jp-text-muted); margin: 0.5rem 0 0; }
.song-votes { display: flex; flex-direction: column; gap: 0.375rem; }
.song-votes--readonly { color: var(--jp-text-muted); font-size: 0.875rem; }
.vote-btn {
    display: flex; align-items: center; gap: 0.375rem;
    padding: 0.375rem 0.625rem; border-radius: var(--jp-radius);
    background: var(--jp-bg-elevated); border: 1px solid var(--jp-border);
    color: var(--jp-text-muted); cursor: pointer; font-family: inherit; font-size: 0.875rem;
}
.vote-btn.is-active { border-color: var(--jp-primary); color: var(--jp-primary); background: rgba(217,70,239,0.1); }
.vote-btn--down.is-active { border-color: var(--jp-danger); color: var(--jp-danger); background: rgba(239,68,68,0.1); }

.song-card--dj .song-card__main { flex-direction: column; }
.dj-actions { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.75rem; }

/* Mood */
.mood-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.75rem;
}
.mood-tile {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    padding: 1rem 0.5rem; border-radius: var(--jp-radius);
    background: var(--jp-bg-elevated); border: 2px solid transparent;
    cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.mood-tile input { position: absolute; opacity: 0; pointer-events: none; }
.mood-tile.is-selected, .mood-tile:has(input:checked) {
    border-color: var(--jp-primary);
    background: rgba(217, 70, 239, 0.1);
}
.mood-tile__icon { color: var(--jp-secondary); }
.mood-tile__label { font-size: 0.8125rem; font-weight: 600; text-align: center; }
.mood-bars { list-style: none; padding: 0; margin: 0; }
.mood-bar { margin-bottom: 0.75rem; }
.mood-bar__label { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.25rem; }
.mood-bar__track { height: 8px; background: var(--jp-bg-elevated); border-radius: 4px; overflow: hidden; }
.mood-bar__fill {
    height: 100%; background: var(--jp-gradient); border-radius: 4px;
    transition: width 0.4s ease;
}

/* Bottom nav */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: rgba(17, 24, 39, 0.95); backdrop-filter: blur(12px);
    border-top: 1px solid var(--jp-border);
    height: var(--jp-bottom-nav-h);
}
.bottom-nav ul {
    display: flex; justify-content: space-around; align-items: center;
    list-style: none; margin: 0; padding: 0; height: 100%;
}
.bottom-nav__link {
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    color: var(--jp-text-muted); font-size: 0.6875rem; text-decoration: none; padding: 0.5rem;
}
.bottom-nav__link.is-active { color: var(--jp-primary); }

/* FAB */
.fab {
    position: fixed; bottom: calc(var(--jp-bottom-nav-h) + 1rem); right: 1rem; z-index: 150;
    width: 56px; height: 56px; border-radius: 50%; border: none;
    background: var(--jp-gradient); color: #fff;
    box-shadow: 0 4px 24px rgba(217, 70, 239, 0.45);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.page-event--karaoke .fab, .page-event--info .fab, .page-event--stimmung .fab { display: none; }

/* Drawer */
.drawer[hidden] { display: none; }
.drawer { position: fixed; inset: 0; z-index: 300; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.drawer__panel {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: var(--jp-bg-card); border-radius: var(--jp-radius-lg) var(--jp-radius-lg) 0 0;
    padding: 1.25rem 1.5rem 2rem; max-height: 85vh; overflow-y: auto;
    animation: slideUp 0.25s ease;
}
.drawer__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Staff layout */
.staff-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--jp-sidebar-w); background: var(--jp-bg-elevated);
    border-right: 1px solid var(--jp-border);
    display: flex; flex-direction: column; padding: 1.25rem;
    position: sticky; top: 0; height: 100vh;
}
.sidebar__brand { margin-bottom: 2rem; }
.sidebar__nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.sidebar__link {
    padding: 0.625rem 0.875rem; border-radius: var(--jp-radius);
    color: var(--jp-text-muted); text-decoration: none; font-weight: 500;
}
.sidebar__link.is-active, .sidebar__link:hover {
    background: rgba(217, 70, 239, 0.12); color: var(--jp-text); text-decoration: none;
}
.sidebar__user { border-top: 1px solid var(--jp-border); padding-top: 1rem; font-size: 0.875rem; }
.staff-main { flex: 1; min-width: 0; }
.staff-header { padding: 1.5rem 2rem; border-bottom: 1px solid var(--jp-border); }
.staff-sub { color: var(--jp-text-muted); margin: 0; }
.staff-content { padding: 1.5rem 2rem; }

@media (max-width: 768px) {
    .staff-layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .sidebar__nav { flex-direction: row; flex: none; }
    .staff-header, .staff-content { padding: 1rem; }
}

/* Login */
.login-card, .join-card { margin-top: 2rem; text-align: center; }
.login-card h1, .join-card h1 { margin-top: 1rem; }
.login-card .form, .join-card .form { text-align: left; margin-top: 1.5rem; }

/* Share / guests */
.share-code { font-size: 2rem; font-weight: 800; letter-spacing: 0.15em; color: var(--jp-primary); margin: 0; }
.share-row { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; margin-bottom: 1rem; }
.share-qr { margin: 1rem 0; }
.share-qr img { border-radius: var(--jp-radius); background: #fff; padding: 8px; }
.guest-list { list-style: none; padding: 0; margin: 0; }
.guest-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0;
    border-bottom: 1px solid var(--jp-border);
}
.guest-item.is-blocked { opacity: 0.5; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.data-table th, .data-table td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--jp-border); }
.data-table th { color: var(--jp-text-muted); font-weight: 600; font-size: 0.8125rem; }
.data-table code { background: var(--jp-bg-elevated); padding: 0.2em 0.5em; border-radius: 4px; }

/* Lists */
.program-list, .message-list { list-style: none; padding: 0; margin: 0; }
.program-list li { display: flex; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--jp-border); }
.program-list time { color: var(--jp-secondary); font-weight: 600; min-width: 5rem; }
.message-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--jp-border); }

.placeholder-page { text-align: center; padding: 2rem; }
.placeholder-icon { color: var(--jp-primary); margin-bottom: 1rem; }
.empty-state { text-align: center; color: var(--jp-text-muted); }

/* Footer */
.site-footer {
    border-top: 1px solid var(--jp-border);
    padding: 2rem 0; margin-top: auto;
    text-align: center; color: var(--jp-text-muted); font-size: 0.875rem;
}
.footer-claim { color: var(--jp-text); font-weight: 600; margin-bottom: 0.25rem; }

/* Toast */
.toast-container {
    position: fixed; top: 1rem; right: 1rem; z-index: 500;
    display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none;
}
.toast {
    background: var(--jp-bg-card); border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius); padding: 0.875rem 1.25rem;
    box-shadow: var(--jp-shadow); animation: fadeIn 0.25s ease;
    pointer-events: auto; max-width: 320px;
}
.toast--error { border-color: var(--jp-danger); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
