@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #050509;
    --bg-panel: #0a0a12;
    --glass-bg: rgba(255, 255, 255, 0.015);
    --glass-border: rgba(255, 255, 255, 0.06);
    --primary: #9146FF;
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #22c55e;
    --font-family: 'Inter', sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 10%, rgba(145, 70, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(145, 70, 255, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.main-logo-container { width: 100%; display: flex; justify-content: center; padding-top: 2rem; margin-bottom: 2rem; pointer-events: none; }
.main-logo { width: 100%; max-width: 260px; height: auto; image-rendering: auto; animation: pulseLogo 3.5s infinite ease-in-out; filter: drop-shadow(0 0 20px rgba(145, 70, 255, 0.35)); }

@keyframes pulseLogo {
    0% { transform: scale(1); opacity: 0.95; filter: drop-shadow(0 0 20px rgba(145, 70, 255, 0.35)); }
    50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 40px rgba(145, 70, 255, 0.6)); }
    100% { transform: scale(1); opacity: 0.95; filter: drop-shadow(0 0 20px rgba(145, 70, 255, 0.35)); }
}

.glass { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 20px; }
.container { width: 100%; max-width: 1000px; padding: 0 2rem; margin-bottom: 3rem; flex: 1; }
.svg-icon { width: 22px; height: 22px; vertical-align: middle; display: inline-block; flex-shrink: 0; }

button {
    font-family: var(--font-family); font-weight: 600; font-size: 0.95rem;
    border: none; border-radius: 12px; cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button.primary { background-color: var(--primary); color: white; padding: 12px 24px; box-shadow: 0 4px 15px rgba(145, 70, 255, 0.2); }
button.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(145, 70, 255, 0.4); }
button.danger { background-color: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); padding: 10px 20px;}
button.danger:hover { background-color: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.5); }
button.success { background-color: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); padding: 10px 20px;}
button.success:hover { background-color: rgba(34, 197, 94, 0.25); border-color: rgba(34, 197, 94, 0.5); }
button.glass-btn { background: rgba(255,255,255,0.03); color: var(--text-main); border: 1px solid var(--glass-border); padding: 10px 20px; }
button.glass-btn:hover { background: rgba(255,255,255,0.07); }

fieldset:disabled { opacity: 0.5; cursor: not-allowed; }
fieldset:disabled input, fieldset:disabled textarea, fieldset:disabled button { pointer-events: none; }

input, textarea {
    width: 100%; background-color: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    color: var(--text-main); padding: 14px 16px; border-radius: 12px; margin-bottom: 18px;
    font-family: var(--font-family); font-size: 1rem; transition: var(--transition);
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.15); background-color: rgba(0,0,0,0.5); }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; margin-left: 4px; }

/* --- CUSTOM MODERN DROPDOWNS --- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 15px; }

select.customized {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 18px;
    font-family: var(--font-family);
    user-select: none;
}

.custom-select-wrapper.is-filter {
    margin-bottom: 0;
    flex: 1;
    min-width: 200px;
}

.custom-select-trigger {
    width: 100%;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.custom-select-trigger:hover {
    background-color: rgba(0,0,0,0.4);
    border-color: rgba(145, 70, 255, 0.4);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.2);
    background-color: rgba(0,0,0,0.6);
}

.custom-select-trigger .arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.custom-select-wrapper.open .custom-select-trigger .arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #0d0d16;
    border: 1px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7), 0 0 20px rgba(145, 70, 255, 0.15);
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 250px;
    overflow-y: auto;
}

.custom-select-options::-webkit-scrollbar { width: 6px; }
.custom-select-options::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.custom-select-options::-webkit-scrollbar-thumb { background: rgba(145, 70, 255, 0.5); border-radius: 10px; }

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-option {
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text-muted);
    transition: background-color 0.2s, color 0.2s, padding-left 0.2s;
    border-left: 0px solid transparent;
}

.custom-option:hover {
    background: rgba(145, 70, 255, 0.1);
    color: var(--text-main);
    padding-left: 22px;
}

.custom-option.selected {
    background: rgba(145, 70, 255, 0.15);
    color: white;
    font-weight: 600;
    border-left: 3px solid var(--primary);
    padding-left: 16px;
}

fieldset:disabled .custom-select-trigger {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- REST UI --- */
.login-prompt-view { flex: 1; display: flex; justify-content: center; align-items: center; padding: 2rem; width: 100%; margin-top: -5vh; }
.login-card { padding: 3rem 2rem; text-align: center; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,0.4); animation: fadeIn 0.6s ease; }

.header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; margin-top: 1rem; margin-bottom: 2rem; }
.app-title { font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; gap: 10px; color: white; margin: 0; }
.profile-area { display: flex; align-items: center; gap: 12px; }
.profile-img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--primary); box-shadow: 0 0 10px rgba(145, 70, 255, 0.2); }
.user-meta { text-align: right; line-height: 1.3; }
.user-name { font-weight: 700; color: white; font-size: 1rem; }
.user-role { font-size: 0.75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; }

.streamer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 2.5rem; }
.streamer-card { padding: 2.5rem 1.5rem 1.5rem; text-align: center; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; }
.streamer-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.streamer-card.selected { border-color: var(--primary); box-shadow: 0 0 25px rgba(145, 70, 255, 0.3); background: rgba(145, 70, 255, 0.03); }

/* Neu: Disabled State für Streamer Cards */
.streamer-card.disabled { opacity: 0.4; filter: grayscale(100%); cursor: not-allowed; }
.streamer-card.disabled:hover { transform: translateY(0); background: var(--glass-bg); border-color: var(--glass-border); }

.twitch-link { position: absolute; top: 12px; right: 12px; color: var(--text-muted); transition: color 0.2s; padding: 5px; display: flex; align-items: center; justify-content: center;}
.twitch-link:hover { color: var(--primary); }
.mc-head { width: 85px; height: 85px; image-rendering: pixelated; border-radius: 12px; margin-bottom: 12px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; margin-top: 10px; text-transform: uppercase; }
.status-badge::before { content:''; width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-open { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.status-open::before { background-color: var(--success); box-shadow: 0 0 8px var(--success); }
.status-closed { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.status-closed::before { background-color: var(--danger); }

/* Geändert: Report Form Container weiche Auf/Zu Animation */
#report-form-container { 
    display: none; 
    opacity: 0; 
    transform: translateY(-15px); 
    transition: opacity 0.3s ease, transform 0.3s ease; 
}
#report-form-container.active { 
    opacity: 1; 
    transform: translateY(0); 
}

.dashboard-section { padding: 2.5rem; margin-bottom: 2rem; display: none; animation: fadeInSlide 0.4s ease; }
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; color: white; }
.section-header h2 { margin-bottom: 0; line-height: 1; }

.report-list { list-style: none; margin: 0; padding: 0; }
.report-item { background-color: rgba(255,255,255,0.02); padding: 20px; border-radius: 14px; margin-bottom: 15px; border: 1px solid var(--glass-border); border-left: 4px solid var(--primary); transition: var(--transition); }
.report-item:hover { border-color: rgba(255,255,255,0.1); background-color: rgba(255,255,255,0.03); }
.report-actions { display: flex; gap: 10px; margin-top: 15px; }

.notification-container { position: fixed; top: 25px; right: 25px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.notification { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 14px; color: white; font-weight: 600; font-size: 0.95rem; box-shadow: 0 10px 30px rgba(0,0,0,0.3); animation: slideInRight 0.35s forwards, fadeOut 0.4s ease 4.2s forwards; min-width: 300px; max-width: 400px; pointer-events: auto; border-left: 5px solid; background: rgba(10, 10, 18, 0.9); backdrop-filter: blur(15px); }
.notif-success { border-color: var(--success); }
.notif-error { border-color: var(--danger); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 9000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content { background-color: var(--bg-panel); padding: 2.5rem; border-radius: 20px; width: 90%; max-width: 420px; text-align: center; border: 1px solid rgba(255,255,255,0.08); transform: translateY(20px); transition: transform 0.3s ease; box-shadow: 0 25px 60px rgba(0,0,0,0.5); }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-actions { display: flex; justify-content: space-between; gap: 15px; margin-top: 30px; }
.modal-actions button { flex: 1; padding: 12px; }

.hidden { display: none !important; }
h1, h2, h3, h4 { color: white; margin-bottom: 10px; font-weight: 700; }
h2 { font-size: 1.6rem; }
p.muted { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; margin-bottom: 20px; }
hr { border:0; border-top: 1px solid var(--glass-border); margin: 25px 0; }
.footer { text-align: center; padding: 2rem; font-size: 0.85rem; color: #444; margin-top: auto; width: 100%; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInSlide { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(60px); pointer-events: none; } }

@media (max-width: 600px) {
    .container { padding: 0 1rem; }
    .header { flex-direction: column; gap: 15px; text-align: center; padding: 1.5rem; }
    .user-meta { text-align: center; }
    .streamer-grid { grid-template-columns: 1fr; }
    .dashboard-section { padding: 1.5rem; }
    .section-header { flex-direction: column; text-align: center; gap: 5px;}
    .filter-bar { flex-direction: column; }
}