/* J.A.R.V.I.S Web — teal/dark tema (masaüstü UI ile uyumlu) */

:root {
  --bg:     #010a0a;
  --panel:  #041111;
  --teal:   #00d4c4;
  --teal-d: #007a72;
  --mid:    #0a3a36;
  --text:   #c8f5f0;
  --dim:    #3a8a82;
  --red:    #ff4d4d;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ── Header ─────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mid);
  background: var(--panel);
}

.brand { font-size: 18px; letter-spacing: 3px; color: var(--teal); }
.brand .sub { font-size: 10px; color: var(--dim); letter-spacing: 2px; }

.badges { display: flex; gap: 8px; }

.badge {
  font-size: 10px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border: 1px solid var(--mid);
  border-radius: 3px;
  color: var(--dim);
}
.badge.on  { color: var(--teal); border-color: var(--teal-d);
             text-shadow: 0 0 8px var(--teal); }
.badge.off { color: var(--dim); }

/* ── Ana alan ───────────────────────────────────────── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding: 10px 14px 0;
}

#cam-wrap {
  position: relative;
  width: min(92vw, 480px);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--mid);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
  flex-shrink: 0;
}
#cam-wrap.hidden { display: none; }
#cam { width: 100%; height: 100%; object-fit: cover;
       transform: scaleX(-1); /* ayna */ }
.cam-live {
  position: absolute; top: 6px; right: 8px;
  font-size: 10px; color: var(--red);
  text-shadow: 0 0 6px var(--red);
}

#orb {
  width: min(60vw, 280px);
  height: min(60vw, 280px);
  flex-shrink: 0;
}

#status {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--dim);
  margin: 4px 0 8px;
  flex-shrink: 0;
}
#status.live { color: var(--teal); }

/* ── Sohbet günlüğü ─────────────────────────────────── */
#log {
  flex: 1;
  width: min(94vw, 560px);
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--mid);
  border-radius: 6px;
  background: var(--panel);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 8px;
}

#log .row       { margin-bottom: 6px; word-wrap: break-word; }
#log .who-user   { color: var(--dim); }
#log .who-jarvis { color: var(--teal); }
#log .who-sys    { color: #8a7a3a; font-size: 11px; }

/* ── Footer / kontroller ────────────────────────────── */
footer {
  flex-shrink: 0;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--mid);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.controls { display: flex; gap: 10px; justify-content: center; }

.ctl {
  flex: 1;
  max-width: 200px;
  padding: 12px 0;
  background: transparent;
  border: 1px solid var(--mid);
  border-radius: 4px;
  color: var(--dim);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all .15s;
}
.ctl.on {
  color: var(--teal);
  border-color: var(--teal-d);
  box-shadow: 0 0 12px rgba(0, 212, 196, .25) inset;
}
.ctl.rec {
  color: var(--red);
  border-color: var(--red);
}

#text-form { display: flex; gap: 8px; }

#text-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--mid);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
#text-input:focus { border-color: var(--teal-d); }

#text-form button {
  background: transparent;
  border: 1px solid var(--mid);
  border-radius: 4px;
  color: var(--teal);
  padding: 0 18px;
  font-size: 15px;
  cursor: pointer;
}
