/* ========== BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    background: radial-gradient(circle at center, #061421 0%, #01040a 65%, #000 100%);
    color: #e0e0e0;
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    font-size: 13px;
    height: 100vh;
    overflow: hidden;
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { background: radial-gradient(circle at center, #061421 0%, #01040a 65%, #000 100%); }
    50% { background: radial-gradient(circle at center, #0a1a2e 0%, #01080f 65%, #000200 100%); }
}

/* ========== VIGNETTE GLOW (edge atmosphere) ========== */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 999;
    background:
        radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.25) 80%, rgba(0, 0, 0, 0.55) 100%),
        radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(0, 212, 255, 0.04) 0%, transparent 50%);
}

/* Subtle horizontal scan-lines overlay (animated) */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 998;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 212, 255, 0.02) 0px,
        rgba(0, 212, 255, 0.02) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
    animation: scanlineFlicker 6s ease-in-out infinite;
}

@keyframes scanlineFlicker {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ========== COLOR VARIABLES ========== */
:root {
    --primary-cyan: #00d4ff;
    --accent-gold: #ffd700;
    --dark-bg: #0a1428;
    --state-orange: #ff8800;
    --state-green: #00ff00;
    --state-red: #ff0040;
    --panel-bg: rgba(10, 20, 40, 0.7);
}

/* ========== HUD CONTAINER ========== */
#hud-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ========== HUD CORE (Central Element) ========== */
.hud-core {
    position: absolute;
    width: 600px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* ========== RINGS SVG ========== */
.hud-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    filter:
        drop-shadow(0 0 12px rgba(0, 212, 255, 0.35))
        drop-shadow(0 0 20px rgba(0, 120, 180, 0.15))
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

/* ========== 3D GEOSPHERE (inside inner equalizer ring) ========== */
/* Inner equalizer circle has radius 60px (default) → 95px (peak)
   Geosphere container 120px → ~55px effective radius = safe gap to ring */
#geosphere-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    pointer-events: none;
    z-index: 5;
}

#geosphere-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    background: transparent;
}

/* ========== TACTICAL RING (between ring-2 and ring-3) ========== */
.tactical-ring {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
}

/* Tick marks pulse subtly */
.tactical-tick {
    transition: stroke 0.15s ease, opacity 0.15s ease;
    opacity: 0.6;
}

.tactical-tick.anchor {
    opacity: 1;
    animation: anchorPulse 2s ease-in-out infinite alternate;
}

.tactical-tick[data-active="1"] {
    stroke: #ffffff !important;
    opacity: 1 !important;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9));
}

@keyframes anchorPulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* Rotating scanner arc */
.tactical-scanner {
    transform-origin: 300px 300px;
    animation: scannerRotate 6s linear infinite;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7));
}

@keyframes scannerRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Counter-rotating orbiters (data points) */
.tactical-orbiters {
    transform-origin: 300px 300px;
    animation: orbitersRotate 14s linear infinite;
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.7));
}

@keyframes orbitersRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* ========== ANGLED SQUARES RING (middle decorative ring) ========== */
.squares-ring {
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 20px rgba(0, 150, 200, 0.2));
}

.squares-rotating {
    will-change: transform;
    transform-origin: 300px 300px;
    animation: squaresRotate 30s linear infinite;
}

@keyframes squaresRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.square-element {
    transition: stroke 0.3s ease, opacity 0.3s ease;
    transform-origin: 300px 300px;
}

.square-element:hover {
    stroke: #00ffff;
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.8));
}

.square-glow {
    animation: squareGlowPulse 3s ease-in-out infinite;
}

@keyframes squareGlowPulse {
    0%, 100% {
        opacity: 0.2;
        r: 5;
    }
    50% {
        opacity: 0.5;
        r: 8;
    }
}

/* ========== OUTER RING DECORATIONS ========== */
.orbit-ring {
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.4));
}


/* Segment Markers */
.segment-markers {
    transform-origin: 300px 300px;
    animation: segmentRotate 8s linear infinite;
}

.segment-dot {
    animation: segmentPulse 1.2s ease-in-out infinite;
}

@keyframes segmentRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes segmentPulse {
    0%, 100% {
        opacity: 0.4;
        r: 1.5;
    }
    50% {
        opacity: 1;
        r: 3.5;
    }
}

.tactical-orbiter {
    animation: orbiterPulse 1.5s ease-in-out infinite alternate;
}

.orbiter-1 { animation-delay: 0.4s; }
.orbiter-2 { animation-delay: 0.8s; }
.orbiter-3 { animation-delay: 1.2s; }

@keyframes orbiterPulse {
    from { r: 2; opacity: 0.6; }
    to { r: 3.5; opacity: 1; }
}

/* ========== HUD CLOCK (above orbit circle) ========== */
/* Orbit radius = 220px → clock positioned high above orbit.
   Date above time, both centered. */
.hud-clock {
    position: absolute;
    top: calc(50% - 220px - 130px);
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    z-index: 70;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
    pointer-events: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* J.A.R.V.I.S. Logo above date */
.hud-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-cyan);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(0,212,255,0.8), 0 0 28px rgba(0,212,255,0.4);
    opacity: 0.95;
    margin-bottom: 2px;
}

/* Date header section (above time) */
.hud-date-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hud-weekday {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-cyan);
    letter-spacing: 1px;
    opacity: 0.9;
    text-transform: uppercase;
}

.hud-date {
    font-size: 14px;
    color: var(--primary-cyan);
    opacity: 0.7;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Time display section */
.hud-time-display {
    font-size: 34px;
    font-weight: 600;
    color: var(--primary-cyan);
    letter-spacing: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums lining-nums;
}

/* Each digit group (HH, MM, SS) gets a fixed-width slot so layout never shifts */
.hud-time-display #clock-h,
.hud-time-display #clock-m,
.hud-time-display #clock-s {
    display: inline-block;
    width: 50px;
    text-align: center;
}

/* Custom colon: two dots stacked, vertically centered against the digits */
.clock-sep {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 8px;              /* tight gap between digit groups */
    height: 34px;            /* matches font-size */
    vertical-align: middle;
    position: relative;
    top: -2px;               /* raised slightly */
    margin: 0;               /* no extra space */
    /* JS-driven synchronized blink */
}

.clock-sep .dot {
    width: 4px;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
    flex-shrink: 0;
}

.clock-sep.blink-hidden {
    opacity: 0;
}

/* Keep digit baseline aligned with colons */
.hud-clock #clock-h,
.hud-clock #clock-m,
.hud-clock #clock-s {
    vertical-align: middle;
}

/* ========== INNER EQUALIZER BARS ========== */
.ring-inner {
    filter:
        drop-shadow(0 0 5px rgba(0, 212, 255, 0.25))
        drop-shadow(0 0 10px rgba(0, 100, 150, 0.1))
        drop-shadow(0 1px 4px rgba(0, 0, 0, 0.15));
    transition: filter 0.2s ease;
}

/* White glow during speech */
.state-speaking .ring-inner {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
}

.bar-inner {
    fill: none;
    stroke: var(--primary-cyan);
    stroke-width: 2px;
    stroke-linecap: round;
    opacity: 0.6;
    transform-origin: 300px 300px;
    /* No transition - allow JS to drive every frame for snappy speech response */
}

/* ========== MAIN EQUALIZER BARS ========== */
.equalizer-ring {
    filter:
        drop-shadow(0 0 6px rgba(0, 212, 255, 0.25))
        drop-shadow(0 0 12px rgba(0, 100, 150, 0.1))
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.bar {
    fill: none;
    stroke: var(--primary-cyan);
    stroke-width: 3px;
    stroke-linecap: round;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    transform-origin: 300px 300px;
}

/* ========== RING ANIMATIONS + COLOR GRADATION ========== */
/* Innermost (ring-1) is brightest, outer rings get progressively darker blue */
.ring-1 .bar {
    animation: rotateClockwise 12s linear infinite;
    stroke: #5feaff;  /* bright cyan */
}

.ring-2 .bar {
    animation: rotateCounterClockwise 18s linear infinite;
    stroke: #00a8d4;  /* medium cyan */
}

.ring-3 .bar {
    animation: rotateClockwise 24s linear infinite;
    stroke: #006688;  /* darker cyan/blue */
}

/* State-based overrides only when active (thinking/speaking) */
.state-thinking .ring-1 .bar { stroke: #ffbb55; }
.state-thinking .ring-2 .bar { stroke: #cc7700; }
.state-thinking .ring-3 .bar { stroke: #884400; }

.state-speaking .ring-1 .bar { stroke: #80ff80; }
.state-speaking .ring-2 .bar { stroke: #00cc40; }
.state-speaking .ring-3 .bar { stroke: #006622; }

@keyframes rotateClockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateCounterClockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* ========== CENTRAL EQUALIZER RING ========== */
.central-ring {
    filter: drop-shadow(0 0 25px rgba(0,212,255,0.6));
    stroke: var(--primary-cyan);
    transition: r 0.15s ease, stroke-width 0.15s ease;
}

.central-glow {
    stroke: var(--primary-cyan);
    opacity: 0.4;
    transition: r 0.15s ease, filter 0.15s ease;
}

/* ========== ORBIT RING ========== */
.orbit-ring {
    z-index: 0;
}

.orbit-cursor {
    animation: orbitRotate 20s linear infinite;
    transform-origin: 300px 300px;
    will-change: transform;
}

@keyframes orbitRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== WEATHER WIDGET (Detailed Reference Style) ========== */
/* Aligned with Orbit:
   - Top edge = top of orbit ring (radius 220px from center of viewport)
   - Left edge = right edge of orbit ring + 20px gap
   - Position relative to #hud-container (= viewport) for reliable alignment
*/
.weather-widget {
    position: absolute;
    top: calc(50% - 220px);
    left: calc(50% + 220px + 20px);
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    z-index: 60;
    backdrop-filter: none;
    box-shadow: none;
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--primary-cyan);
    line-height: 1.4;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

/* Linke Spalte: aktuelle Wetterdaten */
.wx-current {
    width: 175px;
    display: flex;
    flex-direction: column;
}

/* Rechte Spalte: Datum + Vorhersage */
.wx-forecast {
    width: 145px;
    display: flex;
    flex-direction: column;
}

/* Wochentag + Datum über der Vorhersage */
.wx-date-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.25);
}

.wx-weekday {
    color: var(--primary-cyan);
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.wx-date {
    color: var(--primary-cyan);
    opacity: 0.6;
    font-size: 12px;
    letter-spacing: 0.3px;
}

/* Header: Location + Updated */
.weather-header-section {
    margin-bottom: 10px;
}

.weather-location {
    color: var(--primary-cyan);
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.weather-updated {
    color: var(--primary-cyan);
    opacity: 0.5;
    font-size: 12px;
    letter-spacing: 0.3px;
    font-weight: 400;
}

/* Main: Icon + Big Temp */
.weather-main-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.weather-icon {
    font-size: 44px;
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.3));
    flex-shrink: 0;
    line-height: 1;
}

.weather-temp-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weather-temp {
    color: #ffffff !important;
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 36px !important;
    line-height: 1;
    letter-spacing: 0.5px;
}

.weather-desc {
    color: var(--accent-gold);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Details: Left-aligned compact list */
.weather-details-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.detail-line {
    display: block;
    font-size: 13px;
    color: var(--primary-cyan);
    line-height: 1.4;
    letter-spacing: 0.3px;
    font-weight: 400;
}

.detail-line .dl {
    color: var(--primary-cyan);
    opacity: 0.75;
    font-weight: 400;
}

.detail-line .dv {
    color: var(--accent-gold);
    font-weight: 600;
}

/* Forecast section — vertikal gestapelt in der rechten Spalte */
.weather-forecast {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
}

.forecast-title {
    color: var(--accent-gold);
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.forecast-temp {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.forecast-temp .dv {
    color: #ffffff;
}

.forecast-temp .dv-low {
    color: var(--primary-cyan);
    opacity: 0.7;
}

.forecast-desc {
    color: var(--primary-cyan);
    opacity: 0.8;
    font-size: 12px;
    letter-spacing: 0.2px;
}

.detail-label {
    opacity: 0.7;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--primary-cyan);
}

.detail-value {
    font-weight: bold;
    opacity: 0.95;
    color: var(--accent-gold);
    font-size: 10px;
    text-align: right;
}

/* ========== PANELS ========== */
.panel {
    position: absolute;
    background: var(--panel-bg);
    border: 2px solid var(--primary-cyan);
    border-radius: 2px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
    z-index: 50;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: auto;
}

.panel-title {
    color: var(--accent-gold);
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 10px;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    padding-bottom: 4px;
}

.panel-content {
    color: var(--primary-cyan);
    font-size: 10px;
    line-height: 1.6;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-cyan) transparent;
}

.panel-content::-webkit-scrollbar {
    width: 4px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background: var(--primary-cyan);
    border-radius: 2px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    gap: 12px;
}

.status-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.status-label {
    font-weight: normal;
    opacity: 0.7;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-weight: bold;
    color: var(--accent-gold);
    font-size: 11px;
    text-align: right;
}

/* ========== AGENDA WIDGET (UNDER WEATHER) ========== */
.agenda-widget {
    position: absolute;
    top: calc(50% - 220px + 380px);
    left: calc(50% + 220px + 20px);
    width: 320px;
    max-height: 180px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    z-index: 60;
    backdrop-filter: none;
    display: none;
}

.agenda-widget.visible {
    display: block;
}

.agenda-content {
    color: var(--primary-cyan);
    font-size: 13px;
    line-height: 1.4;
    max-height: 140px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-cyan) transparent;
}

.agenda-content::-webkit-scrollbar {
    width: 3px;
}

.agenda-content::-webkit-scrollbar-track {
    background: transparent;
}

.agenda-content::-webkit-scrollbar-thumb {
    background: var(--primary-cyan);
    border-radius: 2px;
}

.agenda-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2px 0;
    border-bottom: none;
    gap: 8px;
    margin-bottom: 1px;
}

.agenda-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.agenda-time {
    color: var(--accent-gold);
    font-weight: 600;
    min-width: 50px;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Vergangene Termine - dunkleres Gelb */
.agenda-item.past .agenda-time {
    color: rgba(255, 215, 0, 0.65);
    opacity: 0.8;
}

/* Nächster Termin - mit Glow */
.agenda-item.next .agenda-time {
    color: var(--accent-gold);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: agendaTimeGlow 1.5s ease-in-out infinite;
}

@keyframes agendaTimeGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 1);
    }
}

.agenda-title {
    flex: 1;
    color: var(--primary-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

/* Vergangene Termine - dunklerer Text */
.agenda-item.past .agenda-title {
    color: rgba(0, 212, 255, 0.55);
    opacity: 0.8;
}

.agenda-location {
    color: rgba(0, 212, 255, 0.5);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.agenda-empty {
    color: rgba(0, 212, 255, 0.5);
    text-align: center;
    padding: 20px;
    font-size: 11px;
}

/* ========== DECHANGE LOGO (TOP LEFT) ========== */
.logo-container {
    position: absolute;
    top: 190px;
    right: calc(50% + 220px);
    left: auto;
    width: 220px;
    height: 210px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    box-sizing: border-box;
    z-index: 55;
}

.logo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Diffuse Glow Layer */
.glow-background {
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.6) 0%, rgba(0, 212, 255, 0.2) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    animation: diffuse-flicker 1.2s ease-in-out infinite;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes diffuse-flicker {
    0% { opacity: 0.48; }
    7% { opacity: 0.58; }
    11% { opacity: 0.50; }
    24% { opacity: 0.62; }
    31% { opacity: 0.52; }
    47% { opacity: 0.60; }
    58% { opacity: 0.49; }
    66% { opacity: 0.61; }
    73% { opacity: 0.53; }
    82% { opacity: 0.59; }
    91% { opacity: 0.51; }
    100% { opacity: 0.48; }
}

/* Foreground Logo Layer */
.logo-foreground {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-foreground svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
}

/* ========== STATUS PANEL (LEFT) - Aligned with Orbit ========== */
/* Same alignment logic as weather widget, but mirrored to the left:
   - Top edge of panel = top edge of orbit ring
   - Right edge of panel = left edge of orbit ring - 20px gap
*/
.panel-left {
    position: absolute;
    top: calc(50% - 220px);
    right: calc(50% + 220px + 20px);
    left: auto;
    transform: none;
    width: 240px;
    max-height: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0;
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    color: var(--primary-cyan);
    text-transform: none;
    letter-spacing: 0;
    overflow: visible;
}

.panel-left .panel-title {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    color: var(--primary-cyan);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: none;
    text-transform: uppercase;
    text-align: right;
}

.panel-left .panel-content {
    color: var(--primary-cyan);
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.panel-left .status-row {
    display: block;
    justify-content: unset;
    align-items: unset;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    gap: 0;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.3px;
    text-align: right;
}

.panel-left .status-row:last-child {
    border-bottom: none;
}

.panel-left .status-label {
    display: inline;
    color: var(--primary-cyan);
    opacity: 0.75;
    font-weight: 400;
    font-size: 13px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    text-align: right;
}

.panel-left .status-label::after {
    content: ": ";
}

.panel-left .status-value {
    display: inline;
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 13px;
    text-align: right;
}

/* ========== TRANSCRIPT PANEL (BOTTOM) ========== */
.panel-transcript {
    bottom: 20px;
    left: 20px;
    width: 350px;
    height: 180px;
}

#transcript .user {
    color: var(--primary-cyan);
    margin-bottom: 4px;
    font-size: 9px;
    line-height: 1.3;
}

#transcript .DARWIN {
    color: var(--accent-gold);
    margin-bottom: 4px;
    font-size: 9px;
    line-height: 1.3;
}

/* ========== STATUS BAR (CENTER BOTTOM) ========== */
#status {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-cyan);
    font-size: 11px;
    text-align: center;
    z-index: 60;
    white-space: nowrap;
    max-width: 70%;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* ========== STATE-BASED COLORS (ring-specific colors override these) ========== */
/* Per-ring colors are defined in the RING ANIMATIONS section above. */
/* These generic state styles are kept for any other .bar elements. */

.state-idle #inner-pulse-circle {
    stroke: var(--primary-cyan);
}

.state-listening #inner-pulse-circle {
    stroke: var(--primary-cyan);
}

.state-thinking #inner-pulse-circle {
    stroke: var(--state-orange);
}

.state-speaking #inner-pulse-circle {
    stroke: #ffffff;
}

/* ========== STATE-BASED CENTRAL RING ========== */
.state-idle .central-ring,
.state-idle .central-glow {
    stroke: var(--primary-cyan);
    filter: drop-shadow(0 0 20px rgba(0,212,255,0.4));
}

.state-listening .central-ring,
.state-listening .central-glow {
    stroke: var(--primary-cyan);
    filter: drop-shadow(0 0 40px rgba(0,212,255,0.8));
}

.state-thinking .central-ring,
.state-thinking .central-glow {
    stroke: var(--state-orange);
    filter: drop-shadow(0 0 35px rgba(255,136,0,0.7));
}

.state-speaking .central-ring,
.state-speaking .central-glow {
    stroke: var(--state-green);
    filter: drop-shadow(0 0 35px rgba(0,255,0,0.8));
}

/* ========== RESPONSIVE DESIGN ========== */
/* ========== BACKGROUND CANVASES (particles + code-rain) ========== */
#particles-canvas,
#coderain-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

#coderain-canvas {
    opacity: 0.75;
}

/* ========== ALTIMETER (left and right sides) ========== */
.altimeter {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 280px;
    z-index: 40;
    pointer-events: none;
}

.altimeter.left  { left: 8px; }
.altimeter.right { right: 8px; }

.altimeter svg {
    width: 100%;
    height: 100%;
    opacity: 0.95;
    filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.5));
}

.alt-tick { stroke: var(--primary-cyan); stroke-width: 1.5; opacity: 0.7; }
.alt-tick.major { stroke-width: 2.5; opacity: 1; }

.alt-label {
    fill: var(--accent-gold);
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ========== SHOCKWAVE (wakeword trigger) ========== */
.shockwave {
    position: absolute;
    top: 50%; left: 50%;
    width: 100px; height: 100px;
    border: 2px solid var(--primary-cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 90;
    opacity: 0;
}

.shockwave.active {
    animation: shockwaveBurst 1.2s ease-out;
}

@keyframes shockwaveBurst {
    0%   { width: 100px; height: 100px; opacity: 0.9; border-width: 3px; }
    100% { width: 1400px; height: 1400px; opacity: 0; border-width: 1px; }
}

/* ========== LENS FLARES ========== */
.lens-flare {
    position: fixed;
    width: 220px;
    height: 220px;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.18) 0%, transparent 60%);
    mix-blend-mode: screen;
}

.lens-flare-1 { top: -50px;  left:  -50px; }
.lens-flare-2 { bottom: -50px; right: -50px;
                background: radial-gradient(circle, rgba(255, 215, 0, 0.10) 0%, transparent 60%); }

/* ========== COMMAND LOG (last user input - top floating, gold) ========== */
.command-log {
    position: fixed;
    top: calc(50% - 220px - 100px);   /* above the orbit ring */
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-gold);
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    z-index: 80;
    pointer-events: none;
    opacity: 0;
    white-space: nowrap;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-log.visible {
    animation: commandLogFloat 5s ease forwards;
}

@keyframes commandLogFloat {
    0%   { opacity: 0; transform: translate(-50%, -10px); }
    10%  { opacity: 1; transform: translate(-50%, 0); }
    85%  { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* ========== DARWIN RESPONSE SPHERE (3D text around center) ========== */
.DARWIN-response-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    perspective: 1200px;
}

.DARWIN-response-sphere.visible {
    opacity: 1;
}

.response-text-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
}

.DARWIN-response-sphere.visible .response-text-container {
    animation: sphereRotate 12s ease-in-out forwards;
}

.response-char {
    position: absolute;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-cyan);
    white-space: nowrap;
    filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.6));
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    transform-style: preserve-3d;
}

@keyframes sphereRotate {
    0%   {
        opacity: 0;
        transform: rotateY(0deg) rotateX(0deg);
    }
    15%  {
        opacity: 1;
    }
    85%  {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotateY(360deg) rotateX(0deg);
    }
}

/* ========== DATA AUGMENT (floating random numbers) ========== */
.data-augment {
    position: fixed;
    color: var(--primary-cyan);
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 45;
    opacity: 0;
    text-shadow: 0 0 4px rgba(0, 212, 255, 0.7);
    white-space: nowrap;
}

.data-augment.flash {
    animation: dataFlash 1.2s ease-out;
}

@keyframes dataFlash {
    0%   { opacity: 0; transform: translate(0, 4px); }
    20%  { opacity: 0.85; }
    100% { opacity: 0; transform: translate(0, -4px); }
}

/* ========== PLASMA LINES (between rings) ========== */
.plasma-lines {
    pointer-events: none;
}

.plasma-line {
    fill: none;
    stroke: rgba(0, 212, 255, 0.4);
    stroke-width: 1.5;
    stroke-dasharray: 4 6;
    filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.7));
    animation: plasmaFlow 3s linear infinite;
}

@keyframes plasmaFlow {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -40; }
}

/* ========== GLITCH EFFECT (state changes) ========== */
@keyframes hudGlitch {
    0%   { transform: translate(0, 0); filter: hue-rotate(0deg); }
    20%  { transform: translate(-2px, 1px); filter: hue-rotate(20deg); }
    40%  { transform: translate(2px, -1px); filter: hue-rotate(-15deg); }
    60%  { transform: translate(-1px, 2px); filter: hue-rotate(10deg); }
    80%  { transform: translate(1px, -2px); filter: hue-rotate(-5deg); }
    100% { transform: translate(0, 0); filter: hue-rotate(0deg); }
}

.glitching {
    animation: hudGlitch 0.35s linear;
}

/* ========== ACTIVE WAVE (mic listening pulse, anchored at mic button) ========== */
.active-wave {
    position: fixed;
    bottom: 40px;
    right: calc(50% + 190px + 8px);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--primary-cyan);
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transform-origin: center center;
}

.active-wave.pulsing {
    animation: activeWavePulse 1.6s ease-out infinite;
}

@keyframes activeWavePulse {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0; transform: scale(2.6); }
}

@media (max-width: 1400px) {
    .hud-core {
        width: 500px;
        height: 500px;
    }

    .panel-left {
        width: 160px;
        max-height: 240px;
        font-size: 10px;
    }

    .panel-transcript {
        width: 300px;
        height: 150px;
    }

    .weather-overlay {
        width: 180px;
        right: 60px;
        top: 80px;
    }
}

@media (max-width: 1000px) {
    .hud-core {
        width: 400px;
        height: 400px;
    }

    .panel-left {
        width: 140px;
        max-height: 200px;
        font-size: 9px;
    }

    .panel-transcript {
        width: 250px;
        height: 120px;
    }

    .weather-overlay {
        width: 160px;
        right: 40px;
        top: 60px;
        padding: 8px;
    }

    .weather-temp {
        font-size: 16px !important;
    }
}

/* ========== USER INPUT DISPLAY (simple text display below rings) ========== */
.user-input-display {
    position: fixed;
    bottom: calc(40px + 50px);
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-gold);
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    z-index: 70;
    pointer-events: none;
    opacity: 0;
    max-width: 500px;
    text-align: center;
    padding: 8px 16px;
}

.user-input-display.visible {
    animation: userInputFade 5s ease forwards;
}

@keyframes userInputFade {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* ========== RADIO PLAYER - INTEGRIERT IN SYSTEM STATUS ========== */
.panel-radio-section {
    /* Integriert direkt in System Status Panel */
}

.radio-btn-inline {
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: rgba(0, 212, 255, 0.7);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    border-radius: 1px;
    transition: all 0.15s;
    flex: 1;
}

.radio-btn-inline:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: #00d4ff;
    color: #00d4ff;
}

.radio-btn-inline:active {
    transform: scale(0.98);
}

@media (max-width: 1400px) {
    .radio-btn-inline {
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
    }
}

@media (max-width: 1000px) {
    .radio-btn-inline {
        font-size: 0.6rem;
        padding: 0.2rem 0.3rem;
    }
}

/* ========== USER SETTINGS PANEL ========== */

/* Settings Button (top-right) */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: transparent;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    transform: scale(1.1);
}

.settings-btn:active {
    transform: scale(0.95);
}

/* Upload Button */
.upload-btn {
    position: fixed;
    top: 20px;
    right: 80px;  /* Rechts vom Settings-Zahnrad */
    width: 40px;
    height: 40px;
    font-size: 20px;
    background: transparent;
    border: none;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn:hover {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    transform: scale(1.1);
}

.upload-btn:active {
    transform: scale(0.95);
}

/* Upload Modal */
.upload-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.upload-modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Upload Area (Drag-Drop) */
.upload-area {
    border: 2px dashed #00d4ff;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(0, 212, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 0;
}

.upload-area:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #ffd700;
}

.upload-area.dragover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-area p {
    color: #00d4ff;
    margin: 10px 0;
    font-size: 14px;
}

.btn-primary {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid #00d4ff;
    color: #00d4ff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    font-family: 'Rajdhani', sans-serif;
}

.btn-primary:hover {
    background: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

/* Upload Status Spinner */
#upload-status {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#status-text {
    color: #00d4ff;
    font-size: 14px;
}

/* Settings Modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.settings-modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.modal-dialog {
    position: relative;
    z-index: 1001;
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.95) 0%, rgba(15, 30, 55, 0.95) 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.modal-close {
    background: none;
    border: none;
    color: #00d4ff;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #00ffff;
}

.modal-content {
    padding: 20px;
}

.settings-section {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-label {
    color: #00d4ff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.settings-input {
    width: 100%;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: #00d4ff;
    padding: 8px 10px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.settings-input:focus {
    outline: none;
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.settings-input::placeholder {
    color: rgba(0, 212, 255, 0.4);
}

.settings-toggle {
    display: flex;
    align-items: center;
    color: rgba(192, 232, 240, 0.9);
    font-size: 13px;
    cursor: pointer;
}

.settings-toggle input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #00d4ff;
}

.memory-list {
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 4px;
}

.memory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    font-size: 11px;
    color: rgba(192, 232, 240, 0.8);
}

.memory-item:last-child {
    border-bottom: none;
}

.memory-delete {
    background: none;
    border: none;
    color: rgba(255, 100, 100, 0.7);
    cursor: pointer;
    font-size: 12px;
    transition: color 0.2s;
}

.memory-delete:hover {
    color: #ff6464;
}

.settings-btn-small {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.settings-btn-small:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.settings-message {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 12px;
}

.settings-message.success {
    background: rgba(0, 255, 100, 0.15);
    border: 1px solid rgba(0, 255, 100, 0.3);
    color: #00ff64;
}

.settings-message.error {
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}

.modal-btn {
    flex: 1;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(192, 232, 240, 0.8);
    border: 1px solid rgba(192, 232, 240, 0.2);
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #c0e8f0;
}

.modal-btn-save {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.4);
}

.modal-btn-save:hover {
    background: rgba(0, 212, 255, 0.25);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.modal-btn:active {
    transform: scale(0.98);
}

/* Calendar Month Modal */
.calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.calendar-modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-modal .modal-dialog {
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    width: 95%;
}

.calendar-modal .modal-header {
    gap: 10px;
}

.nav-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    padding: 0;
}

.nav-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.calendar-grid-container {
    padding: 20px;
}

.weekday-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    color: #00d4ff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    min-height: 400px;
}

.calendar-day {
    min-height: 70px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.calendar-day.today {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
}

.calendar-day.other-month {
    background: rgba(100, 120, 140, 0.1);
    opacity: 0.5;
}

.day-number {
    color: #00d4ff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 2px;
    min-height: 14px;
}

.events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.event {
    font-size: 10px;
    color: rgba(192, 232, 240, 0.9);
    padding: 2px 4px;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.2);
}

.event.next {
    color: #ffd700;
    font-weight: 600;
    background: rgba(255, 215, 0, 0.2);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.event.past {
    opacity: 0.5;
    color: rgba(150, 150, 150, 0.8);
}

.event.future {
    color: rgba(192, 232, 240, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-modal .modal-dialog {
        width: 98%;
        max-height: 90vh;
    }

    .calendar-grid {
        min-height: 300px;
    }

    .calendar-day {
        min-height: 50px;
    }

    .day-number {
        font-size: 11px;
    }

    .event {
        font-size: 9px;
    }

    .calendar-modal .modal-header {
        flex-wrap: wrap;
    }

    #month-title {
        flex: 1 100%;
        text-align: center;
        order: -1;
        margin-bottom: 8px;
    }
}

/* ========== STATUS BADGES ========== */

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.status-badge.active {
    background-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-badge.inactive {
    background-color: #6b7280;
    color: #ffffff;
    opacity: 0.7;
}

/* ========== AGENT STATUS DISPLAY (Dashboard) ========== */

.agent-status-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.agent-status {
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 400;
    background-color: transparent;
    color: rgba(0, 212, 255, 0.7);
    text-align: right;
    min-width: auto;
    transition: color 0.3s ease;
    letter-spacing: 0.05em;
}

.agent-status.active #agent-status-text::before {
    content: '🟢 ';
}

.agent-status.inactive #agent-status-text::before {
    content: '⚫ ';
}

.agent-status.active {
    color: #10b981;
}

.agent-status.inactive {
    color: #9ca3af;
}

.agent-info-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background-color: rgba(0, 212, 255, 0.05);
    color: rgba(0, 212, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-weight: bold;
}

.agent-info-btn:hover {
    background-color: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* ========== AGENT INFO MODAL ========== */

.agent-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.agent-info-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-info-modal .modal-dialog {
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(20, 30, 50, 0.95) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 212, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.agent-info-modal .modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.agent-info-modal .modal-header span {
    font-size: 18px;
    font-weight: 600;
    color: #00d4ff;
    letter-spacing: 0.05em;
}

.agent-info-modal .modal-content {
    padding: 24px;
    overflow-y: auto;
    color: rgba(0, 212, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
}

.agent-info-modal .modal-content h1,
.agent-info-modal .modal-content h2,
.agent-info-modal .modal-content h3 {
    color: #00d4ff;
    margin-top: 16px;
    margin-bottom: 8px;
}

.agent-info-modal .modal-content code {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 3px;
    color: #ffd700;
    font-family: monospace;
}

.agent-info-modal .modal-content pre {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 12px;
    border-left: 3px solid #00d4ff;
    margin: 8px 0;
    overflow-x: auto;
}

.agent-info-modal .modal-content pre code {
    color: #00ff88;
    padding: 0;
    background: none;
}

.agent-info-modal .modal-content ul,
.agent-info-modal .modal-content ol {
    margin-left: 20px;
}

.agent-info-modal .modal-content li {
    margin-bottom: 6px;
}

/* ========== INTRO SECTION (erste zwei Abschnitte) ========== */

.intro-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.intro-header {
    color: #00d4ff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.intro-content {
    color: rgba(0, 212, 255, 0.75);
    font-size: 13px;
    line-height: 1.7;
}

.intro-content p {
    margin: 4px 0;
}

/* ========== ACCORDION STYLING ========== */

.accordion-item {
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    background-color: rgba(0, 0, 0, 0.2);
}

.accordion-header {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 500;
    color: #00d4ff;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.accordion-header:hover {
    background-color: rgba(0, 212, 255, 0.05);
    color: #00ffff;
}

.accordion-item[open] .accordion-header {
    background-color: rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.accordion-header::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.2s ease;
    margin-left: 10px;
}

.accordion-item[open] .accordion-header::after {
    transform: rotate(-180deg);
}

.accordion-content {
    padding: 12px 14px;
    color: rgba(0, 212, 255, 0.75);
    font-size: 13px;
    line-height: 1.6;
}

.accordion-content h3,
.accordion-content h4 {
    color: #00d4ff;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 14px;
}

.accordion-content code {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    color: #ffd700;
    font-family: monospace;
    font-size: 12px;
}

.accordion-content pre {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 12px;
    border-left: 3px solid #00d4ff;
    margin: 10px 0;
    overflow-x: auto;
    border-radius: 4px;
}

.accordion-content pre code {
    color: #00ff88;
    padding: 0;
    background: none;
    font-size: 11px;
}

.accordion-content ul {
    margin-left: 20px;
    margin-top: 8px;
}

.accordion-content li {
    margin-bottom: 6px;
}

.accordion-content strong {
    color: #00ffff;
}

/* ===== PROXMOX WIDGET ===== */

.proxmox-widget {
    position: absolute;
    top: calc(50% - 220px + 320px);
    right: calc(50% + 220px + 20px);
    width: 550px;
    max-height: 120px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    z-index: 60;
    display: none;
    overflow-y: auto;
    box-shadow: none;
}

/* Scrollbar für Chrome/Safari */
.proxmox-widget::-webkit-scrollbar {
    width: 8px;
}

.proxmox-widget::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.05);
}

.proxmox-widget::-webkit-scrollbar-thumb {
    background: #000 !important;
    border-radius: 4px;
}

.proxmox-widget::-webkit-scrollbar-thumb:hover {
    background: #222 !important;
}

/* Scrollbar für Firefox */
.proxmox-widget {
    scrollbar-color: #000 rgba(0, 212, 255, 0.05);
    scrollbar-width: thin;
}

.proxmox-widget.visible {
    display: block !important;
    animation: slideUp 0.6s ease-out;
}

.proxmox-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: none;
    padding-bottom: 6px;
    margin-bottom: 8px;
    text-align: right;
    background: rgba(6, 20, 33, 0.95);
}

.proxmox-title {
    font-family: 'Orbitron', 'Rajdhani', monospace;
    color: var(--primary-cyan);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    text-align: right;
    display: block;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.container-item {
    margin-bottom: 2px;
    padding: 2px 0;
    font-size: 12px;
    line-height: 1.2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    animation: slideRight 0.8s ease-out;
}

.container-left {
    display: flex;
    align-items: center;
    gap: 3px;
    text-align: left;
    flex: 1.2;
    min-width: 0;
}

.container-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    text-align: right;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.container-id {
    color: var(--primary-cyan);
    font-weight: 700;
}

.container-name {
    color: var(--accent-gold);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.separator {
    color: rgba(0, 212, 255, 0.4);
    margin: 0 2px;
}

.data-item {
    color: var(--accent-gold);
    font-size: 12px;
}

.container-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 4px;
}

.container-status[data-status="running"] {
    background-color: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.8);
}

.container-status[data-status="stopped"],
.container-status:not([data-status="running"]) {
    background-color: #666;
    box-shadow: 0 0 4px rgba(102, 102, 102, 0.5);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
