/* ==========================================================================
   ABOBI FERRAMENTAS - DESIGN DIRECT, CLEAN & UPPERCASE (2026)
   Estilo Ultra Clean, 100% Responsivo, Letras Maiúsculas e Acentuação Perfeita.
   ========================================================================== */

:root {
  /* Dark Mode Palette */
  --bg-main: #0a0e17;
  --bg-card: #131b2e;
  --bg-input: #1a243b;
  --border-color: #24304d;
  --border-focus: #3b82f6;

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-green: #10b981;
  --accent-cyan: #06b6d4;
  --accent-danger: #ef4444;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --font-main: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.15s ease-in-out;
}

html.light {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  --border-color: #cbd5e1;
  --border-focus: #2563eb;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-green: #059669;
  --accent-cyan: #0891b2;
  --accent-danger: #dc2626;
}

/* Reset Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Maiúsculas só na navegação/títulos/botões (identidade visual "direta").
   Texto corrido (descrições, dados gerados, mensagens) fica em caixa normal
   para não cansar a leitura em blocos longos de texto. */
h1, h2, h3, h4 {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

input, textarea, pre, code {
  text-transform: none;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.font-mono {
  font-family: var(--font-mono);
}

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

/* Direct Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: color-mix(in srgb, var(--bg-card) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}

.brand-badge {
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

/* Search Input Box */
.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  background:
    radial-gradient(60% 100% at 15% 0%, color-mix(in srgb, var(--accent-primary) 16%, transparent), transparent 70%),
    radial-gradient(50% 80% at 100% 0%, color-mix(in srgb, var(--accent-cyan) 12%, transparent), transparent 70%),
    var(--bg-main);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 20px 48px 20px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 30%, transparent);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.hero-title-accent {
  background: linear-gradient(100deg, var(--accent-primary), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: none;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero-stat strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
}

.hero-stat span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .hero-inner { padding: 44px 18px 36px 18px; }
  .hero-stats { gap: 20px 28px; }
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px 20px;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
  padding-bottom: 4px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  text-transform: uppercase;
}

.tab-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.tab-btn.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* Ad Spaces */
.ad-container {
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 24px;
}

.ad-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* Grid Layout for Tools */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -12px color-mix(in srgb, var(--accent-primary) 45%, transparent);
}

.tool-card:hover .tool-card-icon {
  background: color-mix(in srgb, var(--accent-primary) 16%, transparent);
  color: var(--accent-primary);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 16px;
  transition: var(--transition);
}

.tool-card-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.tool-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.tool-card-action {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 6px 20px -8px color-mix(in srgb, var(--accent-primary) 70%, transparent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent-primary) 80%, transparent);
}

.btn-secondary {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Forms & Outputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.output-box {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
}

/* Active Tool Box */
.tool-view-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.5);
  animation: tool-fade-in 0.25s ease;
}

@keyframes tool-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tool-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.toast {
  background-color: var(--bg-card);
  border: 2px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 24px;
}

.hidden {
  display: none !important;
}

/* Footer */
.footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 20px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.footer a {
  color: var(--accent-primary);
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container { flex-wrap: wrap; }
  .search-wrapper { order: 3; max-width: 100%; }
  .tool-view-card { padding: 18px; }
  .brand-badge { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 16px 14px 40px 14px; }
  .tools-grid { grid-template-columns: 1fr; }
  #video-download-buttons,
  .tool-view-card div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .btn { font-size: 0.82rem; padding: 11px 16px; }
}
