:root {
  --bg0: #07111c;
  --bg1: #0c1b2b;
  --card: rgba(14, 32, 52, 0.72);
  --line: rgba(140, 190, 230, 0.14);
  --text: #e8f2fb;
  --muted: #8aa3b8;
  --accent: #3ec6c9;
  --accent2: #5b8cff;
  --danger: #ef5b6a;
  --ok: #3dd68c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Segoe UI", "Avenir Next", Calibri, sans-serif;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(62, 198, 201, 0.18), transparent 55%),
    radial-gradient(900px 500px at 110% 10%, rgba(91, 140, 255, 0.16), transparent 50%),
    linear-gradient(180deg, var(--bg0), #050b12 70%);
}

body { padding: 28px 20px 40px; }

.app {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent2));
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #041018;
  box-shadow: 0 8px 24px rgba(62, 198, 201, 0.28);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.model-tag {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
}

.grid {
  display: grid;
  grid-template-columns: 360px 1fr 320px;
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 20px;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 560px;
}

.orb-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 18px 0 8px;
}

.orb-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid rgba(62, 198, 201, 0.35);
  opacity: 0.12;
  transition: opacity 0.2s;
}

.orb {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff 0, rgba(255,255,255,0.15) 12%, transparent 28%),
    radial-gradient(circle at 50% 55%, #7ef0f2, #3b82f6 55%, #123 100%);
  box-shadow:
    0 0 40px rgba(62, 198, 201, 0.35),
    inset 0 -18px 30px rgba(0,0,0,0.35);
  transition: transform 0.08s linear;
}

body[data-state="talk"] .orb {
  background:
    radial-gradient(circle at 35% 30%, #fff 0, rgba(255,255,255,0.18) 12%, transparent 28%),
    radial-gradient(circle at 50% 55%, #ffe4b3, #ff8ab0 48%, #6d28d9 100%);
}

body[data-state="listen"] .orb {
  background:
    radial-gradient(circle at 35% 30%, #fff 0, rgba(255,255,255,0.16) 12%, transparent 28%),
    radial-gradient(circle at 50% 55%, #b8fff1, #22d3ee 52%, #0f766e 100%);
}

body[data-state="think"] .orb {
  background:
    radial-gradient(circle at 35% 30%, #fff 0, rgba(255,255,255,0.16) 12%, transparent 28%),
    radial-gradient(circle at 50% 55%, #ddd6fe, #818cf8 50%, #312e81 100%);
}

body[data-gender="erkek"] .orb {
  background:
    radial-gradient(circle at 35% 30%, #fff 0, rgba(255,255,255,0.16) 12%, transparent 28%),
    radial-gradient(circle at 50% 55%, #9ad4ff, #3b82f6 52%, #0b2a4a 100%);
}

.name {
  margin: 6px 0 0;
  font-size: 26px;
  font-weight: 700;
}

.role { color: var(--muted); font-size: 13px; margin: 2px 0 14px; }

.status {
  min-height: 22px;
  font-size: 14px;
  font-weight: 600;
  color: #cfe8f4;
}

.status[data-kind="err"] { color: #ff9aa6; }
.status[data-kind="talk"] { color: #ffd4a8; }
.status[data-kind="listen"] { color: #9af0d8; }
.status[data-kind="think"] { color: #c4b5fd; }

.timer {
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 13px;
}

.controls {
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

select, button {
  font: inherit;
}

select {
  width: 100%;
  background: #0a1624;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn-start {
  background: linear-gradient(180deg, #45d4d7, #2aa8b8);
  color: #041018;
}

.btn-end {
  background: linear-gradient(180deg, #ff7b88, #d64555);
  color: #fff;
}

.btn[disabled] { opacity: 0.55; cursor: default; }

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.box-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 700;
}

.speech {
  min-height: 92px;
  max-height: 160px;
  overflow: auto;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-wrap;
}

.thought-wrap {
  display: none;
  margin-top: 12px;
}

.thought-wrap.show { display: block; }

.thought {
  font-size: 12px;
  color: #c4b5fd;
  font-style: italic;
}

.mid-col, .notes-col { display: flex; flex-direction: column; gap: 12px; }

.notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}

.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
}

.note-item {
  position: relative;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 28px 10px 12px;
}

.note-item strong { display: block; font-size: 13px; }
.note-item p { margin: 4px 0 0; font-size: 13px; color: #d5e6f2; }
.note-k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ok);
  margin-bottom: 2px;
}

.note-del {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.empty { color: var(--muted); font-size: 13px; }

.log-card { min-height: 140px; }

.log {
  max-height: 150px;
  overflow: auto;
  font-size: 12px;
  color: var(--muted);
}

.log-row { padding: 3px 0; border-bottom: 1px dashed rgba(255,255,255,0.05); }
.log-row span { color: #6f8aa0; margin-right: 6px; }

@media (max-width: 1020px) {
  .grid { grid-template-columns: 1fr; }
  .stage { min-height: auto; }
}
