/* Tips (Dicas) Panel e Botão */
.tips-tab {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  color: var(--color-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  z-index: 1101;
  transition:
    left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  box-shadow: 2px 0 8px var(--shadow-color);
  font-size: 24px;
  border: 2px solid var(--bg-primary);
  border-left: none;
}
.tips-tab:hover {
  background: var(--color-yellow);
  color: var(--bg-primary);
  box-shadow: 2px 0 12px var(--shadow-color);
}
.tips-tab:focus,
.tips-tab:active {
  outline: none;
  border: none;
  border-left: none;
}
.history-tab {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  color: var(--color-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px 0 0 12px;
  cursor: pointer;
  z-index: 1101;
  transition:
    right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  box-shadow: -2px 0 8px var(--shadow-color);
  font-size: 24px;
  border: 2px solid var(--bg-primary);
  border-right: none;
}
.history-tab:hover {
  background: var(--color-yellow);
  color: var(--bg-primary);
  box-shadow: -2px 0 12px var(--shadow-color);
}
.history-tab:focus,
.history-tab:active {
  outline: none;
  border: none;
  border-right: none;
}
.history-tab i {
  font-size: 24px;
}
/* Variáveis de Tema */
:root {
  /* Cores do tema */
  --color-yellow: #efd834;
  --color-blue: #4aa0de;
  --color-yellow-hover: #f5e157;
  --color-blue-hover: #5eb0ee;

  /* Tema Escuro (padrão) */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3d3d3d;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --border-color: rgba(255, 255, 255, 0.15);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --input-bg: rgba(255, 255, 255, 0.08);
  --hover-bg: rgba(255, 255, 255, 0.12);

  /* Variáveis de design */
  --border-radius-sm: 6px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
}

/* Tips Panel */
.tips-panel {
  position: fixed;
  top: 0;
  left: -350px;
  width: 350px;
  height: 100vh;
  background: var(--bg-primary);
  box-shadow: 2px 0 20px var(--shadow-color);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
  overflow-y: auto;
}
.tips-panel.open {
  left: 0;
}
.tips-header {
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.tips-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

/* Theme Toggle Button */
.theme-toggle {
  display: none;
}

.theme-toggle:hover {
  /* ...removed... */
}

.theme-toggle:active {
  /* ...removed... */
}

body.light-theme .theme-toggle i::before {
  /* ...removed... */
}

body.light-theme .theme-toggle {
  /* ...removed... */
}

/* Animações de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-section {
  animation: fadeInUp 0.6s ease-out;
}

/* Logo Section */
.logo-section {
  text-align: center;
  padding: 40px 0 30px;
  margin-bottom: 20px;
}

.logo-main {
  max-width: 300px;
  height: auto;
  filter: drop-shadow(0 2px 6px var(--shadow-color));
  transition: all 0.2s ease;
}

.logo-main:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .logo-main {
    max-width: 200px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .grid-container {
    padding: 1rem;
  }
}

body {
  font-family: Arial, sans-serif;
  width: 100%;
  background: var(--bg-primary);
  margin: 0;
  color: var(--text-primary);
  min-height: 100vh;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

html::-webkit-scrollbar {
  width: 0px;
  background-color: transparent;
}

.textarea-input::-webkit-scrollbar {
  width: 6px;
}

.textarea-input::-webkit-scrollbar-track {
  background: transparent;
}

.textarea-input::-webkit-scrollbar-thumb {
  background: var(--color-blue);
  border-radius: 10px;
  opacity: 0.7;
}

.textarea-input::-webkit-scrollbar-thumb:hover {
  background: var(--color-yellow);
  opacity: 1;
}

.textarea-input {
  font-family: Arial, sans-serif;
  -webkit-font-smoothing: none !important;
  width: 100%;
  border-radius: 8px;
  resize: none;
  margin-top: 20px;
  background-color: var(--input-bg);
  color: var(--text-primary);
  border: none;
  padding: 1.2rem;
  margin-bottom: 5px;
  transition: all 0.2s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.textarea-input:focus {
  background-color: var(--hover-bg);
  border: none;
  outline: none;
}

.textarea-container {
  position: relative;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.pixelated {
  filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='pixelate-filter'><feOffset dx='0' dy='0' result='box-blur'/><feFlood x='1' y='1' height='1' width='1'/><feComposite width='3' height='3'/><feTile result='tiles'/><feComposite in='box-blur' operator='in'/><feMorphology operator='dilate' radius='1'/></filter></svg>#pixelate-filter");
}

.textarea-input {
  width: 100%;
  padding-left: 50px;
  height: 180px;
  font-size: 12px;
  line-height: 1.5;
}

.textarea-input::placeholder {
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.8;
}

.textarea-container,
.input-group input {
  box-shadow: 0 1px 3px var(--shadow-color);
}

.generated {
  display: inline;
  position: relative;
  padding: 0.1em 0.2em 0.1em 0.2em;
  white-space: pre-line;
  word-wrap: break-word;
  line-height: 1.3;
  background-color: transparent;
  color: var(--text-primary);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border-radius: 0;
  background-clip: padding-box;
  margin-bottom: 2px;
  z-index: 1;
}

.background-active {
  background-color: rgb(0, 0, 0);
  padding: 10px;
}

#output {
  position: relative;
  padding: 20px;
  border-radius: var(--border-radius-md);
  background-color: transparent;
  box-sizing: border-box;
  overflow: visible;
  margin-top: 25px;
}

/* Overlay Mode */
#toggleOverlayMode.overlay-active {
  background-color: var(--color-blue) !important;
  color: #fff !important;
}

.overlay-controls {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  padding: 16px;
  margin-top: 12px;
}

.overlay-controls-row {
  margin-bottom: 12px;
}

.overlay-controls-row:last-child {
  margin-bottom: 0;
}

.overlay-size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.overlay-size-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-size-group label {
  display: inline !important;
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
  white-space: nowrap;
}

.overlay-size-input {
  width: 80px !important;
  padding: 6px 8px !important;
  font-size: 13px !important;
  text-align: center;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  border-radius: 4px !important;
}

.overlay-size-separator {
  color: var(--text-secondary);
  font-size: 16px;
}

.overlay-size-unit {
  color: var(--text-secondary);
  font-size: 13px;
}

.overlay-info {
  color: var(--text-secondary);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.overlay-info i {
  color: var(--color-blue);
}

/* Overlay viewport */
.overlay-viewport {
  position: relative;
  margin-top: 16px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: var(--bg-secondary);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  cursor: grab;
  max-width: 100%;
}

.overlay-viewport.has-image {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.06);
  background-color: #000;
}

.overlay-viewport:active {
  cursor: grabbing;
}

.overlay-viewport.no-image {
  cursor: default;
}

/* Drop zone inside viewport */
.overlay-drop-zone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 5;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease;
}

.overlay-drop-zone:hover {
  color: rgba(255, 255, 255, 0.6);
}

.overlay-drop-zone.drag-over {
  color: var(--color-yellow);
}

.overlay-drop-zone i {
  font-size: 48px;
  opacity: 0.6;
}

.overlay-drop-title {
  font-size: 16px;
  font-weight: 500;
}

.overlay-drop-sub {
  font-size: 13px;
  opacity: 0.7;
}

.overlay-drop-zone.hidden {
  display: none;
}

/* Download row */
.download-row {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.overlay-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  object-fit: none;
  pointer-events: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
}

.overlay-text-layer {
  position: relative;
  z-index: 2;
  padding: 20px;
  pointer-events: none;
  line-height: 0;
  -webkit-font-smoothing: none !important;
  font-weight: 700;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  letter-spacing: 0;
  font-size: 12px;
}

.me {
  color: #c2a3da;
}

.ame {
  color: #c2a3da;
}

.darkgrey {
  color: #5a5a5b;
}

.grey {
  color: #939799;
}

.lightgrey {
  color: #c6c4c4;
}

.death {
  color: #f00000;
}

.yellow {
  color: #fbf724;
}

.green,
.money {
  color: #37a758;
}

.orange,
.whisper {
  color: #eda841;
}

.blue {
  color: #3896f3;
}
.purple {
  color: #c2a3da;
}

.white {
  color: #f1f1f1;
}

.toyou {
  color: #ff00bc;
}

.color-0 {
  color: #ffffff;
}
.color-1 {
  color: #ff4444;
}
.color-2 {
  color: #37a758;
}
.color-3 {
  color: #ffda33;
}
.color-4 {
  color: #4869d0;
}
.color-5 {
  color: #acacac;
}
.color-6 {
  color: #b789da;
}
.color-7 {
  color: #e09026;
}
.color-8 {
  color: #49886f;
}
.color-9 {
  color: #b85061;
}

.output {
  line-height: 0;
  -webkit-font-smoothing: none !important;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow:
    -1px -1px 0 var(--bg-primary),
    1px -1px 0 var(--bg-primary),
    -1px 1px 0 var(--bg-primary),
    1px 1px 0 var(--bg-primary);
  letter-spacing: 0;
  font-size: 12px;
  margin-top: 20px;
  padding: 20px;
}

* {
  -webkit-font-smoothing: none !important;
  -moz-osx-font-smoothing: none !important;
}

/* Global: remove focus borders/outlines for clean design */
textarea:focus,
input:focus,
select:focus,
button:focus,
textarea:active,
input:active,
select:active,
button:active {
  outline: none !important;
  box-shadow: none !important;
}

.button {
  padding: 0.7rem 1.2rem;
  font-size: 16px;
  border-radius: 0.5rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  height: 50%;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  font-weight: 600;
}

.button:hover {
  background-color: var(--color-blue);
  color: #fff;
  transform: translateY(-1px);
}

.button:focus {
  outline: 2px solid var(--color-yellow);
  outline-offset: 2px;
}

.button:active {
  transform: translateY(0);
}

.input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.input-group input,
.cell input {
  padding: 0.6rem;
  border-radius: 0.5rem !important;
  flex: 1;
  border: none;
  background-color: var(--input-bg);
  box-sizing: border-box;
  font-size: 14px;
  height: auto;
  margin-bottom: 0;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.input-group input::placeholder,
.cell input::placeholder {
  color: var(--text-secondary);
}

.input-group input:hover,
.cell input:hover {
  background-color: var(--hover-bg);
}

.input-group input:focus,
.cell input:focus {
  background-color: var(--hover-bg);
  color: var(--text-primary);
  border: none;
  outline: none;
}

.input-group input:-webkit-autofill,
.cell input:-webkit-autofill {
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0 30px var(--input-bg) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.input-group-button .button {
  padding: 0.7rem 1.2rem;
  font-size: 16px;
  border-radius: 0.5rem !important;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  height: 100%;
  margin-bottom: 0;
  transition: all 0.2s ease;
  font-weight: 600;
}

.input-group-button .button:hover {
  background-color: var(--color-yellow);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.input-group-button .button:active {
  transform: translateY(0);
}

.textarea-input:focus,
.input-group input:focus {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.cell label {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 0;
}

.scale-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scale-toggle .switch-input {
  appearance: none;
  width: 50px;
  height: 25px;
  background-color: #111;
  border-radius: 25px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background-color 0.3s ease;
}

.scale-toggle .switch-input:checked {
  background-color: #333;
}

.scale-toggle .switch-input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.scale-toggle .switch-input:checked::before {
  transform: translateX(25px);
}

.grid-container {
  padding: 2rem;
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
  max-width: 1200px;
  margin: 0 auto;
}

.input-cell {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-cell label {
  font-weight: bold;
  font-size: 14px;
}

.input-cell input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  margin-bottom: 0;
}

/* Estilos específicos para botões success e secondary */
.button.success {
  background-color: var(--color-blue);
  color: #fff;
}

.button.success:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.button.secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.button.secondary:hover {
  background-color: var(--color-yellow);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.logo-overlay {
  position: absolute;
  top: 0px;
  left: 7px;
  width: 30px;
  height: auto;
  pointer-events: none;
  z-index: -1;
}

.logo-overlay img {
  opacity: 60%;
  max-width: auto;
  max-height: auto;
}

.grid-x {
  display: flex;
  flex-wrap: wrap;
}

.button-group-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.clear {
  clear: both;
}

.coloring-mode span {
  cursor: pointer;
}

.coloring-mode span:hover {
  outline: 1px dotted rgba(255, 255, 255, 0.5);
}

.selected-for-coloring {
  background-color: rgba(255, 255, 255, 0.2) !important;
  outline: 2px solid #3896f3 !important;
}

.colorable {
  display: inline;
}

.coloring-mode .colorable:hover {
  background-color: rgba(255, 255, 255, 0.1);
  outline: 1px dotted #3896f3;
}

/* Coloring mode banner */
.coloring-banner {
  background-color: var(--color-blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coloring-banner i {
  font-size: 16px;
}

/* Color palette panel */
.color-palette-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--bg-secondary);
  border-radius: 10px;
  padding: 16px;
  z-index: 2000;
  width: 240px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.color-palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.color-selected-count {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.color-palette-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  border: 2px solid transparent;
}

.color-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.color-swatch.active-color {
  border-color: var(--color-yellow);
  box-shadow: 0 0 6px var(--color-yellow);
}

.color-palette-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.color-palette-custom label {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  margin: 0;
}

.color-palette-custom input[type="color"] {
  width: 32px;
  height: 28px;
  padding: 0;
  border: none !important;
  background: none;
  cursor: pointer;
}

.color-palette-custom .button.small {
  font-size: 11px;
  padding: 4px 10px;
  margin: 0;
}

/* Active coloring mode button */
#toggleColoringMode.coloring-active {
  background-color: var(--color-blue) !important;
  color: #fff !important;
}

/* Censor char copy button */
.censor-copy-btn {
  font-weight: bold;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.blur {
  filter: blur(4px);
  -webkit-filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.hidden.censored-content {
  opacity: 0;
  user-select: none;
  pointer-events: none;
}

.info-bracket {
  display: inline-block;
  align-items: center;
  justify-content: center;
  padding: 0.7em 1.2em;
  margin: 0 0 1rem 0;
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: bold;
  border: none;
  background-color: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  vertical-align: middle;
  line-height: 1;
}

.info-bracket:hover {
  background-color: var(--color-yellow);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.info-bracket:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.info-bracket:active {
  transform: translateY(0);
}

.info-icon {
  margin-right: 2px;
}

.censor-char-container {
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.25rem;
}

.censor-char-display {
  width: 2.5rem;
  height: 2.4rem;
  text-align: center;
  font-size: 1.2rem;
  border: none;
  border-radius: 6px;
  background-color: var(--input-bg);
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem 0;
  margin: 0;
  font-weight: bold;
  vertical-align: middle;
  line-height: 1.25;
  display: inline-block;
  transition: all 0.2s ease;
}

.censor-char-display:hover {
  background-color: var(--hover-bg);
  /* border-color removed for minimalism */
}

.censor-char-display:focus {
  outline: none;
}

.censor-char-button {
  padding: 0.4em 0.5em;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

.history-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
}

.history-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.history-header h3 {
  margin: 0;
  margin-right: 10px;
  font-size: 16px;
  font-weight: 500;
}

.history-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.history-item {
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: var(--bg-secondary);
  transition: all 0.2s ease;
  max-height: 300px;
  overflow-y: auto;
}

.history-item:hover {
  background-color: var(--bg-tertiary);
  /* border-color removed for minimalism */
  transform: translateX(-3px);
}

.history-item:focus {
  outline: none;
}

.history-item-text {
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.history-item-text .me {
  color: #c2a3da;
}
.history-item-text .ame {
  color: #c2a3da;
}
.history-item-text .darkgrey {
  color: #5a5a5b;
}
.history-item-text .grey {
  color: #939799;
}
.history-item-text .lightgrey {
  color: #c6c4c4;
}
.history-item-text .death {
  color: #f00000;
}
.history-item-text .yellow {
  color: #fbf724;
}
.history-item-text .green {
  color: #37a758;
}
.history-item-text .orange {
  color: #eda841;
}
.history-item-text .blue {
  color: #3896f3;
}
.history-item-text .white {
  color: #f1f1f1;
}
.history-item-text .toyou {
  color: #ff00bc;
}
.history-item-text .color-0 {
  color: #ffffff;
}
.history-item-text .color-1 {
  color: #ff4444;
}
.history-item-text .color-2 {
  color: #37a758;
}
.history-item-text .color-3 {
  color: #ffda33;
}
.history-item-text .color-4 {
  color: #4869d0;
}
.history-item-text .color-5 {
  color: #acacac;
}
.history-item-text .color-6 {
  color: #b789da;
}
.history-item-text .color-7 {
  color: #e09026;
}
.history-item-text .color-8 {
  color: #49886f;
}
.history-item-text .color-9 {
  color: #b85061;
}

.history-loading {
  display: none;
  text-align: center;
  padding: 20px;
  color: #95a5a6;
}

.history-loading.active {
  display: block;
}

.history-empty {
  text-align: center;
  padding: 20px;
  color: #95a5a6;
  display: none;
}

.history-empty.active {
  display: block;
}

.close-btn {
  display: none;
}

.clear-history-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  font-weight: 600;
}

.clear-history-btn:hover {
  background: #c0392b;
  transform: translateY(-1px);
}

.clear-history-btn:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* old .history-tab removed - styles are at the top of the file */

.history-panel {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100vh;
  background: var(--bg-primary);
  box-shadow: -2px 0 20px var(--shadow-color);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
  border-left: none;
  overflow-y: auto;
}

.history-panel.open {
  right: 0;
}

.character-dropdown {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: none !important;
  box-shadow: 0 4px 10px var(--shadow-color);
}

.character-dropdown div {
  color: var(--text-primary);
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.character-dropdown div:hover {
  background-color: var(--hover-bg);
  color: var(--color-blue);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--input-bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-yellow);
}

/* Changelog styles */
.changelog-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s ease;
  box-shadow: 2px 0 8px var(--shadow-color);
  border: none;
  border-left: none;
}

.changelog-tab:hover {
  background: var(--color-yellow);
  color: var(--bg-primary);
  transform: translateY(-50%) translateX(2px);
}

.changelog-tab:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.changelog-tab i {
  font-size: 20px;
}

.changelog-panel {
  position: fixed;
  top: 0;
  left: -350px;
  width: 350px;
  height: 100vh;
  background: var(--bg-primary);
  box-shadow: 2px 0 20px var(--shadow-color);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: block !important;
  border-right: none;
  overflow-y: auto;
}

.changelog-panel.open {
  left: 0;
}

.changelog-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.changelog-header h3 {
  margin: 0;
  margin-right: 10px;
  font-size: 16px;
  font-weight: 500;
}

.changelog-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.changelog-item {
  padding: 15px;
  margin-bottom: 15px;
  border: 2px solid var(--color-yellow);
  border-radius: 8px;
  background: var(--bg-secondary);
  transition: all 0.2s ease;
}

.changelog-item:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--color-blue);
  transform: translateX(3px);
}

.changelog-date {
  color: var(--color-blue);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.changelog-content {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
}

.changelog-content ul {
  margin: 0;
  padding-left: 20px;
}

.changelog-content li {
  margin-bottom: 5px;
}

.changelog-content li:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .changelog-panel {
    width: 300px;
    left: -300px;
  }

  .changelog-tab {
    width: 35px;
    height: 70px;
  }

  .changelog-tab:hover {
    width: 40px;
  }

  .changelog-header h3 {
    font-size: 15px;
  }

  .changelog-date {
    font-size: 13px;
  }

  .changelog-content {
    font-size: 12px;
  }
}

/* Foundation CSS overrides — remove all focus borders/outlines */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
  border: none !important;
  box-shadow: none !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
