/* ── APP ── */
#ap {
  z-index: 1;
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative
}

/* Dot matrix canvas in app */
#app-dot-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none
}

.app-gradient-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to top, #000 0%, transparent 55%),
    linear-gradient(to bottom, #000 0%, transparent 40%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, .97) 100%);
  z-index: 0;
  pointer-events: none
}

/* SIDEBAR */
.sb {
  width: 260px;
  min-width: 260px;
  background: rgba(6, 6, 6, .88);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-right: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: width .3s cubic-bezier(.4, 0, .2, 1), min-width .3s cubic-bezier(.4, 0, .2, 1), opacity .25s ease, transform .3s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
  position: relative;
  z-index: 2
}

.sb::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .08) 40%, rgba(255, 255, 255, .04) 80%, transparent 100%);
  background: linear-gradient(180deg, transparent 0%, rgba(255, 102, 196, .15) 40%, rgba(255, 222, 89, .08) 80%, transparent 100%);
  pointer-events: none
}

/* ── Daraltılmış mini ikon rayı (tam kapanmaz) ── */
.sb.off {
  width: 62px;
  min-width: 62px;
}

.sb.off .sbh {
  flex-direction: column;
  gap: 12px;
  padding: 14px 0 11px;
  justify-content: center;
}

.sb.off .sbrand {
  display: none;
}

.sb.off .sb-collapse svg {
  transform: rotate(180deg);
}

.sb.off .sb-nav {
  padding: 8px 8px 4px;
  align-items: center;
}

.sb.off .sb-nav-item {
  justify-content: center;
  padding: 9px 0;
  width: 42px;
}

.sb.off .sb-nav-item span,
.sb.off .sb-search-item #sb-search,
.sb.off .sb-section-hd span,
.sb.off .cl,
.sb.off .sb-history-hd,
.sb.off .search-res {
  display: none;
}

.sb.off .sb-section {
  display: none;
}

.sb.off .sb-proj-new {
  display: none;
}

.sb.off .sbf {
  padding: 9px 0;
}

.sb.off .ur {
  justify-content: center;
  padding: 6px 0;
}

.sb.off .ur > div:not(.av),
.sb.off .ur svg {
  display: none;
}

.sbh {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: space-between;
  padding: 14px 12px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: padding .25s cubic-bezier(.4, 0, .2, 1), gap .25s cubic-bezier(.4, 0, .2, 1);
}

.sb-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.sb-logo img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  border-radius: 7px;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(255, 255, 255, .2), 0 0 0 1px rgba(255, 255, 255, .1)
}

.sbrand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.4px;
  color: var(--aa);
}

/* ── Grok tarzı sidebar nav ── */
.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 8px 4px;
}

.sb-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  background: none;
  border: none;
  border-radius: 9px;
  color: var(--tx);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, padding .25s cubic-bezier(.4, 0, .2, 1), width .25s cubic-bezier(.4, 0, .2, 1);
  text-align: left;
}

.sb-nav-item svg {
  flex-shrink: 0;
  opacity: .85;
}

.sb-nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--tx);
}

.sb-nav-item.active {
  background: rgba(255, 255, 255, .07);
  color: var(--tx);
}

.sb-search-item {
  cursor: text;
  position: relative;
}

.sb-search-item #sb-search {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--tx);
  font-size: 13.5px;
  font-family: inherit;
}

.sb-search-item #sb-search::placeholder {
  color: var(--mu);
}

.sb-collapse {
  opacity: .7;
}

/* ── Sidebar bölümleri (Projeler / Geçmiş) ── */
.sb-section {
  padding: 4px 8px 0;
  transition: padding .25s cubic-bezier(.4, 0, .2, 1);
}

.sb-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 11px 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--tx);
  text-transform: none;
}

.sb-history-hd {
  padding-top: 14px;
}

.sb-proj-new {
  color: var(--dm);
  font-weight: 500;
  font-size: 13px;
}

.sb-proj-new svg {
  opacity: .7;
}

.sb-proj-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
}

.sb-proj-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--tx);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.sb-proj-item:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--tx);
}

.sb-proj-item svg {
  flex-shrink: 0;
  opacity: .7;
}

.sb-proj-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb.off .sb-proj-list {
  display: none;
}

.sb-proj-caret {
  width: 10px;
  flex-shrink: 0;
  font-size: 10px;
  text-align: center;
  opacity: .6;
}

.sb-proj-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--dm);
  flex-shrink: 0;
}

.sb-proj-add {
  background: none;
  border: none;
  color: var(--dm);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 3px;
  border-radius: 4px;
  flex-shrink: 0;
}

.sb-proj-add:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--tx);
}

.sb-proj-sub-item {
  display: flex;
  align-items: center;
  padding: 6px 11px 6px 32px;
  border-radius: 8px;
  color: var(--tx);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-proj-sub-item:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--tx);
}

.sb-proj-sub-item.on {
  background: var(--sf2);
  color: var(--tx);
}

/* ── Dosya geçmişi modalı ── */
.filehist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 2px;
}

.filehist-card {
  position: relative;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filehist-card:hover {
  border-color: var(--bd2);
  background: var(--sf2);
  transform: translateY(-2px);
}

.filehist-thumb {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sf2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.filehist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filehist-thumb-ico .material-symbols-outlined {
  font-size: 34px;
  color: var(--mu);
}

.filehist-name {
  font-size: 12px;
  color: var(--tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filehist-del {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s, background .15s;
  z-index: 2;
}

.filehist-card:hover .filehist-del {
  opacity: 1;
}

.filehist-del:hover {
  background: var(--red, #e55865);
}

/* ══════════════════════════════════════
   IMAGINE EKRANI
══════════════════════════════════════ */
#imagine-screen {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--sb-width, 62px);
  z-index: 40;
  background: #000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: left .3s cubic-bezier(.4, 0, .2, 1);
}

#imagine-screen.on {
  display: flex;
  animation: fadeUp .25s ease;
}

/* Dot pattern arka plan (referans tasarım) */
.imagine-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(380px circle at 50% 180px, #000, transparent 75%);
  mask-image: radial-gradient(380px circle at 50% 180px, #000, transparent 75%);
}

/* Karşılama başlığı + input alanı */
.imagine-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 16px;
  min-height: 38vh;
  overflow: hidden;
  border-radius: 18px;
}

#imagine-dot-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 80%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 80%);
}

.imagine-hero > * {
  position: relative;
  z-index: 1;
}

.imagine-greeting {
  font-family: 'DM Sans', sans-serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -1.5px;
  color: #fff;
  line-height: 1;
}

@media (max-width: 600px) {
  .imagine-greeting { font-size: 34px; }
}

.imagine-greeting-sub {
  margin-top: 8px;
  font-size: 16px;
  color: #737880;
}

.imagine-input-bar {
  margin-top: 24px;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.imagine-input-bar:focus-within {
  border-color: rgba(255, 255, 255, .22);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .05);
}

.imagine-input-bar #imagine-prompt {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  resize: none;
  color: var(--tx);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  padding: 16px 16px 6px;
  max-height: 140px;
}

.imagine-input-bar #imagine-prompt::placeholder {
  color: var(--dm);
}

.imagine-input-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.imagine-tb-spacer {
  flex: 1;
}

.imagine-send {
  background: var(--tx);
  border: none;
  color: var(--bg);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}

.imagine-send:hover {
  transform: translateY(-1px);
  opacity: .9;
}

/* Yükleniyor kartı + spinner */
.imagine-card.imagine-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .04);
}

.imagine-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .12);
  border-top-color: rgba(255, 255, 255, .8);
  animation: imagineSpin .8s linear infinite;
}

@keyframes imagineSpin {
  to { transform: rotate(360deg); }
}

.imagine-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 22px 40px;
  position: relative;
  z-index: 1;
}

.imagine-sec-hd {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.imagine-templates {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.imagine-templates::-webkit-scrollbar {
  display: none;
}

.imagine-tpl {
  position: relative;
  flex: 0 0 175px;
  height: 230px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: var(--sf2);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: transform .18s, border-color .18s;
}

.imagine-tpl:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .25);
}

.imagine-tpl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.imagine-tpl-name {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  padding: 24px 0 9px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75));
  text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
}

.imagine-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.imagine-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: var(--sf2);
  border: 1px solid rgba(255, 255, 255, .07);
  aspect-ratio: 3 / 4;
  transition: transform .18s, border-color .18s;
}

.imagine-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .25);
}

.imagine-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.imagine-card-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 10px 8px;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  #imagine-screen { left: 0; }
  .imagine-scroll { padding: 4px 14px 40px; }
  .imagine-hero { padding: 30px 8px 22px; }
  .imagine-tpl { flex-basis: 140px; height: 185px; }
}

.imagine-empty {
  grid-column: 1 / -1;
  font-family: 'DM Sans', sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1.5px;
  color: var(--mu);
  line-height: 1;
  text-align: center;
}

.ib {
  background: none;
  border: none;
  color: var(--tx);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  position: relative;
  overflow: hidden
}

.ib::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, .14), transparent 70%);
  opacity: 0;
  transition: opacity .2s;
  border-radius: 8px
}

.ib:hover {
  background: var(--sf);
  color: var(--mu)
}

.ib:hover::before {
  opacity: 1
}

.ib:active {
  transform: scale(.9)
}

.nc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 9px 3px;
  padding: 10px 13px;
  background: linear-gradient(135deg, var(--sf), var(--sf2));
  border: 1px solid var(--bd);
  border-radius: 11px;
  color: var(--tx);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .22s ease;
  width: calc(100% - 18px);
  position: relative;
  overflow: hidden
}

.nc::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  opacity: 0;
  transition: opacity .22s
}

.nc:hover {
  border-color: var(--bd2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3)
}

.nc:hover::before {
  opacity: 1
}

.nc:active {
  transform: translateY(0)
}

.cl {
  flex: 1;
  overflow-y: auto;
  padding: 4px 7px 7px;
  scrollbar-width: thin;
  scrollbar-color: #282828 transparent
}

.clbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--tx);
  text-transform: uppercase;
  letter-spacing: .9px;
  padding: 11px 8px 4px
}

.ci {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s ease;
  position: relative
}

.ci::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--aa);
  transition: height .22s cubic-bezier(.4, 0, .2, 1)
}

.ci:hover {
  background: var(--sf)
}

.ci:hover::before {
  height: 55%
}

.ci.on {
  background: var(--sf2)
}

.ci.on::before {
  height: 65%
}

.cn {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .18s
}

.ci:hover .cn,
.ci.on .cn {
  color: var(--tx)
}

.ci-acts {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity .18s
}

.ci:hover .ci-acts {
  opacity: 1
}

.cdel,
.cren {
  background: none;
  border: none;
  color: var(--dm);
  cursor: pointer;
  padding: 3px;
  border-radius: 5px;
  display: flex;
  transition: all .18s
}

.cdel:hover {
  color: var(--red);
  background: rgba(229, 88, 101, .12)
}

.cren:hover {
  color: var(--mu);
  background: var(--sf2)
}

.sbf {
  border-top: 1px solid rgba(255, 255, 255, .04);
  padding: 9px;
  position: relative;
  margin-top: auto;
  transition: padding .25s cubic-bezier(.4, 0, .2, 1);
}

.pm {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 7px;
  right: 7px;
  background: rgba(12, 12, 12, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 6px;
  display: none;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .06);
  z-index: 2100;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: pmIn .15s ease;
  isolation: isolate;
}

@keyframes pmIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.pm.on {
  display: block
}

.pmi {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--mu);
  cursor: pointer;
  transition: all .18s
}

.pmi:hover {
  background: var(--sf);
  color: var(--tx)
}

.pmi.danger:hover {
  background: rgba(229, 88, 101, .1);
  color: var(--red)
}

.pmi-sep {
  height: 1px;
  background: var(--bd);
  margin: 4px 0
}

.ur {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s
}

.ur:hover {
  background: var(--sf)
}

.av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(200, 200, 200, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #0c0c0c;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
  transition: box-shadow .22s
}

.ur:hover .av {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 0 16px rgba(255, 255, 255, 0.2)
}

.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%
}

.un {
  color: var(--tx);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.ue {
  font-size: 11px;
  color: var(--dm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

/* MAIN */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  background: rgba(0, 0, 0, .45);
  position: relative;
  z-index: 2
}

:root {
  --ed-bg: #0a0a0a;
  --ed-bg2: #121212;
  --ed-fg: #e8e8e8;
  --ed-fg-dim: #b0b0b0;
  --ed-border: #1d1d1d;
  --ed-linenum: #4a4a4a;
  --ed-caret: #fff;
  --ed-active-line: rgba(255, 255, 255, .04);
  --ed-statusbar: #0d0d0d;
}

.tb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 52px;
  border-bottom: none;
  flex-shrink: 0;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 10
}

.tb-sb-btn {
  display: none;
}

.tb-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(200, 200, 200, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #0c0c0c;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
  transition: box-shadow .22s
}

.tb-av:hover {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 0 16px rgba(255, 255, 255, 0.2)
}

.tb-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%
}

.tbt {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.mode-wrap {
  position: relative
}

.mode-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--mu);
  cursor: pointer;
  transition: color .18s, background .18s;
  white-space: nowrap;
  user-select: none;
  background: none
}

.mode-badge #mode-icon {
  font-size: 16px !important;
}

.mode-badge:hover {
  color: var(--tx);
  background: rgba(255, 255, 255, .06)
}

.mode-badge.fast,
.mode-badge.auto,
.mode-badge.expert {
  color: var(--tx);
}

.mode-badge.normal {
  border-color: #4ade80;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.18);
}

.mode-badge.code {
  border-color: #60a5fa;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.18);
}

.mode-badge.detail {
  border-color: #fb923c;
  color: #fb923c;
  background: rgba(251, 146, 60, 0.08);
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.18);
}

.mode-badge.creative {
  border-color: #f472b6;
  color: #f472b6;
  background: rgba(244, 114, 182, 0.08);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.18);
}
