/* Voro Prompt Studio — Apple estetikasi + sayt tokenlari. BLUR YO'Q (tezlik qoidasi). */
.pc {
  --pc-accent: #2BD4FF;
  --pc-text: #F2F6FA;
  --pc-dim: rgba(233, 240, 248, 0.55);
  --pc-line: rgba(255, 255, 255, 0.09);
  --pc-panel: rgba(255, 255, 255, 0.045);
  --pc-user: rgba(43, 212, 255, 0.10);
  display: flex;
  height: calc(100vh - 210px);
  min-height: 460px;
  border: 1px solid var(--pc-line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  color: var(--pc-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ── Yon panel ── */
.pc-side {
  width: 244px;
  flex: 0 0 244px;
  border-right: 1px solid var(--pc-line);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.018);
}
.pc-side-top { padding: 14px 12px 10px; }
.pc-new {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(43, 212, 255, 0.3);
  background: rgba(43, 212, 255, 0.10);
  color: var(--pc-accent);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pc-new:hover { background: rgba(43, 212, 255, 0.16); }
.pc-new svg { width: 16px; height: 16px; display: block; }

.pc-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.pc-ci {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.pc-ci:hover { background: rgba(255, 255, 255, 0.05); }
.pc-ci.on { background: rgba(43, 212, 255, 0.11); }
.pc-ct {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 9px 10px;
  background: none;
  border: none;
  color: var(--pc-text);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-ci.on .pc-ct { color: var(--pc-accent); font-weight: 600; }
.pc-cd {
  flex: 0 0 auto;
  padding: 7px 8px;
  background: none;
  border: none;
  color: transparent;
  cursor: pointer;
  line-height: 0;
}
.pc-ci:hover .pc-cd { color: rgba(255, 138, 138, 0.85); }
.pc-cd svg { width: 15px; height: 15px; display: block; }

.pc-scrim { display: none; }

/* ── Asosiy ustun ── */
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.pc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--pc-line);
}
.pc-burger {
  display: none;
  background: none;
  border: none;
  color: var(--pc-dim);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}
.pc-burger svg { width: 20px; height: 20px; display: block; }

.pc-mw { position: relative; }
.pc-model {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--pc-line);
  background: var(--pc-panel);
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.pc-model:hover { border-color: rgba(43, 212, 255, 0.45); }
.pc-model > span:first-child {
  max-width: 168px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-chev { width: 13px; height: 13px; display: block; color: var(--pc-dim); }
.pc-chev svg { width: 100%; height: 100%; display: block; }

.pc-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 232px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--pc-line);
  background: #0e151d;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  display: none;
  z-index: 40;
}
.pc-menu.open { display: block; }
.pc-menu { max-height: 400px; }
.pc-mgrp {
  position: sticky;
  top: -6px;
  padding: 9px 12px 5px;
  background: #0e151d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(233, 240, 248, 0.42);
  z-index: 1;
}
.pc-mi {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  color: var(--pc-text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.pc-mi:hover { background: rgba(255, 255, 255, 0.06); }
.pc-mi.on { color: var(--pc-accent); font-weight: 700; background: rgba(43, 212, 255, 0.10); }

/* Miya (Claude modeli) tanlagichi — model NOMI bilan */
.pc-bw { margin-left: auto; position: relative; }
.pc-brainbtn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--pc-line);
  background: var(--pc-panel);
  color: var(--pc-text);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease;
}
.pc-brainbtn:hover { border-color: rgba(43, 212, 255, 0.45); }
.pc-bmenu { left: auto; right: 0; min-width: 196px; }
.pc-mi i {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--pc-dim);
  margin-top: 1px;
}
.pc-mi.on i { color: rgba(43, 212, 255, 0.75); }

/* Referens rasm: qisqich, mayda ko'rinishlar */
.pc-file { display: none; }
.pc-clip {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-bottom: 3px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--pc-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.pc-clip:hover { color: var(--pc-accent); background: rgba(43, 212, 255, 0.10); }
.pc-clip svg { width: 17px; height: 17px; display: block; }
.pc-thumbs {
  display: none;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto 8px;
  flex-wrap: wrap;
}
.pc-th {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--pc-line);
}
.pc-th.busy { opacity: 0.45; }
.pc-th { touch-action: none; cursor: grab; transition: transform .12s ease, opacity .12s ease; }
.pc-th.drag { opacity: .45; transform: scale(.92); cursor: grabbing; }
.pc-th.over { outline: 2px solid var(--pc-accent); outline-offset: 1px; }
.pc-thn {
  position: absolute;
  left: -4px;
  bottom: -4px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: #101822;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  pointer-events: none;
}
.pc-thint { flex-basis: 100%; font-size: 10.5px; opacity: .55; margin-top: 2px; }
.pc-thp {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: rgba(6, 10, 15, .62);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  pointer-events: none;
}
.pc-hint {
  display: none;
  max-width: 720px;
  margin: 0 auto 6px;
  font-size: 11.5px;
  color: var(--pc-accent);
  opacity: .85;
}
.pc-send.wait, .pc-send.wait:hover { opacity: .38; filter: none; }
.pc-send[disabled] { cursor: not-allowed; pointer-events: none; }
.pc-th video, .pc-mimg video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.pc-th.vid::after, .pc-mimg.vid::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform: translate(-40%, -50%);
  border-left: 11px solid rgba(255,255,255,.92);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
.pc-mimg { position: relative; overflow: hidden; }
.pc-thx {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: none;
  background: #101822;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.pc-thx svg { width: 11px; height: 11px; display: block; }
.pc-mimgs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.pc-mimg {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ── Xabarlar ── */
.pc-scroll { flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.pc-thread { max-width: 720px; margin: 0 auto; padding: 26px 20px 34px; }

.pc-msg { margin-bottom: 22px; display: flex; }
.pc-u { justify-content: flex-end; }
.pc-u .pc-body {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 18px 18px 5px 18px;
  background: var(--pc-user);
  border: 1px solid rgba(43, 212, 255, 0.16);
  font-size: 14.5px;
  line-height: 1.55;
}
.pc-a .pc-body { max-width: 100%; font-size: 15px; line-height: 1.65; }
.pc-body p { margin: 0 0 10px; }
.pc-body p:last-child { margin-bottom: 0; }
.pc-body ul { margin: 0 0 10px; padding-left: 20px; }
.pc-body li { margin: 3px 0; }
.pc-body b { font-weight: 650; }
.pc-ic {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}
.pc-code {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--pc-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.pc-err { color: #FF8A8A; }

/* Tayyor prompt kartasi */
.pc-prompt {
  margin: 14px 0;
  border-radius: 16px;
  border: 1px solid rgba(43, 212, 255, 0.26);
  background: rgba(43, 212, 255, 0.055);
  overflow: hidden;
}
.pc-prompt-h {
  padding: 9px 14px 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: rgba(43, 212, 255, 0.85);
}
.pc-prompt-b {
  padding: 8px 14px 12px;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.pc-prompt-a {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.pc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 10px;
  border: 1px solid var(--pc-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--pc-text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pc-btn:hover { background: rgba(255, 255, 255, 0.09); }
.pc-btn svg { width: 14px; height: 14px; display: block; }
.pc-go {
  background: linear-gradient(180deg, var(--pc-accent), #189bd1);
  border-color: var(--pc-accent);
  color: #04212f;
  font-weight: 700;
}
.pc-go:hover { filter: brightness(1.06); background: linear-gradient(180deg, var(--pc-accent), #189bd1); }

/* Bo'sh holat */
.pc-empty { text-align: center; padding: 54px 16px 20px; }
.pc-empty-ic {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  color: var(--pc-accent);
  opacity: 0.85;
}
.pc-empty-ic svg { width: 100%; height: 100%; display: block; }
.pc-empty h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; letter-spacing: -0.3px; }
.pc-empty p { margin: 0 auto; max-width: 420px; font-size: 14px; line-height: 1.55; color: var(--pc-dim); }

/* Yozmoqda nuqtalari */
.pc-dots { display: flex; gap: 5px; padding: 6px 0; }
.pc-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pc-accent);
  opacity: 0.4;
  animation: pcDot 1.15s infinite ease-in-out;
}
.pc-dots i:nth-child(2) { animation-delay: 0.16s; }
.pc-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes pcDot { 0%, 80%, 100% { opacity: 0.28; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ── Composer ── */
.pc-comp { padding: 12px 20px 18px; border-top: 1px solid var(--pc-line); }
.pc-box {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--pc-line);
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.pc-box:focus-within {
  border-color: rgba(43, 212, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(43, 212, 255, 0.1);
}
.pc-ta {
  flex: 1;
  min-height: 26px;
  max-height: 168px;
  resize: none;
  border: none;
  outline: none;
  background: none;
  color: var(--pc-text);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  padding: 6px 0;
}
.pc-ta::placeholder { color: rgba(233, 240, 248, 0.38); }
.pc-send {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, var(--pc-accent), #189bd1);
  color: #04212f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s ease;
}
.pc-send:hover { filter: brightness(1.08); }
.pc-send svg { width: 18px; height: 18px; display: block; }
.pc-send.stop { background: rgba(255, 255, 255, 0.14); color: var(--pc-text); }

/* ── Mobil ── */
@media (max-width: 860px) {
  /* Pastki dock (~86px) composerni yopib qolmasin — konteyner undan tepada tugaydi */
  .pc {
    height: calc(100vh - 300px);
    height: calc(100dvh - 300px);
    min-height: 380px;
    margin-bottom: 92px;
    border-radius: 18px;
  }
  .pc-model > span:first-child { max-width: 128px; }
  .pc-burger { display: block; }
  .pc-side {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    transform: translateX(-102%);
    transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    background: #0d141c;
  }
  .pc.side-open .pc-side { transform: translateX(0); }
  .pc.side-open .pc-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.45);
  }
  .pc-thread { padding: 20px 14px 28px; }
  .pc-comp { padding: 10px 14px 14px; }
  .pc-a .pc-body { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .pc *, .pc-dots i { transition: none !important; animation: none !important; }
  .pc-scroll { scroll-behavior: auto; }
}
