/* --- CSS VARIABLES --- */
:root {
    --bg-app: #121212;
    --bg-panel: rgba(30, 30, 30, 0.95);
    --bg-toolbar: rgba(10, 10, 10, 0.95);
    --text-main: white;
    --text-dim: #aaa;
    --border-color: rgba(255, 255, 255, 0.15);
    --input-bg: #2a2a2a;
    --btn-main-bg: transparent;
    --btn-sub-bg: #444;
    --accent: #00aaff;
    --danger: #e74c3c;
    --success: #2ecc71;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    --font-weight: normal;
}

body.site-mode {
    --bg-app: #ffffff;
    --bg-panel: rgba(255, 255, 255, 0.98);
    --bg-toolbar: #f0f0f0;
    --text-main: #000000;
    --text-dim: #333333;
    --border-color: #000000;
    --input-bg: #ffffff;
    --btn-main-bg: #e0e0e0;
    --btn-sub-bg: #ffffff;
    --accent: #0055ff;
    --danger: #c0392b;
    --success: #27ae60;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --font-weight: bold;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-app);
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    user-select: none;
    -webkit-user-select: none;
    padding-top: env(safe-area-inset-top);
    font-weight: var(--font-weight);
    transition: background 0.3s, color 0.3s;
}

canvas {
    display: block;
    touch-action: none;
    outline: none;
}

/* GENERIC MODAL */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    transition: opacity 0.3s;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

.login-box {
    background: var(--bg-panel);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    position: relative;
    color: var(--text-main);
}

.login-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    margin: 5px 0;
    font-size: 16px;
    box-sizing: border-box;
    font-family: inherit;
    font-weight: inherit;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 5px;
    border: 1px solid transparent;
}

.error-txt {
    color: var(--danger);
    display: none;
    margin-top: 10px;
    font-size: 13px;
    font-weight: bold;
}

/* IMAGE POPUP MODAL */
#image-popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#image-popup-content {
    max-width: 90%;
    max-height: 80%;
    border: 2px solid white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#close-popup-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--danger);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 0 10px var(--danger);
}

/* LOGO & CONTROLS */
#logo-overlay {
    position: fixed;
    z-index: 500;
    pointer-events: none;
    transition: opacity 0.3s;
}

#logo-overlay.unlocked {
    pointer-events: auto;
    cursor: move;
    outline: 1px dashed var(--accent);
}

#logo-img {
    max-width: 150px;
    max-height: 150px;
    display: block;
}

.logo-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--bg-panel);
    padding: 10px;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 501;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    width: 200px;
}

.logo-controls.active {
    display: flex;
}

.logo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.logo-control-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}

.logo-control-row label {
    width: 60px;
}

.logo-control-row input {
    flex-grow: 1;
}

/* MAP PANEL */
#map-panel {
    position: fixed;
    top: 60px;
    left: 20px;
    width: 320px;
    height: 450px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 10px;
    z-index: 5000;
    display: none;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow);
    resize: none;
    overflow: hidden;
    min-width: 250px;
    min-height: 300px;
    touch-action: none;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    flex-shrink: 0;
    cursor: move;
}

.map-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    z-index: 100;
    cursor: nwse-resize;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 5px;
    color: var(--accent);
    opacity: 0.7;
    font-size: 14px;
    touch-action: none;
}

.map-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    gap: 5px;
    position: relative;
}

.map-scroll-area {
    flex-grow: 1;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid var(--border-color);
    min-height: 150px;
    transition: flex-grow 0.3s;
    touch-action: none;
}

#map-content-wrapper {
    position: absolute;
    display: inline-block;
    line-height: 0;
    cursor: default;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

#map-content-wrapper.locked {
    cursor: grab;
    outline: 1px dashed var(--accent);
}

#map-img {
    display: block;
    pointer-events: none;
    user-select: none;
}

.map-dot {
    position: absolute;
    background: var(--success);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.map-dot.active {
    background: var(--accent);
    z-index: 110;
    box-shadow: 0 0 10px var(--accent);
    transform: translate(-50%, -50%) scale(1.2);
}

.btn-lock {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    transition: 0.2s;
    filter: grayscale(100%);
    opacity: 0.7;
}

.btn-lock.locked {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* LIST TOGGLE */
#map-list-toggle {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 5px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 10;
}

#map-photo-list {
    height: 150px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-y: auto;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
    opacity: 1;
    flex-shrink: 0;
    z-index: 10;
}

#map-photo-list.collapsed {
    height: 0;
    padding: 0;
    border: none;
    opacity: 0;
    margin: 0;
}

.map-list-item {
    padding: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.map-list-item.placed {
    border-left: 4px solid var(--success);
    opacity: 0.7;
}

.map-list-item.unplaced {
    border-left: 4px solid var(--danger);
}

.map-list-item.active {
    background: rgba(0, 170, 255, 0.2);
    border: 1px solid var(--accent);
}

.map-controls {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 5px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    cursor: move;
}

.btn-map {
    flex: 1;
    padding: 8px;
    font-size: 12px;
    background: var(--btn-sub-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 5px;
    cursor: pointer;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* REPORT LIST */
#report-photo-list {
    max-height: 120px;
    overflow-y: auto;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    padding: 5px;
    border-radius: 5px;
    display: grid;
    gap: 5px;
    margin-bottom: 10px;
}

.rep-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.rep-item input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.rep-item span {
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.export-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 10px;
    text-align: left;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-dim);
}

.export-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 4px;
}

.export-options input {
    width: auto;
    margin: 0;
}

/* GENERIC UI */
#recording-ui {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 6000;
    box-shadow: 0 0 15px var(--danger);
    animation: pulse 1.5s infinite;
}

#video-rec-ui {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--danger);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 6000;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

#drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 170, 255, 0.4);
    z-index: 5000;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    border: 5px dashed white;
    pointer-events: none;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

#bg-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: white;
    background: rgba(0, 0, 0, 0.85);
    padding: 15px 30px;
    border-radius: 30px;
    opacity: 0;
    pointer-events: none;
    z-index: 200;
    font-weight: bold;
    transition: opacity 0.3s;
}

/* OVERLAYS */
.info-overlay {
    position: absolute;
    padding: 5px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    width: 100%;
    top: env(safe-area-inset-top);
    transition: all 0.3s;
}

.info-overlay>* {
    pointer-events: auto;
}

#overlay-A {
    left: 0;
    width: 100%;
}

#overlay-B {
    display: none;
    left: 50%;
    width: 50%;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
    padding: 4px 8px;
    border-radius: 15px;
    margin-bottom: 2px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
}

.row-date {
    border-left: 4px solid #ffaa00;
}

.row-date-b {
    border-left: 4px solid var(--accent);
}

.label {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 3px;
}

select {
    background: transparent;
    color: var(--text-main);
    border: none;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    text-align: center;
    max-width: 140px;
}

option {
    background: var(--bg-app);
    color: var(--text-main);
}

.arrow-btn,
.edit-btn {
    background: rgba(128, 128, 128, 0.2);
    border: 1px solid transparent;
    color: var(--text-main);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 12px;
}

/* TOOLBARS */
#main-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-toolbar);
    padding: 10px 25px;
    border-radius: 50px;
    display: flex;
    gap: 20px;
    align-items: center;
    z-index: 100;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

#sub-toolbar {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 40px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 99;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px) scale(0.9);
    white-space: nowrap;
    overflow-x: auto;
    max-width: 95%;
}

#sub-toolbar.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

.btn-main {
    background: var(--btn-main-bg);
    border: 1px solid transparent;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-main.active {
    color: var(--accent);
    background: rgba(0, 170, 255, 0.15);
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--accent);
}

.btn-sub {
    background: var(--btn-sub-bg);
    border: 1px solid transparent;
    color: var(--text-dim);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    transition: 0.2s;
    min-width: 38px;
}

.btn-sub:hover {
    background: #555;
    color: white;
}

.btn-sub.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 8px var(--accent);
    border: 1px solid white;
}

.btn-pc {
    color: #ff9f43;
}

.btn-mob {
    color: #9b59b6;
}

.btn-save {
    color: #00d2d3;
}

.btn-rec {
    color: #ff6b6b;
}

.btn-smart-compare {
    color: #10b981;
    font-size: 20px;
    position: relative;
}

.btn-smart-compare:hover {
    background: #065f46;
    color: #10b981;
    transform: scale(1.15);
}

.btn-smart-compare.active {
    background: #10b981;
    color: white;
    box-shadow: 0 0 12px #10b981;
    animation: pulse-smart 2s infinite;
}

@keyframes pulse-smart {
    0%, 100% { box-shadow: 0 0 12px #10b981; }
    50% { box-shadow: 0 0 20px #10b981; }
}

.color-wrapper {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--text-main);
    position: relative;
    cursor: pointer;
    min-width: 30px;
}

#color-input {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    cursor: pointer;
}

.divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 5px;
}

.tool-group {
    display: none;
    align-items: center;
    gap: 8px;
}

.tool-group.active {
    display: flex;
}

input[type="file"] {
    display: none;
}

.sync-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: bold;
    color: var(--text-dim);
    margin-left: 5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 14px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(12px);
}

#split-divider {
    position: absolute;
    background: var(--accent);
    z-index: 50;
    display: none;
    pointer-events: none;
    box-shadow: 0 0 10px var(--accent);
}

#compare-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--text-main);
    cursor: col-resize;
    z-index: 120;
    display: none;
    transform: translateX(-50%);
    touch-action: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-weight: bold;
    border: 2px solid var(--accent);
    pointer-events: none;
}

.blend-wrapper {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 400px;
    background: var(--bg-panel);
    backdrop-filter: blur(8px);
    padding: 15px 25px;
    border-radius: 40px;
    border: 1px solid var(--border-color);
    z-index: 150;
    display: none;
    align-items: center;
    justify-content: center;
}

.blend-wrapper input {
    width: 100%;
    cursor: pointer;
    accent-color: var(--accent);
    height: 25px;
}

#btn-mic-modal {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #333;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

#btn-mic-modal.listening {
    background: #ff4757;
    animation: pulse-red 1.5s infinite;
}

#mic-status {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 5px;
    height: 16px;
}

/* TOOLTIP LABEL - Screen Space (2D Overlay) */
#label-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    max-width: 250px;
    z-index: 9000;
    pointer-events: none;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    white-space: pre-wrap;
    word-wrap: break-word;
}

#label-tooltip.visible {
    display: block;
    pointer-events: auto;
}

#label-tooltip img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin-top: 10px;
    border-radius: 4px;
    background: #444;
}

/* Map Drop Target Overlay */
#map-drop-target {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    /* Above everything in map */
    background-color: rgba(0, 170, 255, 0.1);
    border: 4px dashed #00aaff;
    box-sizing: border-box;
    pointer-events: auto;
    /* Must capture events */
}

#map-drop-target::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* AI Assistant Styles */
#ai-assistant-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    cursor: grab;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    transition: transform 0.1s;
    touch-action: none;
    /* Prevent scrolling while dragging */
}

#ai-assistant-btn:active {
    cursor: grabbing;
    transform: scale(0.95);
}

#ai-assistant-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 300px;
    height: 400px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.ai-header {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
}

#ai-chat-history {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-msg {
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.4;
}

.ai-msg-bot {
    background: rgba(255, 255, 255, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.ai-msg-user {
    background: var(--accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-input-area {
    padding: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 5px;
}

.ai-input-area input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 5px;
    color: white;
}

.ai-input-area button {
    background: var(--accent);
    border: none;
    color: white;
    width: 35px;
    border-radius: 5px;
    cursor: pointer;
}

#ai-mic-btn {
    background: var(--btn-sub-bg);
    transition: all 0.2s;
}

#ai-mic-btn.listening {
    background: var(--danger);
    animation: pulse-mic 1s infinite;
}

@keyframes pulse-mic {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}