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

body {
    background: #0a0a0f;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

#orb-container {
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    width: 300px;
    height: 300px;
}

#waveform-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    pointer-events: none;
}

#orb {
    position: relative;
    z-index: 1;
}

#orb {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

#orb.idle {
    background: radial-gradient(circle at 40% 40%, #1a3a5c, #0d1b2a);
    box-shadow: 0 0 40px rgba(30, 90, 160, 0.3), 0 0 80px rgba(30, 90, 160, 0.1);
}

#orb.listening {
    background: radial-gradient(circle at 40% 40%, #2a6cb8, #1a3a5c);
    box-shadow: 0 0 60px rgba(42, 108, 184, 0.6), 0 0 120px rgba(42, 108, 184, 0.2);
    animation: pulse-listen 1.5s ease-in-out infinite;
}

#orb.thinking {
    background: radial-gradient(circle at 40% 40%, #c9a227, #8b6914);
    box-shadow: 0 0 60px rgba(201, 162, 39, 0.5), 0 0 120px rgba(201, 162, 39, 0.15);
    animation: pulse-think 0.8s ease-in-out infinite;
}

#orb.speaking {
    background: radial-gradient(circle at 40% 40%, #27c96a, #148b3d);
    box-shadow: 0 0 60px rgba(39, 201, 106, 0.6), 0 0 120px rgba(39, 201, 106, 0.2);
    animation: pulse-speak 0.6s ease-in-out infinite;
}

@keyframes pulse-listen {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-think {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes pulse-speak {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#status {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    min-height: 20px;
}

/* ── Kontrollleiste ── */
#controls {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 10px 20px;
    margin-bottom: 28px;
}

.ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.ctrl-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ── VU-Meter ── */
#vu-meter {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
    padding: 0 4px;
}

#vu-meter span {
    width: 3px;
    border-radius: 2px;
    background: #2a6cb8;
    height: 3px;
    transition: height 0.08s ease, background 0.2s ease;
}

#vu-meter.active span { background: #4a9eff; }
#vu-meter.hot span    { background: #27c96a; }
#vu-meter.muted span  { background: #333; height: 3px !important; }

/* Mikro AN */
.ctrl-btn.mic-on {
    color: #4a9eff;
    border-color: rgba(74, 158, 255, 0.35);
}
.ctrl-btn.mic-on:hover {
    background: rgba(74, 158, 255, 0.1);
    border-color: rgba(74, 158, 255, 0.6);
}

/* Mikro AUS */
.ctrl-btn.mic-off {
    color: #e05555;
    border-color: rgba(224, 85, 85, 0.35);
    animation: mic-off-pulse 2s ease-in-out infinite;
}
.ctrl-btn.mic-off:hover {
    background: rgba(224, 85, 85, 0.1);
    border-color: rgba(224, 85, 85, 0.6);
    animation: none;
}

@keyframes mic-off-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Stop-Button */
#stop-btn {
    color: #ff8c42;
    border-color: rgba(255, 140, 66, 0.35);
}
#stop-btn:hover:not(:disabled) {
    background: rgba(255, 140, 66, 0.1);
    border-color: rgba(255, 140, 66, 0.6);
}
#stop-btn:disabled {
    color: #333;
    border-color: #222;
    cursor: not-allowed;
    opacity: 0.4;
}

/* Trenner */
#controls::before {
    display: none;
}
.ctrl-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Lautstärke */
#volume-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 4px;
}

#volume-control svg {
    width: 16px;
    height: 16px;
    color: #888;
    flex-shrink: 0;
}

#vol-label {
    font-size: 12px;
    color: #555;
    min-width: 32px;
    text-align: right;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(to right, #4a9eff 0%, #4a9eff 100%, #2a2a3a 100%);
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    transition: transform 0.15s ease;
    box-shadow: 0 0 6px rgba(74, 158, 255, 0.5);
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

#volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a9eff;
    border: none;
    cursor: pointer;
}

/* ── Background Canvas ── */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
}

/* ── Connection Dot ── */
#connection-dot {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#connection-dot.online {
    background: #27c96a;
    box-shadow: 0 0 8px rgba(39, 201, 106, 0.6);
}

#connection-dot.offline {
    background: #e05555;
    box-shadow: 0 0 8px rgba(224, 85, 85, 0.6);
    animation: mic-off-pulse 1.5s ease-in-out infinite;
}

/* ── Quick Commands ── */
#quick-commands {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.qcmd {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #555;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}

.qcmd:hover {
    border-color: rgba(74,158,255,0.4);
    color: #4a9eff;
    background: rgba(74,158,255,0.07);
}

.qcmd:active {
    transform: scale(0.95);
}

.qcmd.sent {
    border-color: rgba(74,158,255,0.6);
    color: #4a9eff;
    background: rgba(74,158,255,0.12);
}

/* ── Keyboard Hints ── */
#keyhints {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

#keyhints span {
    font-size: 11px;
    color: #333;
    letter-spacing: 0.04em;
}

/* ── Transcript ── */
#transcript {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    max-height: 260px;
    overflow-y: auto;
    padding: 0 20px;
}

#transcript .user,
#transcript .jarvis {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

#transcript .user   { font-size: 13px; }
#transcript .jarvis { font-size: 14px; }

#transcript .user:hover   { background: rgba(255,255,255,0.03); }
#transcript .jarvis:hover { background: rgba(74,158,255,0.06); }

#transcript .user.copied   { background: rgba(255,255,255,0.07); }
#transcript .jarvis.copied { background: rgba(74,158,255,0.12); }

.tc-meta {
    font-size: 11px;
    color: #444;
    letter-spacing: 0.03em;
}

#transcript .jarvis .tc-meta { color: #2a5a8a; }

.tc-time {
    margin-left: 4px;
    color: #333;
}

#transcript .jarvis .tc-time { color: #2a5a8a; }

.tc-text {
    color: #888;
    line-height: 1.5;
}

#transcript .jarvis .tc-text { color: #4a9eff; }
