/* --- Base Styles --- */
body {
    background-color: #1a1a1a;
    color: #e5e5e5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.panel {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #3a3a3a;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* --- CSS Reset & Base --- */
*, ::before, ::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
button, input, select { font-family: inherit; font-size: inherit; margin: 0; }
button { cursor: pointer; border: none; }
canvas {
    image-rendering: pixelated;
}

/* --- Custom Range Slider --- */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #0ea5e9;
    cursor: pointer;
    margin-top: -6px;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #e5e5e5;
    border-radius: 2px;
}

input[type=range]:focus,
input[type=number]:focus,
input[type=checkbox]:focus,
select:focus {
    outline: none !important;
    background-color: rgba(255, 0, 0, 0.2) !important;
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.8) !important;
    border-radius: 4px;
}

/* --- Utility Classes --- */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.p-8 { padding: 2rem; }
.p-4 { padding: 1rem; }
.p-2 { padding: 0.5rem; }
.p-1 { padding: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.pr-3 { padding-right: 0.75rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-1 { padding-left: 0.25rem; }
.pr-1 { padding-right: 0.25rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.w-full { width: 100%; }
.w-1\/2 { width: 50%; }
.w-24 { width: 6rem; }
.w-16 { width: 4rem; }
.w-12 { width: 3rem; }
.max-w-6xl { max-width: 72rem; }
.h-full { height: 100%; }
.h-1 { height: 0.25rem; }
.h-2 { height: 0.5rem; }
.h-\[300px\] { height: 300px; }
.h-\[400px\] { height: 400px; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.text-white { color: #ffffff; }
.text-cyan-400 { color: #22d3ee; }
.text-green-400 { color: #4ade80; }
.text-red-500 { color: #ef4444; }
.text-orange-400 { color: #fb923c; }
.text-orange-500 { color: #f97316; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.bg-black { background-color: #000000; }
.bg-gray-900 { background-color: #111827; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-700 { background-color: #374151; }
.hover\:bg-gray-700:hover { background-color: #374151; }
.hover\:bg-gray-600:hover { background-color: #4b5563; }
.hover\:text-red-400:hover { color: #f87171; }
.bg-orange-500 { background-color: #f97316; }
.hover\:bg-orange-600:hover { background-color: #ea580c; }
.bg-blue-500 { background-color: #3b82f6; }
.hover\:bg-blue-600:hover { background-color: #2563eb; }
.bg-purple-500 { background-color: #a855f7; }
.hover\:bg-purple-600:hover { background-color: #9333ea; }
.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-style: solid; }
.border-r { border-right-width: 1px; border-style: solid; }
.border-gray-600 { border-color: #4b5563; }
.border-gray-500 { border-color: #6b7280; }
.border-orange-500 { border-color: #f97316; }
.border-l-2 { border-left-width: 2px; }
.rounded { border-radius: 0.25rem; }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.text-center { text-align: center; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:border-cyan-400:focus { border-color: #22d3ee; outline: none; }
.overflow-y-auto { overflow-y: auto; }
.overflow-hidden { overflow: hidden; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }
.flex-1 { flex: 1 1 0%; }
.relative { position: relative; }
.absolute { position: absolute; }
.hidden { display: none !important; }
.cursor-pointer { cursor: pointer; }
.cursor-move { cursor: move; }
.top-2 { top: 0.5rem; }
.top-8 { top: 2rem; }
.bottom-2 { bottom: 0.5rem; }
.bottom-6 { bottom: 1.5rem; }
.left-2 { left: 0.5rem; }
.left-4 { left: 1rem; }
.right-4 { right: 1rem; }
.z-10 { z-index: 10; }
.block { display: block; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

@media (min-width: 768px) {
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
}

#species-container::-webkit-scrollbar { width: 6px; }
#species-container::-webkit-scrollbar-track { background: #2a2a2a; }
#species-container::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 3px; }

/* "ALLE" Button für Einstellungen */
.btn-all {
    background-color: #374151;
    color: #9ca3af;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid #4b5563;
    transition: all 0.15s;
    font-weight: bold;
}
.btn-all:hover {
    background-color: #4b5563;
    color: #ffffff;
    border-color: #22d3ee;
}

/* Highlight-Effekt für Karten */
.highlight-card {
    border-color: #22d3ee !important;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

/* --- Chart-Modus-Buttons --- */
.chart-mode-btn {
    transition: all 0.15s;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.chart-mode-btn.active-mode {
    background-color: #374151 !important;
    color: #ffffff !important;
    border-color: #22d3ee !important;
}
.ml-2 { margin-left: 0.5rem; }
.w-14 { width: 3.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.text-\[10px\] { font-size: 10px; }

/* --- uPlot Dark Theme --- */
.uplot, .uplot *, .uplot canvas { background: transparent !important; }
.u-wrap { position: relative; }
.u-legend { color: #9ca3af; font-size: 10px; font-family: ui-monospace, monospace; margin-top: 4px; }
.u-legend .u-marker { display: inline-block; width: 10px; height: 2px; margin-right: 4px; vertical-align: middle; }
.u-legend th { padding: 0 6px 0 0; font-weight: normal; }