.tool-title-row.regex-title-center {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 8px;
}

.regex-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.regex-title {
  margin: 0;
  text-align: center;
  font-size: 1.6em;
  font-weight: 600;
  letter-spacing: 0.01em;
}

@media (max-width: 600px) {
  .tool-title-row.regex-title-center {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .regex-title {
    font-size: 1.6em;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .regex-title-wrap {
    gap: 10px;
  }
}

/* Modern Design System */
:root {
  --bg-app: #0a0b10;
  --bg-sidebar: #11131c;
  --bg-card: #161922;
  --bg-input: #1f222e;

  --accent: #00ffd5;
  --accent-glow: rgba(0, 255, 213, 0.4);
  --accent-gradient: linear-gradient(135deg, #00ffd5 0%, #00b3ff 100%);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 255, 213, 0.3);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-main);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.logo:hover {
  opacity: 0.8;
}

.logo-emoji {
  font-size: 28px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 20px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-toggle:hover {
  background: var(--accent);
  color: #000;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.side-nav {
  flex: 1;
  padding: 0 16px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-btn.active {
  background: rgba(0, 255, 213, 0.08);
  color: var(--accent);
}

.btn-icon {
  font-size: 18px;
  opacity: 0.8;
}

.badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.ai-badge {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.3);
  animation: badge-jump 2s ease-in-out infinite;
}

.new-badge {
  background: rgba(0, 255, 213, 0.15);
  color: var(--accent);
  border: 1px solid rgba(0, 255, 213, 0.3);
  animation: badge-jump 2s ease-in-out infinite 0.3s;
}

/* Badge jumping animation */
@keyframes badge-jump {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  10% {
    transform: translateY(-4px) scale(1.05);
  }

  20% {
    transform: translateY(0) scale(1);
  }

  30% {
    transform: translateY(-2px) scale(1.02);
  }

  40% {
    transform: translateY(0) scale(1);
  }
}

/* Add glow effect on hover */
.ai-badge:hover {
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  transform: scale(1.1);
}

.new-badge:hover {
  box-shadow: 0 0 12px rgba(0, 255, 213, 0.5);
  transform: scale(1.1);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.footer-link {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent);
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.top-bar {
  height: 64px;
  padding: 0 32px;
  background: rgba(10, 11, 16, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

.breadcrumb {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.breadcrumb:hover {
  color: var(--text-main);
}

.icon-link {
  color: var(--text-muted);
  transition: var(--transition);
}

.icon-link:hover {
  color: var(--text-main);
}

.content-area {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Tool Styling */
#tool-container>div,
#tool-container>section {
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}

/* Compact Tool Layout for Utility Tools */
.compact-tool {
  max-width: 600px !important;
  margin: 0 auto;
}

.tool-card-ui {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}

.tool-card-ui h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}


/* Tooltip for inline help */

.tooltip .tooltiptext {
  visibility: hidden;
  width: 260px;
  background: var(--bg-card);
  color: var(--text-main);
  text-align: left;
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 8px;
  position: absolute;
  z-index: 50;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.12s ease-in-out, transform 0.12s ease-in-out;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  font-size: 0.9em;
}

.tooltip .tooltiptext code {
  background: transparent;
  color: inherit;
  font-family: monospace;
  padding: 0
}

.tooltip:hover .tooltiptext,
.tooltip:focus-within .tooltiptext {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

/* Help popover for regex tool (themed) */
.help-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.95em;
  line-height: 1;
  cursor: pointer;
}

.help-btn:focus {
  outline: 2px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.03)
}

.regex-help-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(14, 30, 37, 0.08);
  z-index: 120;
}

@media (max-width: 600px) {
  .regex-help-popover {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: 0 -4px 32px rgba(14, 30, 37, 0.13);
    padding: 18px 10px 18px 10px;
    min-height: 180px;
    position: fixed !important;
    z-index: 9999;
    animation: popslideup 0.22s cubic-bezier(.4, 1.4, .6, 1) 1;
  }
}

@keyframes popslideup {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.regex-help-popover .popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.regex-help-popover .close-popover {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted)
}

.regex-help-popover .popover-body {
  margin-top: 8px
}

.help-sample {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  border: 1px dashed var(--border);
  margin-bottom: 8px
}

.help-sample .sample-pattern {
  font-family: monospace;
  background: transparent;
  padding: 2px 6px;
  border-radius: 4px
}

.help-sample .sample-desc {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.95em
}

.btn-sm {
  background: var(--accent);
  color: #00211a;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer
}

.btn-sm:hover {
  opacity: 0.95
}


h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-main);
}

/* Form Elements */
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

input,
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  margin-bottom: 20px;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-focus);
}

button {
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.tool-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .tool-button-group {
    flex-direction: column;
    gap: 10px;
  }

  .tool-button-group button {
    width: 100%;
    padding: 14px 20px;
    /* Better touch targets */
  }
}

/* Output Containers */
.output-container {
  position: relative;
  margin-top: 24px;
}

pre,
ul#uuid-list,
div#lorem-output,
#summary-output {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
  min-height: 60px;
  color: #e2e8f0;
  box-sizing: border-box;
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}

.copy-button:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Dashboard Home */
.dashboard-home {
  text-align: left;
}

.dashboard-header {
  margin-bottom: 40px;
}

.dashboard-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-rocket {
  display: inline-block;
  font-size: 1.2em;
  animation: rocket-float 3s ease-in-out infinite;
}

@keyframes rocket-float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.dashboard-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

@media (max-width: 600px) {
  .dashboard-header {
    margin-bottom: 24px;
  }

  .dashboard-header h1 {
    font-size: 1.8rem;
    flex-wrap: wrap;
  }
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.02);
}

.tool-card .icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.tool-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Toast Styling */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 10px;
  color: var(--text-main);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: -280px;
    height: 100%;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-close {
    display: block;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
  }

  .top-bar {
    padding: 0 16px;
  }

  .content-area {
    padding: 24px 16px;
  }

  /* Add an overlay when sidebar is open */
  body.sidebar-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 90;
    animation: fadeIn 0.2s ease-out;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.mobile-close {
  display: none;
}

/* Feedback Popup Modal */
.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.feedback-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
  animation: fadeIn 0.3s ease-out;
}

.feedback-modal {
  background: linear-gradient(135deg, rgba(22, 25, 34, 0.98) 0%, rgba(17, 19, 28, 0.98) 100%);
  border: 1px solid rgba(0, 255, 213, 0.2);
  border-radius: 24px;
  padding: 40px;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 40px rgba(0, 255, 213, 0.15);
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.feedback-header {
  text-align: center;
  margin-bottom: 32px;
}

.feedback-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.feedback-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 12px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feedback-header p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.feedback-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.feedback-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.feedback-btn:hover {
  background: rgba(0, 255, 213, 0.08);
  border-color: var(--accent);
  transform: translateX(4px);
}

.feedback-btn-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.feedback-btn-content {
  flex: 1;
}

.feedback-btn-title {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.feedback-btn-desc {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
}

.feedback-dismiss {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.feedback-dismiss:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

/* Snackbar for "Maybe Later" message */
.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 14px 24px;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.snackbar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.snackbar-icon {
  font-size: 18px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .feedback-modal {
    padding: 32px 24px;
    max-width: 100%;
    margin: 0 16px;
  }

  .feedback-header h2 {
    font-size: 1.5rem;
  }

  .feedback-icon {
    font-size: 48px;
  }

  .feedback-btn {
    padding: 14px 20px;
  }

  .feedback-btn-icon {
    font-size: 20px;
  }
}

/* High-end Polish */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.app-footer {
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
}

.footer-legal {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.footer-legal a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--accent);
}

/* Legacy Compatibility & Specific Tool Fixes */
.hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: -10px;
  margin-bottom: 20px;
}

.progress-track {
  height: 8px;
  background: var(--bg-input);
  border-radius: 10px;
  margin-top: 10px;
}

.progress-fill {
  background: var(--accent-gradient);
  height: 100%;
  border-radius: 10px;
  box-shadow: 0 0 10px var(--accent-glow);
}

.tool-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .tool-grid-2 {
    grid-template-columns: 1fr;
  }

  .tool-card-ui {
    padding: 20px;
  }
}

/* Editor with Line Numbers */
.editor-wrapper {
  position: relative;
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.editor-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.line-numbers {
  width: 40px;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--border);
  color: var(--text-dim);
  text-align: right;
  padding-right: 8px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  user-select: none;
  pointer-events: none;
  line-height: 22.5px;
  /* Match textarea line-height */
}

.editor-wrapper textarea {
  flex: 1;
  background: transparent;
  border: none;
  margin-bottom: 0;
  border-radius: 0;
  resize: none;
  line-height: 22.5px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  padding: 12px;
  white-space: pre;
  overflow-x: auto;
}

.editor-wrapper textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

/* Diff Styling */
.diff-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  margin-right: 8px;
}

.tag-added {
  background: rgba(0, 255, 213, 0.15);
  color: var(--accent);
}

.tag-removed {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.tag-changed {
  background: rgba(0, 179, 255, 0.15);
  color: #00b3ff;
}

.diff-line-info {
  color: var(--text-dim);
  font-size: 12px;
  margin-left: 8px;
}

/* Live Tool Grid - UTF8 Smart Codec */
.live-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.result-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.result-box:hover {
  border-color: var(--accent);
}

.result-box label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.result-box.full-width {
  grid-column: 1 / -1;
}

.output-wrapper,
.output-wrapperHighlight {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.output-small {
  background: var(--bg-input);
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  width: 100%;
  overflow-x: auto;
  min-height: 44px;
  font-family: monospace;
  border: 1px solid transparent;
}

.output-large {
  background: rgba(0, 255, 213, 0.03);
  border: 1px dashed rgba(0, 255, 213, 0.3);
  padding: 16px;
  border-radius: 8px;
  font-size: 1.2rem;
  width: 100%;
  color: var(--accent);
  min-height: 56px;
  word-break: break-all;
}

.copy-small {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-small:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}