:root {
  --shell-bg: #0b0c14;
  --frame-bg: #1c1f2e;
  --chrome-bg: #23273a;
  --border: #313650;
  --text: #e7ecff;
  --text-dim: #9096b5;
  --accent: #6b7bff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--shell-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  justify-content: center;
  padding: 32px 16px 60px;
}

.demo-shell {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

.demo-note code {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11.5px;
}

.demo-note-sim {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

.browser-frame {
  background: var(--frame-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.browser-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--chrome-bg);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.browser-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--chrome-bg);
  border-bottom: 1px solid var(--border);
}

.url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--frame-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.url-lock {
  font-size: 11px;
}

.ext-button {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--frame-bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.ext-button:hover {
  border-color: var(--accent);
}

.ext-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: #ff5470;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.ext-badge.ext-badge-empty {
  display: none;
}

.browser-viewport {
  position: relative;
  min-height: 460px;
  background: #f4f5f9;
}

.mock-page {
  height: 100%;
  padding: 24px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 460px;
}

.mock-msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #1c1f2e;
}

.mock-msg-user {
  align-self: flex-end;
  background: #d9e0ff;
  border-bottom-right-radius: 3px;
}

.mock-msg-assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e2e4ee;
  border-bottom-left-radius: 3px;
}

.popup-anchor {
  position: absolute;
  top: 8px;
  right: 12px;
}

.popup-panel {
  margin-top: 4px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

@media (max-width: 480px) {
  .browser-viewport {
    min-height: 420px;
  }

  .mock-page {
    max-height: 420px;
    padding: 18px;
  }

  .popup-anchor {
    right: 6px;
  }
}
