/* Global resets & typography */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background-color: #11111b;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #181825;
}
::-webkit-scrollbar-thumb {
  background: #313244;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #45475a;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Dual Layer Code Editor Styling */
.code-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  font-family: 'Fira Code', monospace;
  tab-size: 2;
}

#highlightPre {
  background: transparent !important;
  color: #cdd6f4;
}

#codeTextarea {
  color: transparent;
  background: transparent;
  caret-color: #89b4fa;
}

#codeTextarea::selection {
  background: rgba(137, 180, 250, 0.25);
  color: transparent;
}

/* Prism Overrides for Catppuccin Mocha look */
code[class*="language-"],
pre[class*="language-"] {
  color: #cdd6f4;
  font-family: 'Fira Code', monospace;
  direction: ltr;
  text-align: left;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6c7086;
  font-style: italic;
}

.token.punctuation {
  color: #9399b2;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #fab387;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #a6e3a1;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #89dceb;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #cba6f7;
  font-weight: 500;
}

.token.function,
.token.class-name {
  color: #89b4fa;
}

.token.regex,
.token.important,
.token.variable {
  color: #f9e2af;
}

/* Active tab state */
.tab-btn.active-tab {
  background-color: #1e1e2e !important;
  color: #ffffff !important;
  border-bottom: 2px solid #89b4fa !important;
}

/* Quick Bar buttons */
.quick-char {
  transition: all 0.15s ease;
  user-select: none;
}
.quick-char:active {
  transform: scale(0.92);
}

/* Modal animation */
.animate-in {
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Markdown prose tweaks in AI output */
.prose pre {
  background-color: #11111b;
  border: 1px solid #313244;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
  direction: ltr;
  text-align: left;
}
.prose code {
  color: #f9e2af;
  background-color: #181825;
  padding: 0.15rem 0.3rem;
  border-radius: 0.25rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.85em;
}
.prose pre code {
  color: #cdd6f4;
  background-color: transparent;
  padding: 0;
}