/* UtilityBro - Main Stylesheet */
/* Estilos compartidos por todas las herramientas */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #0f766e;
  --accent-color: #f59e0b;
  --success-color: #4ecdc4;
  --error-color: #ff6b6b;
  --warning-color: #ffd93d;
  --light-bg: #f8f9fa;
  --text-color: #182230;
  --text-light: #5d6675;
  --border-color: #d9e0ea;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.16);
}

[data-theme="dark"] {
  --primary-color: #60a5fa;
  --secondary-color: #2dd4bf;
  --accent-color: #fbbf24;
  --light-bg: #111827;
  --text-color: #e5edf7;
  --text-light: #a7b3c4;
  --border-color: #26364a;
  --surface: #101827;
  --surface-soft: #0b1220;
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.26);
  --shadow-strong: 0 28px 80px rgba(0, 0, 0, 0.42);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(15, 118, 110, 0.12), transparent 28%),
    #f6f8fb;
  min-height: 100vh;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 0%, rgba(96, 165, 250, 0.18), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(45, 212, 191, 0.14), transparent 30%),
    #070b13;
}

/* ==================================================
   CONTENEDOR Y LAYOUT
   ================================================== */

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  padding: 40px 0;
  min-height: calc(100vh - 300px);
}

/* ==================================================
   TIPOGRAFÍA
   ================================================== */

h1 {
  font-size: 2.5em;
  color: var(--primary-color);
  margin: 30px 0 15px 0;
  line-height: 1.2;
}

h2 {
  font-size: 1.8em;
  color: var(--primary-color);
  margin: 30px 0 15px 0;
  line-height: 1.2;
}

h3 {
  font-size: 1.3em;
  color: var(--secondary-color);
  margin: 25px 0 12px 0;
  line-height: 1.2;
}

h4 {
  font-size: 1.1em;
  color: var(--text-color);
  margin: 20px 0 10px 0;
}

p {
  margin-bottom: 15px;
  line-height: 1.8;
  color: var(--text-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ==================================================
   LISTAS
   ================================================== */

ul, ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

li {
  margin-bottom: 8px;
  line-height: 1.8;
}

/* ==================================================
   TABLAS
   ================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

thead {
  background: var(--primary-color);
  color: white;
}

th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  border: none;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background: var(--light-bg);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ==================================================
   FORMULARIOS Y INPUTS
   ================================================== */

input, textarea, select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  margin-bottom: 15px;
  background: var(--surface);
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.55;
}

/* ==================================================
   BOTONES
   ================================================== */

button {
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
  background: var(--primary-color);
  color: white;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: var(--light-bg);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-small {
  padding: 8px 15px;
  font-size: 0.9em;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================================================
   BREADCRUMBS
   ================================================== */

.breadcrumbs {
  font-size: 0.9em;
  color: var(--text-light);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumbs a {
  color: var(--primary-color);
}

/* ==================================================
   CAJAS Y CONTENEDORES
   ================================================== */

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  border-left: 4px solid;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-left-color: #28a745;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border-left-color: #f5c6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border-left-color: #ffc107;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border-left-color: #17a2b8;
}

/* ==================================================
   GRID DE HERRAMIENTAS
   ================================================== */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.tool-card {
  background: var(--surface);
  border-radius: 8px;
  padding: 25px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-color);
  display: block;
  border: 1px solid rgba(217, 224, 234, 0.9);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--primary-color);
}

.tool-card h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.tool-card p {
  font-size: 0.95em;
  color: var(--text-light);
  margin: 0;
}

/* ==================================================
   SECCIONES
   ================================================== */

section {
  margin: 40px 0;
}

section.faq {
  background: var(--light-bg);
  padding: 30px;
  border-radius: 12px;
}

.faq-item {
  background: white;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.faq-item h3 {
  margin-top: 0;
}

/* ==================================================
   NOTIFICACIONES
   ================================================== */

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
  z-index: 1000;
  max-width: 300px;
}

.notification.error {
  background: var(--error-color);
}

.notification.warning {
  background: var(--warning-color);
  color: #333;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==================================================
   RESPONSIVE DESIGN
   ================================================== */

@media (max-width: 768px) {
  h1 {
    font-size: 1.8em;
  }

  h2 {
    font-size: 1.4em;
  }

  h3 {
    font-size: 1.1em;
  }

  .container {
    padding: 0 15px;
  }

  main {
    padding: 20px 0;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .tool-card {
    padding: 15px;
  }

  .tool-card h3 {
    font-size: 1em;
    margin-bottom: 5px;
  }

  .tool-card p {
    font-size: 0.85em;
  }

  table {
    font-size: 0.9em;
  }

  th, td {
    padding: 8px 10px;
  }

  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .ux-home-stats {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.5em;
  }

  h2 {
    font-size: 1.2em;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  input, textarea, select, button {
    font-size: 16px; /* Evita zoom en iOS */
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

/* ==================================================
   UTILIDADES
   ================================================== */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-light);
}

.text-success {
  color: #28a745;
}

.text-error {
  color: var(--error-color);
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.p-10 {
  padding: 10px;
}

.p-20 {
  padding: 20px;
}

.rounded {
  border-radius: 6px;
}

.shadow {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.shadow-lg {
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ==================================================
   IMPRESIÓN
   ================================================== */

@media print {
  body {
    background: white;
  }

  header, footer, .breadcrumbs, .notification {
    display: none;
  }

  main {
    padding: 0;
  }

  .card, .tool-card {
    box-shadow: none;
    border: 1px solid var(--border-color);
  }
}

/* ==================================================
   HEADER STYLES
   ================================================== */
.site-header {
  background: rgba(10, 24, 40, 0.9);
  backdrop-filter: blur(18px);
  color: white;
  padding: 0.85rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  font-size: 1.8rem;
}

.logo-text {
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  text-decoration: none;
}

/* ==================================================
   LANGUAGE SELECTOR
   ================================================== */
.language-selector {
  position: relative;
  margin-left: 1rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  padding: 0.7rem 1.3rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  min-width: 80px;
  justify-content: center;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.lang-current {
  font-weight: 900;
  font-size: 1.1rem;
}

.lang-chevron {
  font-size: 0.8rem;
  margin-left: 0.3rem;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  min-width: 170px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 3000;
}

.lang-toggle.active~.lang-dropdown,
.language-selector.is-open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background: #667eea;
  color: white;
}

.flag {
  font-size: 1.4rem;
}

.lang-name {
  font-size: 1rem;
  font-weight: 600;
}

/* ==================================================
   FOOTER STYLES
   ================================================== */
.site-footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e0e0e0;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  border-top: 3px solid #667eea;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #b0b0b0;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: #a0a0ff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: #667eea;
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid #333;
}

.footer-copy p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: #808080;
}

/* ==================================================
   PAGE SPECIFIC STYLES (Hero, Features, CTA)
   ================================================== */
.hero-section {
  padding: 3rem 2rem;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 62%, rgba(255, 248, 235, 0.96) 100%);
  border-radius: 8px;
  border: 1px solid rgba(217, 224, 234, 0.9);
  box-shadow: var(--shadow-soft);
}

[data-theme="dark"] .hero-section {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(16, 24, 39, 0.98) 55%, rgba(19, 78, 74, 0.42));
}

[data-theme="dark"] .ux-tool-hero {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(16, 24, 39, 0.96) 58%, rgba(19, 78, 74, 0.42));
  border-color: #26364a;
}

[data-theme="dark"] .ux-tool-hero h1 {
  color: #93c5fd;
}

[data-theme="dark"] .ux-tool-hero p:not(.eyebrow),
[data-theme="dark"] .ux-hero-metrics span {
  color: #dbe7f5;
}

[data-theme="dark"] .ux-hero-metrics span {
  background: rgba(15, 23, 42, 0.72);
  border-color: #334155;
}

[data-theme="dark"] .ux-tool-bar {
  background: rgba(16, 24, 39, 0.92);
}

[data-theme="dark"] .ux-home-command,
[data-theme="dark"] .ux-next-action {
  background: rgba(16, 24, 39, 0.94);
  border-color: #26364a;
}

[data-theme="dark"] .ux-home-stats span,
[data-theme="dark"] .ux-home-workflow-card,
[data-theme="dark"] .ux-category-playbook,
[data-theme="dark"] .ux-category-steps a {
  background: #0b1220;
  border-color: #26364a;
}

[data-theme="dark"] .ux-category-searches span {
  background: rgba(20, 83, 45, 0.42);
  border-color: #166534;
  color: #86efac;
}

[data-theme="dark"] .guide-command,
[data-theme="dark"] .guide-card {
  background: #0b1220;
  border-color: #26364a;
}

[data-theme="dark"] .guide-stats span,
[data-theme="dark"] .guide-search input {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .ux-next-action h2 {
  color: #5eead4;
}

[data-theme="dark"] .stats {
  background: #0b1220;
  border-color: #334155;
}

.eyebrow {
  color: var(--secondary-color);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.btn,
.hero-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.1rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover,
.hero-actions .btn:hover {
  background: #1d4ed8;
  color: white;
  text-decoration: none;
}

.btn-outline {
  background: white;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.trust-strip span {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
}

.search-intent-section,
.topic-clusters,
.tool-directory {
  background: var(--surface);
  border: 1px solid #e8edf3;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.intent-grid,
.cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.intent-grid a {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  font-weight: 700;
  padding: 0.9rem 1rem;
}

.intent-grid a:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  text-decoration: none;
}

.cluster-grid article {
  border-left: 4px solid var(--secondary-color);
  padding-left: 1rem;
}

.cluster-grid h3 {
  margin-top: 0;
}

.ad-slot {
  align-items: center;
  background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #eef2f7 10px, #eef2f7 20px);
  border: 1px dashed #b7c3d0;
  border-radius: 8px;
  color: #697586;
  display: flex;
  justify-content: center;
  min-height: 96px;
  margin: 2rem 0;
  text-align: center;
}

.ad-slot span {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  text-transform: uppercase;
}

.ad-slot-mid {
  min-height: 112px;
}

.ad-unit {
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 100%);
  border: 1px dashed #aebccd;
  border-radius: 8px;
  color: #5d6675;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
  margin: 2rem 0;
  min-height: 120px;
  padding: 1rem;
  text-align: center;
}

.ad-unit span {
  background: white;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  text-transform: uppercase;
}

.ad-unit small {
  color: #697586;
  font-size: 0.82rem;
}

.ad-unit-empty {
  display: none;
}

.monetization-panel {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  margin: 2rem 0;
  padding: 1.5rem;
}

.panel-heading h2,
.monetization-panel h2 {
  margin-top: 0;
}

.related-tools-grid,
.workflow-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 1rem;
}

.related-tool-card {
  background: #f8fafc;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  color: var(--text-color);
  display: grid;
  gap: 0.3rem;
  min-height: 122px;
  padding: 1rem;
  text-decoration: none;
}

.related-tool-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
  color: var(--primary-color);
  text-decoration: none;
}

.related-tool-card strong {
  color: var(--secondary-color);
  font-size: 0.95rem;
}

.related-tool-card span {
  font-weight: 800;
}

.related-tool-card small {
  color: var(--text-light);
  line-height: 1.45;
}

[data-theme="dark"] .related-tool-card {
  background: #0b1220;
  border-color: #26364a;
}

[data-theme="dark"] .related-tool-card strong {
  color: #dbeafe;
}

[data-theme="dark"] .related-tool-card span {
  color: #7dd3fc;
}

.workflow-card {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.workflow-card strong {
  color: var(--text-color);
  font-size: 1rem;
}

.workflow-card small {
  color: var(--text-light);
  line-height: 1.45;
}

.workflow-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.workflow-card a {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--primary-color);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
}

.workflow-card a:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

.hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.hub-links a {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  color: #1d4ed8;
  font-weight: 800;
  padding: 0.75rem 0.95rem;
}

.hub-links a:hover {
  background: #dbeafe;
  text-decoration: none;
}

.trust-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

.trust-grid article {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}

.trust-grid strong {
  color: var(--secondary-color);
  display: block;
  margin-bottom: 0.35rem;
}

.trust-grid p {
  color: var(--text-light);
  margin: 0;
}

/* ==================================================
   EPIC UX LAYER
   ================================================== */

.ux-tool-enhanced main > .container {
  max-width: 1180px;
}

.ux-home-command {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
  display: grid;
  gap: 1rem;
  margin: -1rem 0 2rem;
  padding: 1rem;
  position: relative;
  z-index: 2;
}

.ux-home-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ux-home-stats span {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: var(--text-light);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.75rem 0.85rem;
}

.ux-home-stats strong {
  color: var(--primary-color);
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  margin-bottom: 0.18rem;
}

.ux-home-search label {
  color: var(--secondary-color);
  display: block;
  font-size: 0.85rem;
  font-weight: 850;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.ux-home-search div {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: auto 1fr;
  padding: 0.25rem 0.85rem;
}

.ux-home-search span {
  color: var(--text-light);
  font-size: 1.2rem;
}

.ux-home-search input {
  background: transparent !important;
  border: 0;
  box-shadow: none;
  margin: 0;
}

.ux-home-search input:focus {
  box-shadow: none;
}

.ux-home-results {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.ux-home-result-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  display: grid;
  gap: 0.35rem;
  min-height: 118px;
  padding: 0.95rem;
  text-decoration: none;
}

.ux-home-result-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
  text-decoration: none;
  transform: translateY(-1px);
}

.ux-home-result-card small {
  color: var(--text-light);
  line-height: 1.35;
}

.ux-home-result-card span {
  color: var(--primary-color);
  font-size: 0.82rem;
  font-weight: 850;
  margin-top: auto;
}

.ux-home-fast {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ux-home-fast a {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 850;
  padding: 0.45rem 0.75rem;
}

.ux-home-fast a:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

.ux-home-workflows {
  border-top: 1px solid var(--border-color);
  padding-top: 0.35rem;
}

.ux-home-workflows .panel-heading h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.ux-home-workflow-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.ux-home-workflow-card {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.ux-home-workflow-card strong {
  color: var(--text-color);
}

.ux-home-workflow-card small {
  color: var(--text-light);
  line-height: 1.45;
}

.ux-home-workflow-card div {
  display: grid;
  gap: 0.45rem;
}

.ux-home-workflow-card a {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--primary-color);
  display: grid;
  font-size: 0.9rem;
  font-weight: 850;
  gap: 0.45rem;
  grid-template-columns: auto 1fr;
  padding: 0.5rem 0.6rem;
}

.ux-home-workflow-card a:hover {
  border-color: var(--primary-color);
  text-decoration: none;
}

.ux-home-workflow-card b {
  align-items: center;
  background: #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.ux-home-guides {
  align-items: center;
  background: #0f172a;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.85rem;
}

.ux-home-guides strong {
  color: white;
  margin-right: 0.3rem;
}

.ux-home-guides a {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: white;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.42rem 0.68rem;
}

.ux-home-guides a:hover {
  background: white;
  color: #0f172a;
  text-decoration: none;
}

.ux-category-playbook {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
}

.ux-category-copy {
  max-width: 820px;
}

.ux-category-copy h2 {
  color: var(--primary-color);
  font-size: 1.45rem;
  margin-bottom: 0.4rem;
}

.ux-category-copy p:not(.eyebrow) {
  color: var(--text-light);
  line-height: 1.65;
}

.ux-category-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ux-category-searches span {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  color: #047857;
  font-size: 0.83rem;
  font-weight: 800;
  padding: 0.42rem 0.68rem;
}

.ux-category-steps {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ux-category-steps a {
  align-items: flex-start;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  display: grid;
  gap: 0.25rem;
  grid-template-columns: auto 1fr;
  padding: 0.85rem;
  text-decoration: none;
}

.ux-category-steps a:hover {
  border-color: var(--primary-color);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.ux-category-steps b {
  align-items: center;
  background: #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.8rem;
  height: 1.55rem;
  justify-content: center;
  margin-top: 0.1rem;
  width: 1.55rem;
}

.ux-category-steps span {
  color: var(--text-color);
  font-weight: 900;
}

.ux-category-steps small {
  color: var(--text-light);
  grid-column: 2;
  line-height: 1.4;
}

.guide-library {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.guide-command {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.guide-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-stats span {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: var(--text-light);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.75rem 0.85rem;
}

.guide-stats strong {
  color: var(--primary-color);
  display: block;
  font-size: 1.45rem;
  line-height: 1;
}

.guide-search {
  display: grid;
  gap: 0.45rem;
}

.guide-search label {
  color: var(--secondary-color);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-search input {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 1rem;
  padding: 0.9rem 1rem;
  width: 100%;
}

.guide-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.guide-filters button {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  cursor: pointer;
  font-weight: 900;
  padding: 0.55rem 0.85rem;
}

.guide-filters button[aria-pressed="true"],
.guide-filters button:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.guide-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  color: var(--text-color);
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem;
  text-decoration: none;
}

.guide-card[hidden],
.guide-empty[hidden] {
  display: none;
}

.guide-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.13);
  text-decoration: none;
  transform: translateY(-2px);
}

.guide-card h2 {
  color: var(--text-color);
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 0;
}

.guide-card p {
  color: var(--text-light);
  line-height: 1.55;
  margin: 0;
}

.guide-card span {
  color: var(--primary-color);
  font-weight: 900;
}

.guide-topic {
  color: var(--secondary-color);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-empty {
  background: var(--surface-soft);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-light);
  font-weight: 800;
  padding: 1rem;
  text-align: center;
}

.ux-tool-hero {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.94) 58%, rgba(240, 253, 250, 0.9));
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 310px);
  margin: 1rem 0 1rem;
  overflow: hidden;
  padding: 1.5rem;
  position: relative;
}

.ux-tool-hero::before {
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 5px;
}

.ux-hero-copy {
  min-width: 0;
  padding-left: 0.35rem;
}

.ux-tool-hero h1 {
  color: #1d4ed8;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: 0;
  margin: 0 0 0.85rem;
  max-width: 860px;
}

.ux-tool-hero p:not(.eyebrow) {
  color: #334155;
  font-size: 1.04rem;
  line-height: 1.72;
  margin: 0;
  max-width: 850px;
}

.ux-hero-metrics {
  align-content: center;
  display: grid;
  gap: 0.65rem;
}

.ux-hero-metrics span {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 850;
  min-height: 44px;
  padding: 0.72rem 0.85rem;
}

.ux-activation-panel {
  align-items: center;
  background: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.25);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  color: white;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin: 1rem 0;
  padding: 1rem;
}

.ux-activation-panel strong,
.ux-activation-panel span {
  display: block;
}

.ux-activation-panel strong {
  color: white;
  font-size: 1rem;
}

.ux-activation-panel span {
  color: #cbd5e1;
  font-size: 0.92rem;
  margin-top: 0.15rem;
}

.ux-activation-panel ol {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
}

.ux-activation-panel li {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: white;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
  margin: 0;
  padding: 0.55rem 0.7rem;
}

.ux-activation-panel button {
  background: #f59e0b;
  color: #111827;
  min-height: 42px;
  white-space: nowrap;
}

.ux-activation-panel button:hover {
  background: #fbbf24;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.ux-next-action {
  align-items: center;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 1rem 0 1.5rem;
  padding: 1rem;
}

.ux-next-action h2 {
  color: #0f766e;
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.ux-next-action p {
  margin: 0;
}

.ux-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.ux-next-actions button,
.ux-next-actions a {
  align-items: center;
  background: white;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 850;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
}

.ux-next-actions button:first-child {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.ux-next-actions a:hover,
.ux-next-actions button:hover {
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
  text-decoration: none;
}

.ux-shell-controls {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  margin-left: 0.4rem;
}

.ux-icon-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  min-width: 40px;
  padding: 0;
}

.ux-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ux-launcher {
  align-items: flex-start;
  background: rgba(7, 12, 22, 0.62);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 8vh 1rem 1rem;
  position: fixed;
  z-index: 5000;
}

.ux-launcher.is-open {
  display: flex;
}

.ux-launcher-panel {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
  max-width: 760px;
  overflow: hidden;
  width: 100%;
}

.ux-launcher-search {
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: auto 1fr auto;
  padding: 1rem;
}

.ux-launcher-search span {
  color: var(--text-light);
  font-size: 1.25rem;
}

.ux-launcher-search input {
  border: 0;
  box-shadow: none;
  font-size: 1.05rem;
  margin: 0;
  padding: 0.6rem 0;
}

.ux-launcher-search input:focus {
  box-shadow: none;
}

.ux-launcher-search button {
  background: var(--surface-soft);
  color: var(--text-color);
  height: 36px;
  min-width: 36px;
  padding: 0;
}

.ux-launcher-meta {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.8rem 1rem 0;
}

.ux-launcher-results {
  display: grid;
  gap: 0.5rem;
  max-height: 55vh;
  overflow: auto;
  padding: 1rem;
}

.ux-launcher-item {
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-color);
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
}

.ux-launcher-item:hover {
  border-color: var(--primary-color);
  text-decoration: none;
}

.ux-launcher-item span {
  color: var(--text-light);
  font-size: 0.86rem;
}

.ux-tool-bar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0;
  padding: 0.7rem;
  position: sticky;
  top: 72px;
  z-index: 800;
}

.ux-tool-bar button {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.9rem;
  min-height: 38px;
  padding: 0.55rem 0.75rem;
}

.ux-tool-bar button:hover,
.ux-tool-bar button.is-active {
  background: var(--primary-color);
  color: white;
}

.ux-tool-bar [data-ux-sample] {
  background: #fef3c7;
  border-color: #facc15;
  color: #713f12;
}

.ux-tool-bar [data-ux-sample]:hover {
  background: #f59e0b;
  color: #111827;
}

.ux-trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: -0.35rem 0 1.25rem;
}

.ux-trust-chips span {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 82%, var(--primary-color) 18%);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-color);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 800;
  min-height: 34px;
  padding: 0.45rem 0.75rem;
}

.ux-toast {
  background: #101827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  bottom: 1rem;
  box-shadow: var(--shadow-strong);
  color: white;
  opacity: 0;
  padding: 0.85rem 1rem;
  position: fixed;
  right: 1rem;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 6000;
}

.ux-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tool-interface {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  padding: 1rem;
}

.tool-interface.ux-dual-editor {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tool-interface.ux-dual-editor h2,
.tool-interface.ux-dual-editor h3 {
  margin: 0;
}

.tool-interface.ux-dual-editor h2:nth-of-type(1),
.tool-interface.ux-dual-editor h3:nth-of-type(1) {
  grid-column: 1;
}

.tool-interface.ux-dual-editor h2:nth-of-type(2),
.tool-interface.ux-dual-editor h3:nth-of-type(2) {
  grid-column: 2;
}

.tool-interface.ux-dual-editor textarea:nth-of-type(1) {
  grid-column: 1;
}

.tool-interface.ux-dual-editor textarea:nth-of-type(2) {
  grid-column: 2;
}

.tool-interface.ux-dual-editor textarea {
  margin: 0;
  min-height: 340px;
}

.tool-interface.ux-dual-editor .stats,
.tool-interface.ux-dual-editor .button-group,
.tool-interface.ux-dual-editor .controls {
  grid-column: 1 / -1;
}

.ux-field-kicker {
  align-items: center;
  color: var(--text-color);
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 850;
  min-height: 32px;
}

.ux-field-kicker::before {
  background: var(--secondary-color);
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 8px;
  margin-right: 0.5rem;
  width: 8px;
}

.button-group,
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.button-group button,
.controls button {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #1e3a8a;
  min-height: 42px;
}

.button-group button:hover,
.controls button:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.button-group .ux-primary-action,
.controls .ux-primary-action {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.2);
}

.button-group .ux-primary-action:hover,
.controls .ux-primary-action:hover {
  background: #1d4ed8;
  color: white;
}

.stats {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: var(--text-color);
  margin: 1rem 0;
  padding: 0.85rem;
}

.ux-focus-mode .site-header,
.ux-focus-mode .breadcrumbs,
.ux-focus-mode .site-footer,
.ux-focus-mode .ad-unit,
.ux-focus-mode .related-tools-panel,
.ux-focus-mode .ux-workflow-panel,
.ux-focus-mode .hub-strip {
  display: none;
}

.ux-focus-mode main {
  padding-top: 1rem;
}

.ux-focus-mode .container {
  max-width: 1180px;
}

/* ==================================================
   CONTRAST SAFETY OVERRIDES
   ================================================== */

main,
main .container,
section,
article,
.tool-interface,
.tool-section,
.generator-section,
.converter-section,
.current-time-box,
.controls,
.converter-box,
.generator-card,
.input-section,
.output-section,
.result-box,
.monetization-panel,
.topic-clusters,
.tool-directory,
.search-intent-section,
.feature,
.card,
.faq-item {
  color: var(--text-color);
}

.tool-interface,
.tool-section,
.generator-section,
.converter-section,
.current-time-box,
.controls,
.converter-box,
.generator-card,
.input-section,
.output-section,
.monetization-panel,
.topic-clusters,
.tool-directory,
.search-intent-section,
.feature,
.card,
.faq-item {
  background: var(--surface) !important;
  border-color: var(--border-color) !important;
}

.result-area,
textarea,
input,
select,
.result-box,
pre,
code {
  background: var(--surface-soft) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

textarea::placeholder,
input::placeholder {
  color: var(--text-light) !important;
  opacity: 1;
}

main p,
main li,
main label,
main span,
.tool-interface p,
.tool-interface li,
.tool-section p,
.tool-section li,
.generator-section,
.generator-section p,
.generator-section li,
.generator-section label,
.generator-section span,
.controls,
.controls label,
.controls span,
.editor-label,
.label,
.converter-section,
.converter-section p,
.converter-section label,
.current-time-box,
.current-time-box p,
.converter-box p,
.generator-card p,
.result-box,
.stats,
.text-muted {
  color: var(--text-color);
}

main small,
.related-tool-card small,
.trust-grid p {
  color: var(--text-light);
}

.btn-secondary,
button.secondary,
.btn-copy,
button.btn-copy,
.copy-btn,
button.copy-btn {
  background: var(--surface-soft) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-color) !important;
}

.btn-secondary:hover,
button.secondary:hover,
.btn-copy:hover,
button.btn-copy:hover,
.copy-btn:hover,
button.copy-btn:hover {
  background: var(--primary-color) !important;
  color: #ffffff !important;
}

.generator-header,
.tool-header,
.converter-header {
  border-color: var(--border-color) !important;
}

.compact-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.generator-stats {
  display: flex;
  align-items: center;
  min-height: 2rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-light);
  font-size: 0.92rem;
  font-weight: 700;
}

.generator-section h2,
.generator-section h3,
.tool-section h2,
.tool-section h3,
.converter-box h2,
.converter-box h3,
.generator-card h2,
.generator-card h3 {
  color: var(--primary-color) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2 {
  color: #7db7ff;
}

[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #64e5d7;
}

[data-theme="dark"] .breadcrumbs {
  color: #c7d2e2;
}

[data-theme="dark"] .breadcrumbs a,
[data-theme="dark"] main a {
  color: #8fc5ff;
}

@media (max-width: 768px) {
  .ux-tool-bar {
    position: static;
  }

  .ux-tool-hero {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .ux-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ux-hero-metrics span {
    font-size: 0.8rem;
    min-height: 38px;
    padding: 0.55rem;
    text-align: center;
  }

  .ux-activation-panel {
    grid-template-columns: 1fr;
  }

  .ux-activation-panel ol {
    flex-wrap: wrap;
  }

  .ux-next-action {
    grid-template-columns: 1fr;
  }

  .ux-next-actions {
    justify-content: flex-start;
  }

  .tool-interface.ux-dual-editor {
    grid-template-columns: 1fr;
  }

  .tool-interface.ux-dual-editor h2:nth-of-type(1),
  .tool-interface.ux-dual-editor h2:nth-of-type(2),
  .tool-interface.ux-dual-editor h3:nth-of-type(1),
  .tool-interface.ux-dual-editor h3:nth-of-type(2),
  .tool-interface.ux-dual-editor textarea:nth-of-type(1),
  .tool-interface.ux-dual-editor textarea:nth-of-type(2) {
    grid-column: 1;
  }

  .tool-interface.ux-dual-editor textarea {
    min-height: 230px;
  }

  .ux-shell-controls {
    margin-left: 0;
  }

  .hero-section {
    padding: 2rem 1rem;
  }

  .site-header {
    padding: 0.75rem 0;
  }

  .header-content {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .logo {
    font-size: 1.2rem;
    min-width: max-content;
  }

  .main-nav {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link,
  .lang-toggle,
  .ux-icon-btn {
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
  }

  .language-selector {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .ux-shell-controls {
    flex: 0 0 auto;
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.cta-section {
  background: linear-gradient(135deg, #071827 0%, #0f4f4a 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin: 3rem 0;
}

.cta-section h2 {
  color: #ffffff;
  border: none;
  margin-bottom: 0.9rem;
}

.cta-section p {
  color: #f8fafc;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
  max-width: 820px;
}

.cta-section .btn {
  display: inline-block;
  background: #ffffff;
  color: #1238c2;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 900;
  margin-top: 1rem;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.22);
  transition: all 0.3s ease;
}

.cta-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .header-content {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .main-nav {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .lang-toggle {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    min-width: 60px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }
}
