:root {
  /* Cores Base */
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --primary-color: #3fba54;
  --secondary-bg: #1f1f1f;
  --border-color: rgba(255,255,255,0.1);
  --hover-bg: rgba(63, 186, 84, 0.1);
  
  /* Tipografia */
  --font-body: 'Poppins', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  
  /* Espaçamentos */
  --sidebar-width: 300px;
  --radius: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #333333;
  --secondary-bg: #f8f9fa;
  --border-color: rgba(0,0,0,0.1);
  --hover-bg: rgba(63, 186, 84, 0.05);
}

/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: var(--transition);
}

/* Layout Principal */
.container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  background: var(--secondary-bg);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
  transition: transform 0.3s ease-out;
}

.logo-container {
  position: relative;
  margin-bottom: 40px;
  padding: 0 15px;
}

.logo-container img {
  height: 40px;
  transition: var(--transition);
}

.logo-dark { display: none; }
[data-theme="light"] .logo-light { display: none; }
[data-theme="light"] .logo-dark { display: block; }

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  transition: transform 0.3s;
}

.theme-toggle:hover {
  transform: rotate(180deg);
}

/* Navegação */
.doc-nav {
  margin-top: 20px;
}

.main-menu {
  list-style: none;
}

.menu-item {
  margin-bottom: 10px;
}

.menu-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-color);
  padding: 12px 15px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-heading:hover {
  background: var(--hover-bg);
}

.menu-heading::after {
  content: '▾';
  font-size: 1.2em;
}

.submenu {
  list-style: none;
  padding-left: 20px;
  display: none;
  animation: slideDown 0.3s ease;
}

.submenu li {
  margin: 8px 0;
}

.submenu a {
  color: var(--text-color);
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  border-radius: var(--radius);
  font-size: 0.95em;
  transition: var(--transition);
}

.submenu a:hover,
.submenu a.active {
  background: var(--hover-bg);
  color: var(--primary-color);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Conteúdo Principal */
.content {
  flex: 1;
  padding: 40px;
  margin-left: var(--sidebar-width);
  max-width: 800px;
}

.doc-section {
  background: var(--secondary-bg);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  animation: fadeIn 0.4s ease;
}

.doc-section h2 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 25px;
  font-size: 1.8em;
}

/* Componentes */
.endpoint {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 25px 0;
  padding: 15px;
  background: rgba(63, 186, 84, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.method {
  padding: 6px 12px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

.method.get { background: #4CAF50; color: white; }
.method.post { background: #2196F3; color: white; }
.method.delete { background: #f44336; color: white; }

pre {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  overflow-x: auto;
  position: relative;
  font-size: 0.95em;
}

pre code {
  font-family: 'Fira Code', monospace;
  color: var(--text-color);
}

/* Listas */
.param-list {
  list-style: none;
  margin: 20px 0;
}

.param-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  gap: 10px;
}

.param-list code {
  color: var(--primary-color);
  font-weight: 500;
}

.response-list {
  list-style: none;
}

.response-list li {
  padding: 15px;
  margin: 10px 0;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.code {
  display: inline-block;
  min-width: 70px;
  font-weight: 700;
  color: var(--primary-color);
}

/* Mobile First */
.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.close-menu {
  display: none;
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 2em;
  line-height: 1;
  cursor: pointer;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}

/* Media Queries */
@media (max-width: 1024px) {
  .content {
    padding: 30px;
    margin-left: 0;
    max-width: 100%;
  }
  
  .sidebar {
    width: 280px;
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 4px 0 15px rgba(0,0,0,0.2);
  }

  .menu-toggle {
    display: block;
  }

  .close-menu {
    display: block;
  }

  .overlay.active {
    display: block;
  }

  .logo-container {
    margin-bottom: 20px;
    padding-top: 15px;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 20px;
  }
  
  .doc-section {
    padding: 20px;
  }
  
  .endpoint {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  pre {
    font-size: 0.85em;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 100%;
  }

  .doc-section h2 {
    font-size: 1.5em;
  }

  .method {
    font-size: 0.75em;
    padding: 4px 8px;
  }

  .param-list li {
    flex-direction: column;
    gap: 5px;
  }

  pre {
    padding: 12px;
    font-size: 0.8em;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}