/* Simulador Camila — Estilo */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #1a1a2e;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #2a2a4a;
}

header h1 {
    font-size: 1.5em;
    color: #ff8888;
}

#status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.connected {
    background: #44ff44;
    box-shadow: 0 0 10px rgba(68, 255, 68, 0.5);
}

.status-dot.disconnected {
    background: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.badge {
    background: #2a2a4a;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
}

main {
    display: flex;
    gap: 20px;
}

#body-container {
    flex: 1;
    position: relative;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#body-canvas {
    border-radius: 8px;
    cursor: crosshair;
}

#touch-info {
    margin-top: 15px;
    padding: 12px;
    background: #2a2a4a;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

#touch-info.hidden {
    display: none;
}

#touch-zone {
    color: #ff8888;
    font-weight: bold;
    font-size: 1.1em;
}

#touch-component {
    color: #aaa;
    font-size: 0.9em;
}

#touch-response {
    color: #88ff88;
    font-size: 0.9em;
}

aside#controls {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #2a2a4a;
}

.control-group h3 {
    margin-bottom: 12px;
    color: #ff8888;
    font-size: 1em;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
    font-size: 0.85em;
}

.control-group input[type="text"],
.control-group select {
    width: 100%;
    padding: 8px;
    background: #2a2a4a;
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.control-group input[type="range"] {
    width: 100%;
    margin: 5px 0 12px;
    accent-color: #ff6666;
}

.control-group button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 4px;
}

.control-group button:hover {
    opacity: 0.9;
}

.hidden {
    display: none !important;
}

#btn-connect {
    background: #44aa44;
    color: white;
}

#btn-disconnect {
    background: #aa4444;
    color: white;
}

#event-log {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.8em;
    font-family: monospace;
}

.log-entry {
    padding: 4px 0;
    border-bottom: 1px solid #2a2a3a;
    word-break: break-all;
}

#stats div {
    padding: 4px 0;
    font-size: 0.85em;
}

#stat-latency { color: #88ff88; }
#stat-zones { color: #ff88ff; }

footer {
    text-align: center;
    padding: 20px;
    color: #555;
    font-size: 0.8em;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #3a3a5a;
    border-radius: 3px;
}

/* Responsivo */
@media (max-width: 800px) {
    main {
        flex-direction: column;
    }
    aside#controls {
        width: 100%;
    }
}

/* ── Áudio & Câmera (SOTA 2030) ───────────────────── */
button {
    cursor: pointer;
}

#media-status {
    margin-top: 8px;
    font-size: 0.8em;
    color: #999;
    font-family: monospace;
}

#camera-preview {
    margin-top: 10px;
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
    border: 1px solid #3a3a5a;
}

.hidden {
    display: none !important;
}

/* Conversa (transcrição) */
.transcript {
    max-height: 160px;
    overflow-y: auto;
    font-size: 0.82em;
    line-height: 1.4;
    padding: 4px;
    background: rgba(0,0,0,0.25);
    border-radius: 6px;
}

.transcript-entry {
    padding: 3px 6px;
    margin-bottom: 3px;
    border-radius: 4px;
    word-wrap: break-word;
}

.transcript-entry.camila {
    color: #ffaadd;
    background: rgba(255,100,160,0.08);
}

.transcript-entry.di {
    color: #aaddff;
    background: rgba(100,160,255,0.08);
}
