/* global.css - Shared Variables & Resets */

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

:root {
    /* --- DARK MODE (Default) --- */
    --color-accent: #7dbaff;
    /* Vibrant Water Cyan */
    --color-secondary-accent: #4A90E2;
    /* Blue */
    --color-bg: #1a1a1a;
    --color-text: #f0f0f0;
    --color-text-muted: #aaa;
    --color-sidebar-bg: rgba(26, 26, 26, 0.4);
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --color-line: #444;
    --color-node: #333;
    --shadow-color: rgba(0, 0, 0, 0.5);

    /* Semantic Colors */
    --color-text-body: #ddd;
    --color-border: #555;
    --color-text-dim: #888;
    /* Very muted text */

    /* UI & Infographics */
    --color-icon: #FFFFFF;
    --color-satellite-bg: rgba(255, 255, 255, 0.1);
    --color-satellite-hover: rgba(255, 255, 255, 0.9);
    --chart-bg-gradient: conic-gradient(#a6e4ff 0% 5%, #5dade2 5% 25%, #2980b9 25% 100%);
    --color-donut-gradient: conic-gradient(#ffffff 0% 5%, #e1f5fe 5% 12.5%, #b3e5fc 12.5% 22.5%, #81d4fa 22.5% 35%, #4fc3f7 35% 50%, #29b6f6 50% 72.5%, #01579b 72.5% 100%);
    --runner-bg: linear-gradient(to right, #0d1b2a, #1b263b);

    /* Feedback Colors */
    --color-success: #2ecc71;
    --color-error: #ff8a80;

    /* Layout */
    --sidebar-safe-zone: 200px;
}

body.light-mode {
    /* --- LIGHT MODE REFINED --- */
    --color-accent: #0575E6;
    /* Professional Blue Azure */
    --color-secondary-accent: #4A90E2;
    /* Solid Blue */
    --color-bg: #E3E8ED;
    /* Brightest Surface Color */
    --color-text: #1A202C;
    --color-text-muted: #4A5568;
    --color-sidebar-bg: rgba(176, 190, 197, 0.4);
    /* Darker than BG */
    --glass-bg: rgba(210, 218, 226, 0.85);
    /* Darker subtle grey-blue tint */
    --glass-border: rgba(148, 163, 184, 0.3);
    --color-line: #A0AEC0;
    --color-node: #CBD5E0;
    /* Darker nodes */
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Semantic Colors Light */
    --color-text-body: #2D3748;
    --color-border: #CBD5E0;
    --color-text-dim: #718096;

    /* Feedback Light */
    --color-success: #059669;
    --color-error: #DC2626;

    /* UI & Infographics Light */
    --color-icon: #2D3748;
    --color-satellite-bg: rgba(148, 163, 184, 0.2);
    --color-satellite-hover: rgba(148, 163, 184, 0.8);
    --chart-bg-gradient: conic-gradient(#CBD5E0 0% 5%, #A0AEC0 5% 25%, #4A90E2 25% 100%);
    --color-donut-gradient: conic-gradient(#CBD5E0 0% 5%, #B0BEC5 5% 12.5%, #90A4AE 12.5% 22.5%, #607D8B 22.5% 35%, #455A64 35% 50%, #37474F 50% 72.5%, #263238 72.5% 100%);
    --runner-bg: linear-gradient(to right, #CBD5E0, #E3E8ED);
}

/* Reset & Base */
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography Defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
    color: var(--color-text);
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Common Utilities */
.hidden {
    display: none !important;
}
/* --- SHARED VOLUME & MUTE CONTROLS (Glass Design) --- */
#volume-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* Moved to left to avoid sidebar overlap */
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#volume-slider-container {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 10px 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    transform: translateY(10px);

    /* Slider vertikal ausrichten */
    width: 30px;
    height: 100px;
}

#volume-wrapper:hover #volume-slider-container {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#global-volume {
    /* Vertikaler Slider Hack */
    writing-mode: bt-lr;
    /* IE */
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 3px;
    transform: rotate(-90deg);
}

#global-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

#global-mute-toggle {
    /* Positionierung über wrapper geregelt */
    position: relative;
    bottom: auto;
    left: auto;

    width: 60px;
    height: 60px;
    border-radius: 50%;

    /* Design */
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    cursor: pointer;

    /* Flexbox zum Zentrieren */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Effekte */
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#global-mute-toggle:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.7);
}

#global-mute-toggle:active {
    transform: scale(0.95);
}

/* ICON LOGIK */
#global-mute-toggle .mute-icon {
    position: absolute;
    /* Übereinander legen */
    width: 28px;
    height: 28px;
    opacity: 1;
    /* Standard: Sichtbar */
    transition: all 0.3s ease;
    color: white;
}

/* Nur wenn JS die Klasse 'hidden' setzt, wird ausgeblendet */
#global-mute-toggle .mute-icon.hidden {
    opacity: 0 !important;
    transform: scale(0.5) rotate(45deg);
    pointer-events: none;
}

/* --- Shared Footer Styles --- */
.global-footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-top: 50px;
    border-top: 1px solid var(--glass-border);
}

.global-footer a {
    color: var(--color-text-muted);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.global-footer a:hover {
    color: var(--color-accent);
}
