:root { --primary: #0f766e; --danger: #e5322b; --bg: #11181a; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; background: var(--bg); color: #fff; overflow: hidden; }
[hidden] { display: none !important; }

/* Butun ekran — faqat shifokor */
.stage { position: fixed; inset: 0; overflow: hidden; background: var(--bg); cursor: none; }
.stage.show-ui, .stage.not-started { cursor: default; }
#doctor { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }

/* Boshlash oynasi */
.start {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 10px; padding: 0 16px 9vh; text-align: center;
  background: linear-gradient(to top, rgba(8, 18, 20, 0.85), rgba(8, 18, 20, 0.35) 45%, transparent 70%);
}
.start h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.start p { margin: 0; color: rgba(255, 255, 255, 0.85); max-width: 560px; }
.start .setup { background: rgba(255, 196, 0, 0.16); border: 1px solid rgba(255, 196, 0, 0.5); padding: 10px 14px; border-radius: 12px; font-size: 0.92rem; }
.start .hint { font-size: 0.88rem; color: rgba(255, 255, 255, 0.7); }
.start-btn {
  margin: 10px 0 4px; font: inherit; font-size: 1.1rem; font-weight: 600; padding: 14px 34px; border-radius: 999px;
  border: none; cursor: pointer; color: #fff; background: var(--primary); box-shadow: 0 8px 24px rgba(15, 118, 110, 0.45);
}
.start-btn:disabled { opacity: 0.7; cursor: wait; }
kbd { border: 1px solid rgba(255, 255, 255, 0.4); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font: inherit; font-size: 0.85em; }

/* Sichqoncha qimirlaganda chiqadigan tugmalar */
.ui { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s; background: linear-gradient(to top, rgba(0, 0, 0, 0.32), transparent 24%); }
.stage.show-ui:not(.not-started) .ui { opacity: 1; }
.stage.show-ui:not(.not-started) .cbtn { pointer-events: auto; }
.bar { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; gap: 18px; align-items: center; }
.cbtn { width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer; pointer-events: none; display: grid; place-items: center; color: #fff; background: rgba(20, 30, 34, 0.55); backdrop-filter: blur(8px); transition: transform 0.1s, background 0.2s; }
.cbtn svg { width: 28px; height: 28px; fill: currentColor; }
.cbtn:hover { background: rgba(20, 30, 34, 0.78); }
.cbtn:active { transform: scale(0.95); }
.cbtn:disabled { opacity: 0.5; cursor: wait; }
.cbtn.small { width: 46px; height: 46px; }
.cbtn.small svg { width: 22px; height: 22px; }
.cbtn.mic.recording { background: var(--danger); animation: pulse 1.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 50, 43, 0.55); } 100% { box-shadow: 0 0 0 16px rgba(229, 50, 43, 0); } }

.rec-dot { position: absolute; top: 22px; right: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--danger); animation: pulse 1.2s ease-out infinite; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 10; background: rgba(42, 23, 22, 0.92); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: min(560px, 92vw); }
