/* ==== GLOBAL RESET ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background: #0f0f10;
  color: #e6e6e6;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ==== HEADER ==== */
.header {
  background: #0f0f10;
  border-bottom: 1px solid #1f1f22;
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-content {
  max-width: 1400px;
  width: 100%;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: transparent;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
}

.search-container {
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: #18181a;
  border: 1px solid #232326;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  min-width: 280px;
  height: 42px;
}

.search-icon {
  color: #888;
  margin-right: 0.6rem;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #eee;
  font-size: 0.95rem;
}

.search-box input::placeholder {
  color: #888;
}

.shortcut {
  font-size: 0.75rem;
  color: #888;
  margin-left: 0.8rem;
  border: 1px solid #333;
  padding: 3px 8px;
  border-radius: 4px;
  background: #1a1a1c;
}

/* ==== CONTAINER ==== */
.docs-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 3rem;
}

/* ==== SIDEBAR ==== */
.sidebar {
  width: 240px;
  background: #0f0f10;
  color: #ccc;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  border-right: none;
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  font-weight: 700;
  color: #fff;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
}

.sidebar nav ul li {
  margin: 1rem 0;
}

.sidebar nav ul li a {
  color: #aaa;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: block;
  padding: 0.4rem 0;
  border-radius: 8px;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  background: none;
  color: #ff9800;
}

/* Powered Box */
.powered {
  margin-top: auto;
  padding: 1rem;
  background: #18181a;
  border: 1px solid #232326;
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: #999;
}

/* ==== CONTENT ==== */
.content {
  flex: 1;
  padding: 4rem 4rem;
  overflow-y: auto;
  background: #0f0f10;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.content h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #fff;
}

.copy-button-wrapper {
  position: relative;
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #18181a;
  border: 1px solid #232326;
  color: #aaa;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-button:hover {
  background: #232326;
  color: #fff;
}

.copy-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  min-width: 280px;
  padding: 4px;
  display: none;
  z-index: 1000;
  overflow: hidden;
}

.copy-button-wrapper.active .copy-dropdown {
  display: block;
}

.copy-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
  color: #fff;
}

.copy-dropdown-item:hover {
  background: #232326;
}

.copy-dropdown-item svg:first-child {
  flex-shrink: 0;
  color: #aaa;
}

.copy-dropdown-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.copy-dropdown-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
}

.copy-dropdown-item-desc {
  font-size: 0.85rem;
  color: #aaa;
}

.copy-dropdown-external {
  flex-shrink: 0;
  color: #666;
  margin-left: auto;
}

.copy-dropdown-item:hover .copy-dropdown-external {
  color: #aaa;
}

.content h2 {
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
  color: #ff9800;
  font-weight: 600;
}

.content h3 {
  font-size: 1.6rem;
  margin: 1.5rem 0 1rem;
  color: #fff;
  font-weight: 600;
}

.content p {
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #ccc;
}

/* Next Card */
.next-card {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: #18181a;
  border: 1px solid #232326;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.next-card:hover {
  background: #232326;
}

.next-content {
  display: flex;
  flex-direction: column;
}

.next-label {
  font-size: 0.95rem;
  color: #aaa;
  margin-bottom: 0.4rem;
}

.next-link {
  text-decoration: none;
  color: #ff9800;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.next-link:hover {
  color: #ffa726;
}

.next-arrow {
  color: #aaa;
  transition: color 0.2s ease;
}

.next-card:hover .next-arrow {
  color: #ff9800;
}

/* Footer */
footer {
  margin-top: 3.5rem;
  font-size: 0.85rem;
  color: #888;
  text-align: right;
}

/* ==== SIDEBAR NAVIGATION STYLES ==== */
.sidebar-nav-about {
  margin-bottom: 2.2rem;
}

.sidebar-nav-about a {
  color: #b3b3b3;
  font-weight: 400;
  font-size: 1.05rem;
  background: none;
  border-radius: 0;
  padding: 0;
  display: block;
  text-decoration: none;
}

.sidebar-nav-about a.active {
  color: #e6af1b;
  font-weight: 500;
}

.sidebar-nav-section {
  margin-bottom: 0.7rem;
}

.sidebar-nav-section span {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: block;
  text-align: left;
}

.sidebar-nav-item {
  margin: 1.2rem 0 0.3rem 0;
}

.sidebar-nav-link {
  color: #fff;
  font-size: 1.01rem;
  font-weight: 400;
  display: block;
  padding: 0.2rem 0 0.2rem 0;
  border-radius: 0;
  text-decoration: none;
}

.sidebar-nav-link.active {
  color: #e6af1b;
  font-weight: 500;
}

.sidebar-nav-link.inactive {
  color: #b3b3b3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-nav-link svg {
  margin-left: auto;
}

/* ==== LISTS ==== */
ul, ol {
  color: #ccc;
  line-height: 1.6;
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin: 0.5rem 0;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 900px) {
  .header {
    padding: 1rem;
  }
  .search-box {
    min-width: 180px;
  }
  .sidebar {
    width: 180px;
    padding: 1rem;
    border-right: none;
  }
  .content {
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .docs-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    padding: 0.7rem;
    border-right: none;
  }
  .content {
    padding: 0.7rem;
  }
}

/* ===== SEARCH RESULTS STYLES ===== */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  margin-top: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  background: #222;
  border-radius: 8px 8px 0 0;
}

.search-results-count {
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
}

.search-results-close {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.search-results-close:hover {
  background: #333;
  color: #fff;
}

.search-results-list {
  max-height: 320px;
  overflow-y: auto;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.search-result-item:hover {
  background: #2a2a2a;
}

.search-result-item.current-page {
  background: #1a2a1a;
  border-left: 3px solid #ff9800;
}

.search-result-item.current-page:hover {
  background: #1a3a1a;
}

.search-result-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.search-result-content {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.4;
  margin-bottom: 6px;
}

.search-result-url {
  font-size: 0.75rem;
  color: #666;
  font-family: 'Courier New', monospace;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: #888;
}

.search-no-results p {
  margin-bottom: 12px;
}

.search-no-results strong {
  color: #ff9800;
}

.search-suggestions {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}

.search-no-results ul {
  text-align: left;
  margin: 0;
  padding-left: 20px;
}

.search-no-results li {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 4px;
}

/* Destaque de texto pesquisado */
mark {
  background: #ff9800;
  color: #000;
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* Responsividade para pesquisa */
@media (max-width: 768px) {
  .search-results {
    left: -10px;
    right: -10px;
    margin-top: 4px;
  }
  
  .search-result-item {
    padding: 10px 12px;
  }
  
  .search-result-title {
    font-size: 0.9rem;
  }
  
  .search-result-content {
    font-size: 0.8rem;
  }
}

/* ===== MOBILE FOUNDATION ===== */
@media (max-width: 900px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .header-content,
  .docs-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header-content {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .header-left,
  .header-right,
  .search-container,
  .search-box {
    width: 100%;
  }

  .search-box {
    min-width: 0;
  }

  .docs-container {
    flex-direction: column;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    padding: 1rem 0 1.25rem;
    border-bottom: 1px solid #1f1f22;
  }

  .content {
    padding: 1.5rem 0 2rem;
  }

  .content-header,
  .next-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .copy-button-wrapper,
  .copy-button {
    width: 100%;
  }

  footer {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 1rem 0;
  }

  .content h1 {
    font-size: 1.8rem;
  }

  .content h3 {
    font-size: 1.35rem;
  }
}

