/* Tema Dark (padrão) */
:root {
  --bg: #0b0d10;
  --bg-elev: #111418;
  --border: #1b2026;
  --text: #e6e8eb;
  --muted: #98a2b3;
  --primary: #6ee7b7;
  --primary-600: #34d399;
  --danger: #ef4444;
  --toggle-bg: #232a32;
  --toggle-active: #34d399;
  --toggle-inactive: #6b7280;
  
  /* Gradientes e efeitos modernos */
  --gradient-primary: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%);
  --gradient-bg: linear-gradient(135deg, #0b0d10 0%, #111418 100%);
  --gradient-card: linear-gradient(145deg, #111418 0%, #1a1f24 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(110, 231, 183, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Tema Light */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #059669;
  --primary-600: #047857;
  --danger: #dc2626;
  --toggle-bg: #e2e8f0;
  --toggle-active: #059669;
  --toggle-inactive: #94a3b8;
  
  /* Gradientes e efeitos modernos para Light */
  --gradient-primary: linear-gradient(135deg, #059669 0%, #047857 100%);
  --gradient-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --gradient-card: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;background:var(--gradient-bg);color:var(--text);-webkit-font-smoothing:antialiased;overflow:hidden;transition:all 0.3s ease}

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

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Classes de animação */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}
.container{max-width:1100px;margin:0 auto;padding:32px 16px;display:flex;flex-direction:column;transform-origin:top center}
.header h1{margin:0 0 4px 0;font-weight:700;letter-spacing:.2px}
.subtitle{margin:0;color:var(--muted)}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:24px}
@media (max-width:980px){.grid{grid-template-columns:1fr}}
.card{
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}
.card-title{margin:0 0 12px 0;font-size:16px}
.form{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field{display:flex;flex-direction:column;gap:6px}
.two-col{grid-column:span 1}
.vsl-group{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.field.inline{flex-direction:row;align-items:center;gap:10px}
label{font-size:12px;color:var(--muted)}
input,select{
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

input:focus,select:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.1), var(--shadow-md);
  transform: translateY(-1px);
}

input:hover,select:hover{
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.preview{
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
}

.preview:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.preview.invalid{
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.preview-text{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  word-break: break-word;
  background: var(--bg-elev);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  /* Desabilita seleção de texto */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Desabilita menu de contexto */
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.preview-text:hover {
  box-shadow: var(--shadow-sm);
}
.preview-actions{display:flex;gap:8px}
.btn{
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  font-size: 14px;
}

.btn::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:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btn:disabled{
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* Loading state para botões */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Efeito de shimmer para loading */
.shimmer {
  background: linear-gradient(90deg, 
    var(--bg-elev) 25%, 
    rgba(255, 255, 255, 0.1) 50%, 
    var(--bg-elev) 75%
  );
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Toast de notificação */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--gradient-primary);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.toast.show {
  transform: translateX(0);
}

.toast::before {
  content: '✅';
  margin-right: 8px;
  font-size: 16px;
}

/* Efeito de partículas para o botão copiar */
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  animation: sparkle 0.6s ease-out;
}

/* Melhorias no footer */
.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 16px 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--glass-border);
}

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

.site-footer a:hover {
  color: var(--primary-600);
  text-decoration: underline;
}
.helper{margin-top:12px;color:var(--muted);font-size:14px}
.footer{margin-top:24px;color:var(--muted)}
.container > main{flex:1}
.site-footer{text-align:center;color:var(--muted);padding:12px 0;position:fixed;left:0;right:0;bottom:0;margin-top:0}

#pageRoot{min-height:100vh;width:100vw;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-bottom:48px}

.tabs{display:flex;gap:8px;margin:8px 0 16px}
.tabs button{
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
  backdrop-filter: blur(10px);
}

.tabs button:hover{
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.tabs button.active{
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.tabs button.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.switch{position:relative;display:inline-block;width:42px;height:24px}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:var(--toggle-bg);transition:.2s;border-radius:999px;border:1px solid var(--border)}
.slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:2px;background:white;transition:.2s;border-radius:50%}
input:checked + .slider{background:var(--primary-600)}
input:checked + .slider:before{transform:translateX(18px)}

/* Toggle de tema estilizado */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 60px;
  height: 32px;
}

.theme-toggle:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(110, 231, 183, 0.15), var(--shadow-glow);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.98);
}

.theme-toggle-icon {
  position: absolute;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  font-size: 12px;
  z-index: 2;
}

.theme-toggle-icon.sun {
  left: 3px;
  top: 3px;
  background: var(--toggle-inactive);
  color: var(--bg);
  opacity: 0.7;
}

.theme-toggle-icon.moon {
  right: 3px;
  top: 3px;
  background: var(--toggle-inactive);
  color: var(--bg);
  opacity: 0.7;
}

.theme-toggle.active .theme-toggle-icon.moon {
  opacity: 1;
  background: var(--primary);
  transform: scale(1.1);
}

.theme-toggle.active .theme-toggle-icon.sun {
  opacity: 0.3;
}

.theme-toggle:not(.active) .theme-toggle-icon.moon {
  opacity: 0.3;
}

.theme-toggle:not(.active) .theme-toggle-icon.sun {
  opacity: 1;
  background: var(--primary);
  transform: scale(1.1);
}
.hint{color:var(--danger);margin:0}

/* Tooltip styles */
.field-with-tooltip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tooltip-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
  cursor: help;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tooltip-icon:hover {
  background: var(--text);
  transform: scale(1.1);
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  min-width: 200px;
  max-width: 300px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}

.tooltip-content.show {
  opacity: 1;
  visibility: visible;
}

.field-with-tooltip.active .tooltip-content {
  opacity: 1;
  visibility: visible;
}


