:root {
   --primary-color: #00d4ff; /* Azul Neon */
   --secondary-color: #07013D; /* Azul Escuro NAI */
   --dark-bg: #050505;
   --card-bg: rgba(255, 255, 255, 0.05);
   --code-bg: #101014;
   --text-color: #ffffff;
   --text-muted: #a0a0a0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
   font-family: 'Roboto', sans-serif;
   background-color: var(--dark-bg);
   color: var(--text-color);
   overflow-x: hidden;
   line-height: 1.6;
}

/* Fontes */
h1, h2, .logo, .terminal-title { font-family: 'Orbitron', sans-serif; text-transform: uppercase; }
code, pre { font-family: 'Fira Code', monospace; }

/* Background */
.video-background {
   position: fixed; top: 0; left: 0; width: 100%; height: 100%;
   z-index: -1;
   background: radial-gradient(circle, #1a1a2e 0%, #000000 100%);
}
.overlay {
   position: absolute; top: 0; left: 0; width: 100%; height: 100%;
   background: rgba(0, 0, 0, 0.75);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header Desktop */
header { padding: 20px 0; position: absolute; width: 100%; z-index: 100; transition: 0.3s; }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 900; letter-spacing: 2px; }
.highlight { color: var(--primary-color); }

nav ul { list-style: none; display: flex; gap: 20px; align-items: center; }
nav a { text-decoration: none; color: white; font-weight: 500; transition: 0.3s; font-size: 0.95rem; }
nav a:hover { color: var(--primary-color); }
.btn-api {
   border: 1px solid var(--primary-color);
   padding: 8px 15px; border-radius: 4px;
   font-size: 0.9rem;
}
.btn-api:hover { background: var(--primary-color); color: black; }

/* Badge Tecnológico */
.tech-badge {
   display: inline-block;
   position: relative;
   z-index: 1;
   background: rgba(0, 212, 255, 0.1);
   border: 1px solid var(--primary-color);
   color: var(--primary-color);
   padding: 5px 12px;
   border-radius: 20px;
   font-size: 0.8rem;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 1px;
   margin-bottom: 20px;
   box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
   animation: fadeIn 1s ease-out;
}

/* Hero Section */
.hero {
   min-height: 100vh;
   display: flex; align-items: center; justify-content: center;
   text-align: center;
   padding-top: 80px;
}
.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.neon-text {
   color: transparent;
   -webkit-text-stroke: 1px var(--primary-color);
   text-shadow: 0 0 15px var(--primary-color);
}
.hero .subtitle {
   font-size: 1.25rem; color: var(--text-muted); margin-bottom: 40px;
   max-width: 700px; margin-left: auto; margin-right: auto;
}

/* Botões */
.cta-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 40px; }
.btn {
   padding: 15px 30px; font-size: 1rem; font-weight: bold;
   text-decoration: none; border-radius: 5px; transition: 0.3s;
}
.btn-primary {
   background-color: var(--primary-color); color: black;
   box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(0, 212, 255, 0.6); }
.btn-outline { border: 2px solid white; color: white; }
.btn-outline:hover { background: white; color: black; }

/* Code Showcase */
.code-showcase { padding: 80px 0; background: rgba(0,0,0,0.3); }
.code-showcase h2 { text-align: center; margin-bottom: 10px; font-size: 2.5rem; color: white; }
.section-desc { text-align: center; color: var(--text-muted); margin-bottom: 50px; }

.code-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 30px;
   align-items: stretch;
}

.terminal-window {
   background: var(--code-bg);
   border-radius: 8px;
   box-shadow: 0 10px 30px rgba(0,0,0,0.5);
   overflow: hidden;
   border: 1px solid #333;
}

.terminal-header {
   background: #1e1e1e;
   padding: 10px 15px;
   display: flex;
   align-items: center;
   border-bottom: 1px solid #333;
}
.dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; display: inline-block; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.terminal-title { margin-left: auto; color: #888; font-size: 0.8rem; font-family: monospace; }

.code-content { padding: 20px; overflow-x: auto; }
.code-content pre { margin: 0; color: #f8f8f2; font-size: 0.9rem; }

/* Syntax Highlighting */
.keyword { color: #ff79c6; }
.string { color: #f1fa8c; }
.number { color: #bd93f9; }
.key { color: #8be9fd; }

/* Features */
.features { padding: 100px 0; background: var(--secondary-color); }
.features h2 { text-align: center; margin-bottom: 60px; font-size: 2.5rem; }
.grid-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.card {
   background: var(--card-bg);
   padding: 30px;
   border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);
   transition: 0.3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--primary-color); }
.card h3 { color: var(--primary-color); margin-bottom: 15px; font-family: 'Orbitron', sans-serif; }
.card p { color: #ccc; font-size: 0.95rem; }

/* FAQ Section */
.faq-section { padding: 80px 0; background: var(--dark-bg); }
.faq-section h2 { text-align: center; margin-bottom: 50px; font-size: 2.5rem; }
.faq-grid { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

.faq-item {
   background: var(--card-bg);
   border: 1px solid rgba(255,255,255,0.05);
   border-radius: 8px;
   overflow: hidden;
   transition: 0.3s;
}
.faq-item[open] { border-color: var(--primary-color); background: rgba(0, 212, 255, 0.02); }
.faq-item summary {
   padding: 20px;
   cursor: pointer;
   font-weight: bold;
   list-style: none; /* Esconde triângulo padrão */
   position: relative;
   padding-right: 40px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
   content: '+';
   position: absolute; right: 20px; color: var(--primary-color); font-size: 1.5rem; line-height: 1;
}
.faq-item[open] summary::after { content: '-'; }
.faq-item p { padding: 0 20px 20px 20px; color: #ccc; margin-top: -10px; }

/* Footer */
footer { padding: 40px 0; text-align: center; background: #000; color: #555; font-size: 0.9rem; border-top: 1px solid #111; }
footer a { color: #777; text-decoration: none; }
footer a:hover { color: var(--primary-color); }

.footer-about {
   margin-bottom: 15px;
   color: #667;
   font-size: 0.85rem;
   max-width: 700px;
   margin-left: auto;
   margin-right: auto;
}

/* Animações */
.fade-in { animation: fadeIn 1s ease-out forwards; opacity: 0; }
.fade-in-delay { animation: fadeIn 1s ease-out 0.3s forwards; opacity: 0; }
.fade-in-delay-2 { animation: fadeIn 1s ease-out 0.6s forwards; opacity: 0; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   RESPONSIVIDADE E CORREÇÃO MOBILE (FINAL AJUSTADO)
   ========================================= */
@media (max-width: 768px) {
   
   /* Header: Mantém fundo escuro para leitura */
   header {
      background: rgba(0, 0, 0, 0.9);
      padding: 15px 0;
      /* Se necessário, force position relative aqui, mas o absolute com padding na hero costuma ser mais fluido */
   }

   .header-content {
      flex-direction: column;
      gap: 15px;
   }

   /* HERO: Calibragem Fina */
   .hero {
      /* Reduzido de 280px para 160px. 
         Se ainda achar alto, tente 140px. Se sobrepor, aumente para 180px. */
      padding-top: 160px; 
      
      align-items: flex-start;
      justify-content: flex-start;
      height: auto;
      min-height: auto;
   }

   .hero .container {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding-bottom: 60px;
   }

   /* Badge */
   .tech-badge {
      margin-top: 0; /* Removemos a margem extra para ele subir */
      margin-bottom: 15px;
      font-size: 0.7rem;
      padding: 5px 15px;
      white-space: normal;
      line-height: 1.4;
      border: none; /* Garante que não tenha borda de debug */
   }

   /* Títulos e Textos */
   .hero h1 {
      font-size: 2rem;
      margin-bottom: 20px;
      line-height: 1.3;
   }

   nav ul {
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
   }
   
   nav a {
      font-size: 0.85rem;
      padding: 5px;
      background: rgba(255,255,255,0.05);
      border-radius: 4px;
   }

   .cta-buttons { flex-direction: column; width: 100%; max-width: 300px; }
   .code-grid { grid-template-columns: 1fr; }
}

/* =========================================
   PÁGINA DE DOCUMENTAÇÃO docs.html
   ========================================= */
.docs-layout {
   display: grid;
   grid-template-columns: 250px 1fr;
   min-height: 100vh;
   padding-top: 80px; /* Espaço para o header fixo */
}

/* Sidebar de Navegação */
.docs-sidebar {
   background: var(--code-bg);
   border-right: 1px solid #333;
   padding: 30px 20px;
   position: sticky;
   top: 80px;
   height: calc(100vh - 80px);
   overflow-y: auto;
}

.docs-sidebar h3 {
   color: var(--text-muted);
   font-size: 0.9rem;
   text-transform: uppercase;
   margin-bottom: 15px;
   letter-spacing: 1px;
}

.docs-nav ul {
   flex-direction: column;
   align-items: flex-start;
   gap: 10px;
}

.docs-nav a {
   color: #ccc;
   font-family: 'Fira Code', monospace;
   font-size: 0.9rem;
   display: block;
   width: 100%;
   padding: 8px 10px;
   border-radius: 4px;
}

.docs-nav a:hover, .docs-nav a.active {
   background: rgba(0, 212, 255, 0.1);
   color: var(--primary-color);
   border-left: 3px solid var(--primary-color);
}

/* Área de Conteúdo */
.docs-content {
   padding: 40px 60px;
   background: var(--dark-bg);
}

.docs-content h1 {
   font-size: 2.5rem;
   margin-bottom: 20px;
   color: white;
}

.docs-content h2 {
   margin-top: 50px;
   margin-bottom: 20px;
   color: var(--primary-color);
   border-bottom: 1px solid #333;
   padding-bottom: 10px;
}

.docs-content p {
   margin-bottom: 15px;
   color: #ccc;
   max-width: 800px;
}

.docs-content .endpoint-badge {
   background: #333;
   padding: 5px 10px;
   border-radius: 4px;
   font-family: 'Fira Code', monospace;
   color: var(--primary-color);
   border: 1px solid var(--primary-color);
}

/* Responsividade Docs */
@media (max-width: 768px) {
   .docs-layout {
      grid-template-columns: 1fr;
   }
   .docs-sidebar {
      position: relative;
      height: auto;
      border-right: none;
      border-bottom: 1px solid #333;
      top: 0;
   }
   .docs-content {
      padding: 30px 20px;
   }
}