/* ========================================
   CSS REFATORADO - LAYOUT & VISUAL APRIMORADO
   Lógica preservada | Design elevado
   Grid 16x16 INTANGÍVEL
   ======================================== */

/* ============================================================
   DESIGN TOKENS - SISTEMA DE CORES E ESPAÇAMENTO
   ============================================================ */
:root {
  /* Paleta principal */
  --green-500: #28a745;
  --green-600: #218838;
  --green-700: #1e7e34;
  --green-100: #e8f5e9;
  --green-200: #c8e6c9;

  /* Paleta Bitcoin */
  --btc-orange: #F7931A;
  --btc-orange-dark: #e07b0a;

  /* Neutros - Tema Claro */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafb;
  --bg-tertiary: #edf0f2;
  --bg-card: #ffffff;

  /* Texto */
  --text-primary: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #718096;

  /* Borda */
  --border-color: #e2e8f0;
  --border-focus: #28a745;

  /* Sombras em 3 níveis */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);

  /* Accent */
  --accent-color: var(--green-500);
  --accent-hover: var(--green-600);

  /* Border-radius consistente */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

[data-theme="dark"] {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #1c2128;
  --text-primary: #e6edf3;
  --text-secondary: #c9d1d9;
  --text-muted: #8b949e;
  --border-color: #30363d;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
  --accent-hover: #34ce57;
}

/* ============================================================
   RESET E BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body {
  margin: 0;
  padding: 0;
  padding-top: 64px;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
}

/* ============================================================
   ANIMAÇÃO - CÉLULA ATIVA (mantida)
   ============================================================ */
.cell.animating-start {
  animation: pulse-cell 1s ease-in-out infinite;
}

@keyframes pulse-cell {
  0% {
    background-color: #28a745;
    transform: scale(1);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
  }

  50% {
    background-color: #343a40;
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(40, 167, 69, 0.45);
  }

  100% {
    background-color: #28a745;
    transform: scale(1);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
  }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--bg-card);
  border-bottom: 2px solid var(--green-500);
  padding: 0 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(40, 167, 69, 0.12);
}

.navbar .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.navbar-brand {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--green-600) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-right: 0;
}

.navbar-brand:hover {
  background: var(--green-100);
  border-color: var(--green-500);
  color: var(--green-700) !important;
  transform: translateY(-1px);
}

.navbar-brand i {
  font-size: 0.95em;
  opacity: 0.85;
}

/* Botão tema */
#theme-toggle {
  margin-left: auto;
  border-radius: 20px !important;
  padding: 5px 12px !important;
  font-size: 0.82em;
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.2s ease;
}

#theme-toggle:hover {
  background: var(--green-100);
  border-color: var(--green-500);
  color: var(--green-600);
}

/* Banner de desenvolvimento - faixa fixa abaixo da navbar */
#dev-banner {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(40, 167, 69, 0.92), rgba(32, 201, 151, 0.92));
  color: #fff;
  padding: 4px 16px;
  font-size: 11px;
  font-weight: 600;
  height: 26px;
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
  animation: devBannerSlide 0.4s ease-out forwards;
  transition: opacity 0.4s ease, transform 0.4s ease, height 0.3s ease;
  overflow: hidden;
}

@keyframes devBannerSlide {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#dev-banner.dev-banner-hidden {
  opacity: 0;
  height: 0;
  padding: 0;
  pointer-events: none;
}

#dev-banner .dev-sep {
  opacity: 0.5;
}

#dev-banner button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  margin-left: 8px;
  font-size: 12px;
  line-height: 1;
  transition: background 0.2s;
}

#dev-banner button:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Quando o banner está visível, body precisa de espaço extra */
body:has(#dev-banner:not(.dev-banner-hidden)) {
  padding-top: 86px;
  /* navbar 60px + banner 26px */
}

body:has(#dev-banner.dev-banner-hidden) {
  padding-top: 64px;
}

/* ============================================================
   AD - TOPO
   ============================================================ */
.ad-banner-top {
  max-width: 1400px;
  margin: 10px auto 0;
  padding: 0 15px;
}

.ad-label {
  font-size: 0.7em;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ============================================================
   LAYOUT PRINCIPAL - CONTAINER UNIVERSAL CENTRALIZADO
   ============================================================ */
.cqb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

@media (min-width: 1400px) {
  .cqb-container {
    max-width: 1280px;
  }
}

@media (min-width: 1600px) {
  .cqb-container {
    max-width: 1440px;
  }
}

.page-wrapper {
  width: 100%;
  min-height: 100vh;
}

/* ============================================================
   LAYOUT PRINCIPAL - USANDO CONTAINER UNIVERSAL
   ============================================================ */
.main-wrapper {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  width: 100%;
  justify-content: center;
  align-items: flex-start;
}

/* ============================================================
   SIDEBAR ESQUERDA
   ============================================================ */
.sidebar-left {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  position: sticky;
  top: 90px;
  /* navbar 60px + dev-banner 26px + gap 4px */
  align-self: flex-start;
  height: fit-content;
  z-index: 10;
}

.sidebar-left .sidebar-widget,
.sidebar-right .sidebar-widget {
  background: var(--bg-secondary);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-top: 10px;
  border: 1px solid var(--border-color);
}

.sidebar-left .sidebar-widget:first-child,
.sidebar-right .sidebar-widget:first-child {
  margin-top: 0;
}

.sidebar-left h3,
.sidebar-right h3,
.sidebar-left h4,
.sidebar-right h4 {
  color: var(--green-600);
  margin-bottom: 10px;
  font-size: 0.9em;
}

.sidebar-left h3,
.sidebar-right h3 {
  font-size: 0.95em;
  font-weight: 700;
  border-bottom: 2px solid var(--green-200);
  padding-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-left .sidebar-links,
.sidebar-right .sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-left .sidebar-links li,
.sidebar-right .sidebar-links li {
  margin-bottom: 4px;
}

.sidebar-left .sidebar-links a,
.sidebar-right .sidebar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-size: 0.85em;
  font-weight: 500;
  border: 1px solid transparent;
}

.sidebar-left .sidebar-links a:hover,
.sidebar-right .sidebar-links a:hover {
  background: var(--green-100);
  color: var(--green-700);
  border-color: var(--green-200);
  transform: translateX(3px);
}

.sidebar-left p,
.sidebar-right p {
  font-size: 0.84em;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ============================================================
   CONTEÚDO PRINCIPAL - CONTAINER CENTRALIZADO
   ============================================================ */
.main-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   SIDEBAR DIREITA
   ============================================================ */
.sidebar-right {
  position: sticky;
  top: 90px;
  align-self: flex-start;
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  height: fit-content;
  z-index: 10;
  margin-left: -240px;
}

/* ============================================================
   TIPOGRAFIA HIERÁRQUICA
   ============================================================ */
.main-content h1 {
  font-size: 1.6em;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.main-content h2 {
  font-size: 1.15em;
  font-weight: 700;
  color: var(--text-primary);
  margin: 14px 0 8px;
  line-height: 1.35;
}

.main-content h3 {
  font-size: 1.02em;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 10px 0 6px;
  line-height: 1.4;
}

.main-content h4 {
  font-size: 0.94em;
  font-weight: 600;
  color: var(--text-muted);
  margin: 8px 0 6px;
  line-height: 1.4;
}

.main-content p {
  font-size: 0.9em;
  line-height: 1.65;
  margin: 0 0 8px;
  color: var(--text-secondary);
}

.main-content li {
  font-size: 0.9em;
  line-height: 1.55;
  margin-bottom: 5px;
  color: var(--text-secondary);
}

.main-content ul,
.main-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.main-content button {
  font-size: 0.85em;
}

.main-content .output-label {
  font-size: 0.88em;
  margin-bottom: 6px;
}

.main-content .output-box {
  font-size: 0.83em;
  padding: 10px 12px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  background: linear-gradient(135deg, #e8f5e9 0%, #d4edda 50%, #c3e6cb 100%);
  color: #1b5e20;
  padding: 20px 24px;
  border-radius: var(--radius-xl);
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(40, 167, 69, 0.18), 0 1px 4px rgba(40, 167, 69, 0.1);
  border: 1.5px solid #a5d6a7;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '₿';
  position: absolute;
  right: -10px;
  top: -10px;
  font-size: 90px;
  opacity: 0.07;
  color: #28a745;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.hero-section h1 {
  font-size: 1.7em;
  font-weight: 800;
  margin-bottom: 4px;
  color: #1b5e20;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-section .subtitle {
  font-size: 0.96em;
  margin: 0;
  color: #2e7d32;
  font-weight: 500;
  opacity: 0.9;
}

/* ============================================================
   COMPACT SPACING & MOBILE OPTIMIZATION
   Grid 16x16 PRESERVADO - NUNCA ALTERAR
   ============================================================ */

/* Compact vertical spacing for text elements */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  
  /* Reduce padding on mobile */
  .hero-section {
    padding: 20px 0 !important;
  }
  
  .hero-section h1 {
    font-size: 1.4rem;
    margin-bottom: 8px !important;
  }
  
  .hero-section.subtitle {
    font-size: 0.9rem;
    margin-bottom: 12px !important;
  }
}

/* Compact element spacing */
p, label, .output-label {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Tighter card spacing */
.card, .feature-card, .puzzle-item-card {
  margin-top: 8px;
  margin-bottom: 8px;
 padding: 12px !important;
}

/* Modal compact styles */
.puzzles-modal-header,
#preset-progress-modal,
#vertical-progress-modal,
#eggs-modal {
  margin: 0;
 padding: 12px !important;
}

/* Collapsed modal icon style */
.modal-collapsed-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border: 2px solid;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-collapsed-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Horizontal modal collapsed */
#preset-progress-modal.collapsed .modal-collapsed-icon {
  border-color: #48bb78;
  color: #48bb78;
}

/* Vertical modal collapsed */
#vertical-progress-modal.collapsed .modal-collapsed-icon {
  border-color: #63b3ed;
  color: #63b3ed;
}

/* Eggs Hunter modal collapsed */
#eggs-modal.collapsed .modal-collapsed-icon {
  border-color: #f6ad55;
  color: #f6ad55;
}

/* Responsive modals */
@media (max-width: 768px) {
  #preset-progress-modal,
  #vertical-progress-modal,
  #eggs-modal {
    min-width: 280px !important;
    max-width: 95vw !important;
    padding: 10px !important;
    font-size: 12px !important;
  }
  
  .puzzles-modal-header {
    padding: 10px !important;
  }
}

/* Button spacing optimization */
.btn, button {
  margin: 4px;
 padding: 6px 12px;
  font-size: 0.9em;
}

@media (max-width: 768px) {
  .btn, button {
    padding: 5px 10px;
    font-size: 0.85em;
    margin: 2px;
  }
}

/* Input fields compact */
textarea, input[type="text"], input[type="number"] {
  margin-bottom: 8px;
 padding: 8px;
  font-size: 0.9em;
}

/* Progress bars compact */
.progress-bar-container {
  margin: 6px 0;
  height: 8px;
}

/* Badge spacing */
.badge, .puzzle-count-badge {
  margin-left: 6px;
 padding: 3px 8px;
  font-size: 0.75em;
}

/* Icons alignment */
i.fas, i.fab, i.far {
  margin-right: 4px;
  vertical-align: middle;
}

/* Draggable modal handle */
.modal-drag-handle {
  cursor: move;
 padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px 8px 0 0;
  margin: -12px -12px 12px -12px;
}

/* Prevent script blocking - keep page alive */
body.keep-alive {
  animation: heartbeat 60s infinite;
}

@keyframes heartbeat {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.9999; }
}

/* ============================================================
   CANVAS - MATRIZ 16x16 (PRESERVADO - NUNCA ALTERAR)
   ============================================================ */
.canvas-wrapper {
  display: flex;
  justify-content: center;
  margin: 10px 0;
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

#grid {
  min-width: 100%;
  max-width: 100%;
  height: auto;
  width: 100%;
  border: 2px solid #2d3748;
  border-radius: var(--radius-md);
  background: #ffffff;
  cursor: crosshair;
  box-shadow: var(--shadow-lg);
  display: block;
  touch-action: none;
}

@media (max-width: 768px) {
  #grid {
    max-width: 100vw;
  }
}

/* ============================================================
   INDICADORES - FAIXA E HEX
   ============================================================ */
.range-indicator {
  background: linear-gradient(135deg, #fffdf0, #fff8dc);
  border: 1.5px solid #f0b429;
  border-radius: var(--radius-md);
  padding: 7px 14px;
  text-align: center;
  font-weight: 600;
  color: #7d5a00;
  font-size: 0.88em;
  margin: 8px 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(240, 180, 41, 0.15);
}

.range-indicator.show {
  opacity: 1;
  transform: translateY(0);
}

.range-indicator.auto-hide {
  animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }

  20% {
    opacity: 1;
    transform: translateY(0);
  }

  80% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* HEX Display */
.hex-display {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1.5px solid #3b82f6;
  border-radius: var(--radius-md);
  padding: 9px 14px;
  text-align: center;
  font-weight: 600;
  color: #1d4ed8;
  font-size: 0.88em;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
  transition: all 0.25s ease;
  word-break: break-all;
}

.hex-display:hover {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.hex-display strong {
  color: #1e3a8a;
  margin-right: 6px;
  white-space: nowrap;
}

.hex-display #hexValue {
  font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-all;
  letter-spacing: 0.3px;
  font-size: 0.92em;
}

/* ============================================================
   CARDS DE CONTROLE
   ============================================================ */
.control-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--green-500);
}

.control-card h2 {
  color: var(--green-600);
  font-size: 1.05em;
  font-weight: 700;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.3;
}

.control-card h2 i {
  font-size: 0.95em;
  opacity: 0.8;
}

/* ============================================================
   GRID DE BOTÕES (Altura/Base)
   ============================================================ */
.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30px, 30px));
  gap: 4px;
  margin-top: 8px;
}

.button-grid button {
  padding: 4px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--green-500);
  background: var(--bg-card);
  color: var(--green-600);
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 0.72em;
  line-height: 1;
}

.button-grid button:hover {
  background: linear-gradient(135deg, var(--green-500), #20c997);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 3px 10px rgba(40, 167, 69, 0.35);
  border-color: var(--green-500);
}

.button-grid button.active {
  background: var(--green-500);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.button-grid button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Botões extras (vermelho) */
#extra-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30px, 30px));
  gap: 4px;
  margin-top: 8px;
}

#extra-buttons button {
  padding: 4px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #dc3545;
  background: var(--bg-card);
  color: #dc3545;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 0.72em;
  line-height: 1;
}

#extra-buttons button:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 3px 10px rgba(220, 53, 69, 0.35);
}

#extra-buttons button.active {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

#extra-buttons button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ============================================================
   SEÇÃO DE CONTROLES PRINCIPAIS (dentro do card)
   ============================================================ */
.main-controls-section {
  background: linear-gradient(135deg, #f0faf3, #e8f5e9);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 12px;
  border-top: 2px solid #c8e6c9;
  border: 1px solid #c8e6c9;
}

.main-controls-section h2 {
  color: #2e7d32;
  font-size: 1.02em;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   BOTÕES DE AÇÃO PERSONALIZADOS
   ============================================================ */
.btn-custom {
  padding: 9px 18px;
  font-size: 0.88em;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-start {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
}

.btn-start:hover:not(:disabled) {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(40, 167, 69, 0.35);
}

.btn-stop {
  background: linear-gradient(135deg, #ffc107, #fd7e14);
  color: #fff;
}

.btn-stop:hover:not(:disabled) {
  background: linear-gradient(135deg, #fd7e14, #e55300);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(255, 193, 7, 0.35);
}

.btn-stop:disabled,
.btn-start:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-clear {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: #fff;
}

.btn-clear:hover {
  background: linear-gradient(135deg, #c82333, #a71d2a);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(220, 53, 69, 0.35);
}

.btn-random {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
  color: #fff;
}

.btn-random:hover {
  background: linear-gradient(135deg, #5a32a3, #4a298d);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(111, 66, 193, 0.35);
}

.btn-debug {
  background: linear-gradient(135deg, #ff6b35, #ee5a24);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-debug:hover:not(:disabled) {
  background: linear-gradient(135deg, #ee5a24, #dc3545);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(238, 90, 36, 0.35);
}

.btn-debug::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-debug:hover::before {
  left: 100%;
}

/* ============================================================
   CONTROLE DE VELOCIDADE
   ============================================================ */
.speed-control {
  background: var(--bg-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.speed-control label {
  font-weight: 600;
  margin: 0;
  font-size: 0.88em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.speed-control input[type="range"] {
  flex: 1;
  min-width: 140px;
  accent-color: var(--green-500);
}

/* Preset selector específico */
.d-flex:has(#presetBits) {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 10px 0;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.d-flex:has(#presetBits) label {
  font-size: 0.88em;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
}

#presetBits {
  flex: 1;
  min-width: 160px;
  font-size: 0.85em;
  padding: 6px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

#presetBits:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

#applyPresetBtn {
  padding: 7px 16px;
  font-size: 0.85em;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ============================================================
   GRID DE LAYOUT - 2 COLUNAS (Cards)
   ============================================================ */
.cards-grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
  align-items: stretch;
}

.cards-grid-container>* {
  min-height: 100%;
}

/* Card 1 - Configurações Avançadas */
.config-avancadas-card {
  grid-column: 1;
  grid-row: 1;
}

.config-avancadas-card h2 {
  font-size: 1.0em !important;
  margin-bottom: 10px !important;
}

.config-avancadas-card .options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
  margin-top: 8px !important;
}

.config-avancadas-card .option-card {
  padding: 8px 10px !important;
  font-size: 0.83em !important;
}

.config-avancadas-card .option-card span {
  font-size: 0.85em !important;
}

/* Sub-seção Controles Principais */
.config-avancadas-card .controles-principais-card {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px solid var(--border-color);
}

.config-avancadas-card .controles-principais-card h2 {
  font-size: 1.0em !important;
  margin-bottom: 8px !important;
}

.config-avancadas-card .controles-principais-card .d-flex {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 7px !important;
}

.config-avancadas-card .controles-principais-card .btn-custom {
  width: 100% !important;
  padding: 9px 10px !important;
  font-size: 0.83em !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Card 2 - Seleção de Linhas (altura total direita) */
.selecao-linhas-card {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}

.selecao-linhas-card h2 {
  font-size: 0.95em !important;
  margin-bottom: 6px !important;
  margin-top: 10px !important;
  flex-shrink: 0;
  color: var(--green-600) !important;
}

.selecao-linhas-card h2:first-child {
  margin-top: 0 !important;
}

.selecao-linhas-card .button-grid {
  margin-top: 4px !important;
  gap: 3px !important;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  flex-shrink: 0;
}

.selecao-linhas-card .button-grid button {
  width: 100% !important;
  aspect-ratio: 1 / 1;
  font-size: 0.68em !important;
  padding: 3px !important;
  min-width: 22px;
  min-height: 22px;
}

.selecao-linhas-card #extra-buttons {
  margin-top: 4px !important;
  gap: 3px !important;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  margin-bottom: auto;
  flex-shrink: 0;
}

.selecao-linhas-card #extra-buttons button {
  width: 100% !important;
  aspect-ratio: 1 / 1;
  font-size: 0.68em !important;
  padding: 3px !important;
  min-width: 22px;
  min-height: 22px;
}

/* Ajustes gerais de cards no grid */
.control-card,
.main-controls-section {
  margin-bottom: 0 !important;
}

.cards-grid-container .control-card,
.cards-grid-container .main-controls-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   OPTIONS GRID (Radio/Checkbox)
   ============================================================ */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.option-card {
  background: var(--bg-card);
  padding: 9px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88em;
  color: var(--text-secondary);
  font-weight: 500;
}

.option-card:hover {
  border-color: var(--green-500);
  background: var(--green-100);
  color: var(--green-700);
  transform: translateY(-1px);
}

.option-card input {
  accent-color: var(--green-500);
  margin: 0;
}

/* ============================================================
   SEÇÃO DE OUTPUTS - CHAVES GERADAS
   ============================================================ */
.outputs-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin: 10px 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--green-500);
}

.outputs-section h2 {
  color: var(--green-600);
  font-size: 1.12em;
  font-weight: 700;
  margin: 0 0 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.3;
}

.outputs-section .output-box {
  text-align: left;
  padding: 13px 12px;
  line-height: 1;
  min-height: 40px;
  box-sizing: border-box;
}

.output-group {
  background: var(--bg-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--green-500);
  width: 100%;
}

.control-card .output-group {
  width: 100%;
}

.output-label {
  display: block;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 0.86em;
  line-height: 1.3;
}

.output-box {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.83em;
  background: var(--bg-card);
  color: var(--text-primary);
  resize: none;
  transition: all 0.2s ease;
  line-height: 1.55;
  overflow: hidden;
}

.output-box:focus {
  outline: none;
  border-color: var(--green-500);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

/* ============================================================
   DIVISOR DE CONTEÚDO
   ============================================================ */
.content-divider {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-500), transparent);
  margin: 24px 0;
  opacity: 0.6;
}

/* ============================================================
   SEÇÕES COLAPSÁVEIS
   ============================================================ */
.post_puzzle-section,
.post_edu-intro-section,
.post_edu-warning-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 0;
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-height: 56px;
  transition: max-height 0.4s ease, box-shadow 0.25s ease;
  border: 1px solid var(--border-color);
}

.post_puzzle-section.expanded,
.post_edu-intro-section.expanded,
.post_edu-warning-section.expanded {
  max-height: 2000px;
  box-shadow: var(--shadow-md);
}

.post_puzzle-section:hover,
.post_edu-intro-section:hover,
.post_edu-warning-section:hover {
  box-shadow: var(--shadow-md);
}

.post_puzzle-section h2,
.post_edu-intro-section h2,
.post_edu-warning-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border-bottom: 1px solid var(--border-color);
  font-size: 1.02em;
  color: var(--text-primary);
  line-height: 1.3;
  transition: background 0.2s ease;
}

.post_puzzle-section h2:hover,
.post_edu-intro-section h2:hover,
.post_edu-warning-section h3:hover {
  background: linear-gradient(135deg, var(--green-100), #e8f5e9);
}

.post_puzzle-section h2 .toggle-icon,
.post_edu-intro-section h2 .toggle-icon,
.post_edu-warning-section h3 .toggle-icon {
  transition: transform 0.3s ease;
  font-size: 0.8em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.post_puzzle-section.expanded h2 .toggle-icon,
.post_edu-intro-section.expanded h2 .toggle-icon,
.post_edu-warning-section.expanded h3 .toggle-icon {
  transform: rotate(180deg);
  color: var(--green-500);
}

.post_puzzle-section .section-content,
.post_edu-intro-section .section-content,
.post_edu-warning-section .section-content {
  padding: 18px 20px;
}

.post_puzzle-section .section-content h3,
.post_edu-intro-section .section-content h3,
.post_edu-warning-section .section-content h3 {
  color: var(--green-600);
  font-size: 1.0em;
  font-weight: 700;
  margin: 12px 0 8px;
  line-height: 1.4;
}

.post_puzzle-section .section-content p,
.post_edu-intro-section .section-content p,
.post_edu-warning-section .section-content p {
  margin-bottom: 10px;
  line-height: 1.65;
  font-size: 0.9em;
  color: var(--text-secondary);
}

.post_puzzle-section .section-content ul,
.post_edu-intro-section .section-content ul,
.post_edu-warning-section .section-content ul {
  margin: 10px 0;
  padding-left: 20px;
}

.post_puzzle-section .section-content li,
.post_edu-intro-section .section-content li,
.post_edu-warning-section .section-content li {
  font-size: 0.9em;
  margin-bottom: 5px;
  color: var(--text-secondary);
}

/* ============================================================
   DATABASE STATUS SECTION
   ============================================================ */
#database-status-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin: 10px 0;
  overflow: hidden;
}

/* ============================================================
   WIDGET BTC WALLET
   ============================================================ */
#btc-wallet-widget {
  font-family: 'Courier New', monospace;
  background: var(--bg-secondary) !important;
  padding: 12px !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: 1px solid var(--border-color);
}

#btc-wallet-widget h3 {
  font-size: 0.95em !important;
  color: var(--text-primary) !important;
  font-weight: 700;
  text-align: center;
  margin: 0 0 8px !important;
}

#btc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ============================================================
   INTERVALOS HEX/WIF
   ============================================================ */
#hexRange,
#wifRange,
#wifRangeUncompressed {
  text-align: left !important;
  display: block !important;
  width: 100% !important;
  word-break: break-all !important;
  font-family: 'Courier New', monospace;
  font-size: 0.8em;
  color: var(--text-secondary);
}

/* ============================================================
   BOTÃO NONE (DESMARCAR ALTURA/BASE)
   ============================================================ */
.range-btn-none {
  background: linear-gradient(135deg, #dc3545, #c82333) !important;
  color: white !important;
  font-weight: bold !important;
  border-color: #c82333 !important;
}

.range-btn-none:hover {
  background: linear-gradient(135deg, #c82333, #a71d2a) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.range-btn-none.active {
  background: #a71d2a !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.35);
}

/* ============================================================
   PRESET SELECTOR AJUSTES
   ============================================================ */
.speed-control:has(#presetBits) {
  flex-wrap: wrap;
  gap: 8px;
}

.speed-control:has(#presetBits) label {
  font-size: 0.88em !important;
}

.speed-control:has(#presetBits) #presetBits {
  flex: 1;
  min-width: 160px;
  font-size: 0.85em !important;
  padding: 6px 10px !important;
}

.speed-control:has(#presetBits) #applyPresetBtn {
  padding: 6px 14px !important;
  font-size: 0.85em !important;
}

/* ============================================================
   CONVERSOR INPUT
   ============================================================ */
#converterInput {
  width: 100% !important;
  padding: 10px 14px !important;
  font-size: 0.9em !important;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  resize: vertical;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.2s ease;
  font-family: 'Courier New', monospace;
}

#converterInput:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

/* ============================================================
   COLUNAS EXTRAS
   ============================================================ */
.extra-cols-container {
  margin-top: 8px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.extra-cols-container h4 {
  font-size: 0.9em !important;
  margin-bottom: 5px !important;
  color: #dc3545;
  flex-shrink: 0;
  font-weight: 700;
}

.extra-cols-container .button-grid {
  gap: 3px !important;
  grid-template-columns: repeat(16, 1fr);
  flex-shrink: 0;
}

.extra-cols-container .button-grid button {
  width: 100% !important;
  aspect-ratio: 1 / 1;
  font-size: 0.68em !important;
  min-width: 22px;
  min-height: 22px;
}

/* ============================================================
   NAVBAR (navbar de rodapé)
   ============================================================ */
.site-footer {
  background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
  color: #c9d1d9;
  padding: 24px 0 16px;
  margin-top: 30px;
  border-top: 2px solid var(--green-500);
}

.footer-nav a {
  color: #c9d1d9;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.88em;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--green-500);
}

.footer-nav ul {
  margin-bottom: 10px;
}

.site-footer .text-center {
  font-size: 0.82em;
  color: #8b949e;
  line-height: 1.6;
}

/* ============================================================
   ÍCONE COPIAR
   ============================================================ */
.fa-copy {
  font-size: 16px;
  cursor: pointer;
  color: var(--green-500);
  transition: transform 0.2s ease, color 0.2s ease;
}

.fa-copy:hover {
  color: #fd7e14;
}

.fa-copy:active {
  color: #3b82f6;
  transform: scale(0.75);
}

.fa-copy.text-success {
  color: var(--green-500) !important;
}

/* ============================================================
   WIF LIST
   ============================================================ */
#wifList {
  max-height: 170px;
  overflow-y: auto;
  padding-right: 6px;
}

#wifList .list-group-item {
  font-size: 0.8em !important;
  padding: 7px 10px !important;
}

#wifList .list-group-item .puzzle-title {
  font-weight: 700;
  color: var(--green-500);
  font-size: 0.85em !important;
}

#wifList .list-group-item .puzzle-wif {
  font-family: 'Courier New', monospace;
  font-size: 0.75em !important;
  color: var(--text-muted);
  word-break: break-all;
}

/* ============================================================
   INDICADOR DE BACKGROUND (floating)
   ============================================================ */
.background-indicator {
  transition: all 0.3s ease;
}

/* ============================================================
   AD CONTAINERS
   ============================================================ */
.ad-container {
  margin: 14px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ============================================================
   GDPR BANNER
   ============================================================ */
.gdpr-consent-banner {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ============================================================
   RESPONSIVIDADE - TABLET (992px - 1200px)
   ============================================================ */
@media (max-width: 1200px) {
  .main-content {
    margin-right: 0;
  }

  .sidebar-right {
    position: static;
    margin-left: 0;
    margin-top: 14px;
    width: 100%;
  }
}

@media (max-width: 992px) {
  .main-wrapper {
    flex-direction: column;
  }

  .sidebar-left {
    position: static;
    width: 100%;
    top: auto;
  }

  .cards-grid-container {
    grid-template-columns: 1fr 1fr;
  }

  .config-avancadas-card {
    grid-column: 1;
    grid-row: 1;
  }

  .selecao-linhas-card {
    grid-column: 2;
    grid-row: 1 / 2;
  }

  .config-avancadas-card .controles-principais-card .d-flex {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ============================================================
   RESPONSIVIDADE - MOBILE (até 768px)
   ============================================================ */
@media (max-width: 768px) {
  body {
    padding-top: 58px;
  }

  .navbar {
    height: 56px;
  }

  .hero-section {
    padding: 14px 16px;
  }

  .hero-section h1 {
    font-size: 1.35em;
  }

  .hero-section .subtitle {
    font-size: 0.88em;
  }

  .button-grid,
  #extra-buttons {
    grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  }

  .btn-custom {
    width: 100%;
    padding: 8px 14px;
  }

  .post_puzzle-section,
  .post_edu-intro-section,
  .post_edu-warning-section {
    margin: 10px 0;
  }

  .post_puzzle-section h2,
  .post_edu-intro-section h2,
  .post_edu-warning-section h3 {
    font-size: 0.95em !important;
    padding: 11px 14px;
  }

  .post_puzzle-section .section-content,
  .post_edu-intro-section .section-content,
  .post_edu-warning-section .section-content {
    padding: 14px 16px;
  }

  .main-content h1 {
    font-size: 1.4em;
  }

  .main-content h2 {
    font-size: 1.06em;
  }

  .main-content h3 {
    font-size: 0.96em;
  }

  .control-card,
  .main-controls-section,
  .outputs-section {
    padding: 10px 12px;
  }

  .sidebar-left,
  .sidebar-right {
    padding: 10px 12px;
  }

  .cards-grid-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .config-avancadas-card {
    grid-column: 1;
    grid-row: 1;
  }

  .selecao-linhas-card {
    grid-column: 1;
    grid-row: 2;
  }

  .config-avancadas-card .options-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .config-avancadas-card .controles-principais-card .d-flex {
    grid-template-columns: 1fr !important;
  }

  .selecao-linhas-card .button-grid,
  .selecao-linhas-card #extra-buttons {
    grid-template-columns: repeat(auto-fit, minmax(28px, 1fr)) !important;
  }
}

/* ============================================================
   ANIMAÇÃO - KEYFRAME GLOBAL
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   ====== MODAL DE PUZZLES BITCOIN ======
   Sistema de 3 Estados: Oculto → Ticket → Expandido
   ============================================================ */

#puzzlesListModal,
#puzzlesListModal *,
#puzzlesListModal *::before,
#puzzlesListModal *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Estado 1: OCULTO */
#puzzlesListModal {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 9999;
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

/* Estado 2: TICKET LATERAL */
#puzzlesListModal.ticket {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  top: 70%;
  right: 12px;
  left: auto;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  /* Substitui amarelos por azul/teal */
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  border-radius: 50%;
  box-shadow: -5px 0 25px rgba(59, 130, 246, 0.35), -2px 0 10px rgba(6, 182, 212, 0.25);
  overflow: visible;
  animation: slideInTicket 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideInTicket {
  0% {
    right: -320px;
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }

  100% {
    right: 0;
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

#puzzlesListModal.ticket:hover {
  box-shadow: -8px 0 35px rgba(59, 130, 246, 0.55), -4px 0 15px rgba(6, 182, 212, 0.3);
  transform: translateY(-50%) translateX(0);
}

/* Estado 3: EXPANDIDO */
#puzzlesListModal.expanded {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 700px;
  height: auto;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: expandModal 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes expandModal {
  0% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

#puzzlesListModal.expanded::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  z-index: -1;
  animation: fadeInBackdrop 0.4s ease-out forwards;
}

@keyframes fadeInBackdrop {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Header do Modal */
.puzzles-modal-header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #ffffff;
  border-radius: inherit;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

#puzzlesListModal.ticket .puzzles-modal-header {
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
}

#puzzlesListModal.expanded .puzzles-modal-header {
  border-radius: 16px 16px 0 0;
  cursor: default;
  border-bottom: 2px solid rgba(255, 152, 0, 0.25);
}

#puzzlesListModal.ticket .puzzles-modal-header:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  padding-left: 0;
}

.puzzles-modal-header:focus {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: -3px;
}

/* Título do modal */
#puzzlesModalTitle {
  margin: 0;
  font-size: 1.05em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  line-height: 1.3;
  color: #ffffff;
}

#puzzlesListModal.ticket #puzzlesModalTitle {
  font-size: 0;
  /* oculta o texto no modo ícone */
}

#puzzlesListModal.expanded #puzzlesModalTitle {
  font-size: 1.3em;
}

#puzzlesModalTitle i.fa-trophy {
  font-size: 1.35em;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.25));
  animation: trophyPulse 2.5s ease-in-out infinite;
}

@keyframes trophyPulse {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  25% {
    transform: scale(1.15) rotate(-8deg);
  }

  75% {
    transform: scale(1.15) rotate(8deg);
  }
}

/* Badge de contagem */
.puzzle-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 15px;
  font-size: 0.92em;
  font-weight: 900;
  color: #ffffff;
  animation: badgePop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Botões do header */
.puzzles-header-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.puzzles-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  padding: 0;
}

.puzzles-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.12);
}

.puzzles-btn:active {
  transform: scale(0.95);
}

.puzzles-btn:focus {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.puzzles-collapse-btn {
  display: flex;
}

#puzzlesListModal.expanded .puzzles-collapse-btn {
  display: none;
}

.puzzles-collapse-btn i {
  transition: transform 0.2s ease;
}

.puzzles-collapse-btn:hover i {
  transform: translateX(4px);
}

.puzzles-close-btn {
  display: none;
}

#puzzlesListModal.expanded .puzzles-close-btn {
  display: flex;
}

.puzzles-close-btn:hover {
  background: rgba(244, 67, 54, 0.35);
  border-color: rgba(244, 67, 54, 0.6);
}

/* Conteúdo do ticket */
.ticket-content {
  display: none;
  padding: 12px 18px 14px;
  color: #ffffff;
  text-align: center;
}

#puzzlesListModal.ticket .ticket-content {
  display: block;
}

.ticket-content p {
  margin: 0;
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ticket-content .highlight {
  display: block;
  font-size: 1.1em;
  font-weight: 800;
  margin-top: 5px;
  letter-spacing: 0.3px;
}

/* Corpo do modal expandido */
.puzzles-modal-body {
  display: none;
  width: 100%;
  background: #f8f9fa;
  overflow-y: auto;
  overflow-x: hidden;
}

#puzzlesListModal.expanded .puzzles-modal-body {
  display: block;
  max-height: calc(85vh - 100px);
  padding: 22px;
}

/* Scrollbar customizada */
.puzzles-modal-body::-webkit-scrollbar {
  width: 8px;
}

.puzzles-modal-body::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 8px;
}

.puzzles-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

.puzzles-modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ffca28 0%, #ffa726 100%);
}

.puzzles-modal-body {
  scrollbar-width: thin;
  scrollbar-color: #ffc107 #e9ecef;
}

/* Lista de puzzles */
#puzzlesListContent {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Item de puzzle */
.puzzle-item {
  width: 100%;
  padding: 16px;
  background: #ffffff;
  border: 1.5px solid transparent;
  border-left: 5px solid #ffc107;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  transition: all 0.25s ease;
  animation: slideInItem 0.5s ease-out backwards;
}

@keyframes slideInItem {
  from {
    opacity: 0;
    transform: translateX(-25px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.puzzle-item:nth-child(1) {
  animation-delay: 0.05s;
}

.puzzle-item:nth-child(2) {
  animation-delay: 0.10s;
}

.puzzle-item:nth-child(3) {
  animation-delay: 0.15s;
}

.puzzle-item:nth-child(4) {
  animation-delay: 0.20s;
}

.puzzle-item:nth-child(5) {
  animation-delay: 0.25s;
}

.puzzle-item:nth-child(n+6) {
  animation-delay: 0.30s;
}

.puzzle-item:hover {
  transform: translateY(-4px) translateX(4px);
  box-shadow: 0 10px 28px rgba(255, 193, 7, 0.28);
  border-color: #ff9800;
  border-left-color: #ff9800;
}

/* Header do item */
.puzzle-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid #f0f0f0;
}

/* Número do puzzle */
.puzzle-number {
  font-size: 1.2em;
  font-weight: 800;
  color: #e65100;
}

/* Timestamp */
.puzzle-timestamp {
  font-size: 0.78em;
  color: #718096;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 3px 10px;
}

/* Labels e valores */
.detail-label {
  font-size: 0.78em;
  font-weight: 700;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.detail-value {
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
  padding: 9px 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #edf2f7 100%);
  border-left: 3px solid #ffc107;
  border-radius: 0 6px 6px 0;
  word-break: break-all;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
  color: #2d3748;
}

.detail-value:hover {
  background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
  border-left-color: #ff9800;
}

.detail-value.address {
  color: #28a745;
  border-left-color: #28a745;
}

.detail-value.address:hover {
  background: linear-gradient(135deg, #f0fff4, #e8f5e9);
}

.detail-value.wif {
  color: #2563eb;
  border-left-color: #3b82f6;
}

.detail-value.wif:hover {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

/* Estado vazio */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
  color: #adb5bd;
}

.empty-state i {
  font-size: 4em;
  margin-bottom: 14px;
  color: #dee2e6;
}

.empty-state p {
  font-size: 1em;
  font-weight: 600;
  color: #adb5bd;
  margin: 0;
}

/* ============================================================
   RESPONSIVIDADE - MODAL PUZZLES
   ============================================================ */
@media (max-width: 1024px) {
  #puzzlesListModal.ticket {
    width: 270px;
  }

  #puzzlesListModal.expanded {
    width: 92%;
    max-width: 650px;
  }
}

@media (max-width: 768px) {
  #puzzlesListModal.ticket {
    width: 250px;
    max-width: 85vw;
    max-height: 120px;
  }

  #puzzlesListModal.expanded {
    width: 95%;
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 12px;
  }

  .puzzles-modal-header {
    padding: 11px 15px;
  }

  #puzzlesModalTitle {
    font-size: 0.9em;
  }

  #puzzlesListModal.expanded #puzzlesModalTitle {
    font-size: 1.15em;
  }

  .puzzles-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .puzzle-count-badge {
    min-width: 26px;
    height: 26px;
    font-size: 0.82em;
  }

  #puzzlesListModal.expanded .puzzles-modal-body {
    max-height: calc(90vh - 80px);
    padding: 16px;
  }

  .puzzle-item {
    padding: 13px;
  }

  .puzzle-number {
    font-size: 1.05em;
  }

  .detail-value {
    font-size: 0.82em;
    padding: 8px 10px;
  }

  .puzzles-modal-body::-webkit-scrollbar {
    width: 5px;
  }
}

@media (max-width: 480px) {
  #puzzlesListModal.ticket {
    width: 230px;
    max-height: 110px;
  }

  #puzzlesListModal.expanded {
    width: 98%;
    max-height: 92vh;
  }

  .puzzle-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .puzzle-timestamp {
    align-self: flex-end;
  }

  #puzzlesModalTitle {
    font-size: 0.82em;
    gap: 5px;
  }

  #puzzlesModalTitle i.fa-trophy {
    font-size: 1.15em;
  }

  .empty-state {
    padding: 35px 16px;
  }

  .empty-state i {
    font-size: 3.2em;
  }
}

/* ============================================================
   TEMA ESCURO (data-theme="dark")
   ============================================================ */
[data-theme="dark"] .control-card,
[data-theme="dark"] .outputs-section {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .output-box {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .option-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

[data-theme="dark"] .speed-control {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .button-grid button {
  background: var(--bg-secondary);
  color: var(--green-500);
}

[data-theme="dark"] #extra-buttons button {
  background: var(--bg-secondary);
  color: #dc3545;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #1a3a1a, #1b3d1b);
  border-color: #2d5a2d;
}

[data-theme="dark"] .hero-section h1,
[data-theme="dark"] .hero-section .subtitle {
  color: #a5d6a7;
}

[data-theme="dark"] .output-group {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] #puzzlesListModal.expanded {
  background: #1e1e1e;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 10px 40px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .puzzles-modal-body {
  background: #121212;
}

[data-theme="dark"] .puzzle-item {
  background: #2d2d2d;
  border-color: #444;
  border-left-color: #ffa726;
}

[data-theme="dark"] .puzzle-item:hover {
  box-shadow: 0 10px 30px rgba(255, 167, 38, 0.4);
}

[data-theme="dark"] .puzzle-header {
  border-bottom-color: #444;
}

[data-theme="dark"] .puzzle-timestamp {
  background: #2d2d2d;
  border-color: #444;
  color: #aaa;
}

[data-theme="dark"] .detail-label {
  color: #bbb;
}

[data-theme="dark"] .detail-value {
  background: linear-gradient(135deg, #2d2d2d, #1e1e1e);
  color: #e0e0e0;
  border-left-color: #ffa726;
}

[data-theme="dark"] .detail-value:hover {
  background: linear-gradient(135deg, #1e1e1e, #121212);
}

[data-theme="dark"] .detail-value.address {
  color: #4caf50;
  border-left-color: #4caf50;
}

[data-theme="dark"] .detail-value.wif {
  color: #64b5f6;
  border-left-color: #64b5f6;
}

[data-theme="dark"] .empty-state {
  background: #2d2d2d;
  border-color: #444;
  color: #888;
}

[data-theme="dark"] .empty-state i {
  color: #444;
}

[data-theme="dark"] .puzzles-modal-body::-webkit-scrollbar-track {
  background: #2d2d2d;
}

[data-theme="dark"] .puzzles-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ffa726, #ff9800);
  border-color: #2d2d2d;
}

/* ============================================================
   TEMA ESCURO AUTOMÁTICO (prefers-color-scheme)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  #puzzlesListModal.expanded {
    background: #1e1e1e;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 10px 40px rgba(0, 0, 0, 0.6);
  }

  #puzzlesListModal.expanded::before {
    background: rgba(0, 0, 0, 0.85);
  }

  .puzzles-modal-body {
    background: #121212;
  }

  .puzzle-item {
    background: #2d2d2d;
    border-color: #444;
    border-left-color: #ffa726;
  }

  .puzzle-item:hover {
    box-shadow: 0 10px 30px rgba(255, 167, 38, 0.4);
    border-left-color: #ff9800;
  }

  .puzzle-header {
    border-bottom-color: #444;
  }

  .puzzle-timestamp {
    background: #2d2d2d;
    border-color: #444;
    color: #aaa;
  }

  .detail-label {
    color: #bbb;
  }

  .detail-value {
    background: linear-gradient(135deg, #2d2d2d, #1e1e1e);
    color: #e0e0e0;
    border-left-color: #ffa726;
  }

  .detail-value:hover {
    background: linear-gradient(135deg, #1e1e1e, #121212);
  }

  .detail-value.address {
    color: #4caf50;
    border-left-color: #4caf50;
  }

  .detail-value.address:hover {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
  }

  .detail-value.wif {
    color: #64b5f6;
    border-left-color: #64b5f6;
  }

  .detail-value.wif:hover {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
  }

  .empty-state {
    background: #2d2d2d;
    border-color: #444;
    color: #888;
  }

  .empty-state i {
    color: #444;
  }

  .puzzles-modal-body::-webkit-scrollbar-track {
    background: #2d2d2d;
  }

  .puzzles-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    border-color: #2d2d2d;
  }
}

/* ============================================================
   ACESSIBILIDADE
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

  #puzzlesListModal,
  #puzzlesListModal *,
  #puzzlesListModal *::before,
  #puzzlesListModal *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

*:focus-visible {
  outline: 2px solid rgba(40, 167, 69, 0.7);
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  .puzzle-item {
    border: 2px solid #000;
  }

  .detail-value {
    border-left-width: 5px;
  }

  .puzzles-modal-header {
    border-bottom: 3px solid #000;
  }
}

/* Print */
@media print {
  #puzzlesListModal {
    display: none !important;
  }
}

/* ============================================================
   NOVOS ELEMENTOS - INDEX.HTML REFATORADO
   ============================================================ */

/* Preset row */
.preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  margin: 8px 0;
  flex-wrap: nowrap;
}

.preset-label {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  margin: 0;
  flex-shrink: 0;
}

.preset-row .form-select {
  flex: 1;
  min-width: 0;
  font-size: 0.83em;
  padding: 4px 28px 4px 8px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  height: 30px;
}

.preset-row .form-select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.15);
}

.preset-row .btn-custom {
  padding: 4px 12px;
  font-size: 0.82em;
  height: 30px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

/* DB Loading placeholder */
.db-loading-placeholder {
  padding: 14px 20px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  font-size: 0.88em;
  margin: 8px 0;
}

.db-loading-placeholder i {
  margin-right: 8px;
  color: var(--green-500);
}

/* Botões de ação ÍCONE (sem texto) */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon.btn-start {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: #fff;
}

.btn-icon.btn-stop {
  background: linear-gradient(135deg, #ffc107, #fd7e14);
  color: #fff;
}

.btn-icon.btn-clear {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: #fff;
}

.btn-icon.btn-random {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
  color: #fff;
}

.btn-icon.btn-debug {
  background: linear-gradient(135deg, #ff6b35, #ee5a24);
  color: #fff;
}

.btn-icon.btn-start:hover:not(:disabled) {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}

.btn-icon.btn-stop:hover:not(:disabled) {
  background: linear-gradient(135deg, #fd7e14, #e55300);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(253, 126, 20, 0.4);
}

.btn-icon.btn-clear:hover {
  background: linear-gradient(135deg, #c82333, #a71d2a);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.4);
}

.btn-icon.btn-random:hover {
  background: linear-gradient(135deg, #5a32a3, #4a298d);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(111, 66, 193, 0.4);
}

.btn-icon.btn-debug:hover:not(:disabled) {
  background: linear-gradient(135deg, #ee5a24, #dc3545);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(238, 90, 36, 0.4);
}

/* Linha de botões de ação */
.action-buttons-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* Linha de velocidade */
.speed-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.speed-label {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

.speed-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.75em;
  color: var(--text-muted);
}

/* Outputs grid - 3 colunas lado a lado */
.outputs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* Widget BTC Wallet - como seção de conteúdo */
.btc-wallet-section {
  margin: 10px 0;
}

#btc-wallet-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: 'Courier New', Courier, monospace;
}

#btc-wallet-widget h3 {
  font-size: 0.9em;
  font-weight: 700;
  color: var(--btc-orange, #F7931A);
  margin: 0 0 8px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btc-list-wrapper {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px;
}

#btc-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Conversor */
.converter-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.converter-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.converter-actions {
  display: flex;
  gap: 6px;
}

.converter-actions .btn-custom {
  font-size: 0.83em;
  padding: 6px 14px;
}

/* Controles principais - ajuste do h3 */
.controles-principais-card h3 {
  font-size: 0.88em !important;
  font-weight: 700 !important;
  color: #2e7d32 !important;
  margin: 0 0 8px !important;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Selecao linhas h3 */
.selecao-linhas-card h3 {
  font-size: 0.88em !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  margin: 8px 0 4px !important;
  display: flex;
  align-items: center;
  gap: 4px;
}

.selecao-linhas-card h2 small {
  font-size: 0.78em;
  font-weight: 400;
  opacity: 0.75;
  margin-left: 3px;
}