:root {
  --bg: #ffffff;
  --panel: #fafafa;
  --border: #ececec;
  --text: #161616;
  --muted: #666;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
@font-face{font-family:DuckSansProduct;src:url(/chunks/DuckSansProduct-Bold.woff2) format("woff2"),url(/chunks/DuckSansProduct-Bold.woff) format("woff"),url(/chunks/DuckSansProduct-Bold.ttf) format("truetype");font-weight:530 700;font-style:normal;font-display:swap}
@font-face{font-family:DuckSansProduct;src:url(/chunks/DuckSansProduct-Medium.woff2) format("woff2"),url(/chunks/DuckSansProduct-Medium.woff) format("woff"),url(/chunks/DuckSansProduct-Medium.ttf) format("truetype");font-weight:430;font-style:normal;font-display:swap}
@font-face{font-family:DuckSansProduct;src:url(/chunks/DuckSansProduct-Regular.woff2) format("woff2"),url(/chunks/DuckSansProduct-Regular.woff) format("woff"),url(/chunks/DuckSansProduct-Regular.ttf) format("truetype");font-weight:300 400;font-style:normal;font-display:swap}
@font-face{font-family:DuckSansDisplay;src:url(/chunks/DuckSansDisplay-Bold.woff2) format("woff2"),url(/chunks/DuckSansDisplay-Bold.woff) format("woff"),url(/chunks/DuckSansDisplay-Bold.ttf) format("truetype");font-weight:530 700;font-style:normal;font-display:swap}
@font-face{font-family:DuckSansDisplay;src:url(/chunks/DuckSansDisplay-Medium.woff2) format("woff2"),url(/chunks/DuckSansDisplay-Medium.woff) format("woff"),url(/chunks/DuckSansDisplay-Medium.ttf) format("truetype");font-weight:430;font-style:normal;font-display:swap}
@font-face{font-family:DuckSansDisplay;src:url(/chunks/DuckSansDisplay-Regular.woff2) format("woff2"),url(/chunks/DuckSansDisplay-Regular.woff) format("woff"),url(/chunks/DuckSansDisplay-Regular.ttf) format("truetype");font-weight:300 400;font-style:normal;font-display:swap}
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: 'DuckSansProduct', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

.app {
  display: flex;
  width: 100vw;
  height: 100vh;
}

.sidebar {
  width: 300px;
  min-width: 300px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  padding: 14px 14px 12px;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff2e8;
  border: 1px solid #ffd8bf;
  font-size: 15px;
}

.icon-btn {
  position: absolute;
  top: 14px;
  left: 264px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: #444;
}

.left-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.left-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  padding: 8px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.left-menu-item:hover {
  background: #f4f4f4;
}

.left-menu-icon {
  width: 18px;
  text-align: center;
  color: #222;
}

.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.free-badge {
  font-size: 13px;
  color: #666;
}

.footer-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.footer-links a {
  color: #1a73e8;
  text-decoration: none;
}

.main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero {
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -40px;
}

.logo-wrap {
  margin-bottom: 12px;
}

.duck-logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: #fff7ee;
  border: 2px solid #ffb36b;
}

h1 {
  margin: 0 0 28px;
  font-size: 30px;
  font-weight: 500;
}

.search-card {
  width: 100%;
  border: 1px solid #e8e8e8;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px 16px 12px;
}

.search-card textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  min-height: 52px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
}

.search-card textarea::placeholder {
  color: #8a8a8a;
}

.search-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.left-tools, .right-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-btn, .tools-link, .mode-btn, .model-btn, .send-btn, .chip {
  border: none;
  cursor: pointer;
  font: inherit;
}

.tool-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
}

.tools-link {
  background: transparent;
  color: #222;
  font-weight: 600;
}

.mode-btn, .model-btn {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  color: #222;
  font-weight: 500;
}

.send-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  color: #aaa;
  font-size: 18px;
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #222;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  border: 1px solid #ddd;
  background: #f5f5f5;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.menu {
  position: absolute;
  min-width: 280px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #eee;
  padding: 14px;
  z-index: 1000;
}

.hidden {
  display: none;
}

.menu-item {
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item strong {
  font-size: 15px;
}

.menu-item span {
  font-size: 13px;
  color: #666;
}

.menu-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 8px 0;
}

.active {
  background: #f2f2f2;
  border-radius: 16px;
}

.search-card {
  position: relative;
  overflow: visible;
}

.tools-link,
.mode-btn {
  cursor: pointer;
}

.floating-menu {
  position: absolute;
  z-index: 20;
  min-width: 340px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.10);
  padding: 10px;
}

.menu-row {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 14px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.menu-row:hover {
  background: #f6f6f6;
}

.menu-row strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.menu-row span {
  display: block;
  font-size: 13px;
  color: #666;
}

.menu-sep {
  height: 1px;
  background: #e9e9e9;
  margin: 8px 8px;
}

.mode-menu .menu-row.active {
  background: #f4f4f4;
}

.sidebar-bottom {
  position: relative;
}

.settings-wrap {
  position: relative;
}

.settings-row {
  width: 100%;
  border: 1px solid #e6e6e6;
  background: #efefef;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
}

.settings-row .free-badge {
  margin-left: auto;
}

.settings-menu {
  position: absolute;
  left: 0;
  bottom: 58px;
  min-width: 310px;
  padding: 10px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid #ececec;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.10);
  z-index: 50;
}

.settings-menu .menu-row {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.settings-menu .menu-row:hover {
  background: #f6f6f6;
}

.check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #1a73e8;
  color: #fff;
  flex: 0 0 26px;
}

#conversation {
    width: min(100%, 760px);
    margin-bottom: 20px;
}

.user-message {
    margin-left: auto;
    width: fit-content;
    max-width: 80%;
    background: #e8e8e8;
    padding: 12px 18px;
    border-radius: 24px;
    margin-bottom: 16px;
}

.assistant-message {
    max-width: 100%;
    padding: 8px 0;
    margin-bottom: 20px;
}

.chat-item {
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
}

.chat-item:hover {
    background: #f3f3f3;
}

#chatList {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-item {
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item:hover {
    background: #f4f4f4;
}

.chat-item.active {
    background: #ededed;
}

#conversation {
    width: 100%;
    margin-bottom: 20px;
}

.user-message {
    width: fit-content;
    max-width: 80%;
    margin-left: auto;
    margin-bottom: 18px;
    background: #ececec;
    padding: 12px 18px;
    border-radius: 22px;
}

.assistant-message {
    margin-bottom: 24px;
    line-height: 1.6;
}

.chat-screen {
    width: min(100%, 900px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

#conversation {
    flex: 1;
    overflow-y: auto;
    padding: 40px 0;
}

.user-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.user-message {
    background: #e8e8e8;
    padding: 14px 22px;
    border-radius: 24px;
    max-width: 75%;
}

.assistant-message {
    padding: 0;
    line-height: 1.7;
    margin-bottom: 32px;
}

.chat-section {
    margin-top: 16px;
}

.chat-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

/* ===== overlay ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 999;
}

/* ===== modal ===== */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  background: #fff;
  border-radius: 16px;
  z-index: 1000;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  font-family: Arial, sans-serif;
}

/* ===== header ===== */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
}

.modal-header h2 {
  font-size: 18px;
  margin: 0;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

/* ===== body ===== */
.modal-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.modal-hero {
  font-size: 42px;
  text-align: center;
  margin-bottom: 10px;
}

/* ===== footer ===== */
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #eee;
}

.modal-link {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #1677ff;
  color: white;
  cursor: pointer;
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .hero {
    margin-top: 0;
  }

  h1 {
    font-size: 24px;
    text-align: center;
  }
}
