@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg-color: #fdfbff;
  --surface-color: #f5f3ff;
  --primary-text-color: #2c2a3e;
  --secondary-text-color: #7a798c;
  --accent-gradient: linear-gradient(135deg, #a78bfa, #c4b5fd);
  --accent-color-primary: #8b5cf6;
  --accent-color-secondary: #c4b5fd;
  --border-color: #e0ddee;
  --shadow-color: rgba(139, 92, 246, 0.05);
  --shadow-color-hover: rgba(139, 92, 246, 0.12);
  --font-family-main: 'Poppins', sans-serif;
  --font-family-mono: 'JetBrains Mono', monospace;
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 70px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family-main);
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--primary-text-color);
  line-height: 1.6;
  font-size: 14px;
  padding-top: var(--header-height);
}

.body-no-scroll {
  overflow: hidden;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

*::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none;
}

.api-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 0;
  color: var(--secondary-text-color);
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.api-loader p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.report-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.2rem 0;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  text-align: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #6d28d9;
}

.report-section p {
  line-height: 1.4;
}

.report-link {
  color: var(--accent-color-primary);
  border-bottom: 1px solid transparent;
  transition: var(--transition-smooth);
}

.report-link:hover {
  color: #6d28d9;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(253, 251, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo-link {
  text-decoration: none;
}

.logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary-text-color);
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--secondary-text-color);
}

.nav {
  display: none;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--secondary-text-color);
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--primary-text-color);
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1200;
}

.hamburger-menu span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--primary-text-color);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 1100;
}

.mobile-nav-overlay.active {
  transform: translateY(0);
}

.mobile-nav-close {
  position: absolute;
  top: 13px;
  right: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--primary-text-color);
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.mobile-nav-menu a {
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary-text-color);
}

.mobile-nav-menu a:hover {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.docs-header {
  margin-top: 2rem;
  padding: 1.5rem;
  text-align: left;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.header-logo {
  width: 36px;
  height: 36px;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.title-badge {
  position: relative;
  top: -0.5em;
  margin-left: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-description {
  font-size: 0.9rem;
  color: var(--secondary-text-color);
  padding-left: calc(36px + 0.75rem);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 1.2rem 0.8rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: var(--transition-smooth);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s ease forwards;
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px var(--shadow-color-hover);
}

.stat-item:nth-child(2) {
  animation-delay: 0.1s;
}

.stat-item:nth-child(3) {
  animation-delay: 0.2s;
}

.stat-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 0.4rem;
  color: var(--accent-color-primary);
  opacity: 0.9;
}

.stat-number {
  margin-bottom: 0.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-family-mono);
  line-height: 1.2;
  color: var(--primary-text-color);
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.6px;
  color: var(--secondary-text-color);
  text-transform: uppercase;
}

.search-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.search-wrapper::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-color: var(--secondary-text-color);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: var(--transition-smooth);
}

#search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  font-size: 0.95rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

#search-input:focus {
  outline: none;
  border-color: var(--accent-color-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

#search-input:focus + .search-wrapper::before {
  background-color: var(--accent-color-primary);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem 0.5rem;
  cursor: pointer;
  user-select: none;
}

.category-header h2 {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-text-color);
  text-transform: capitalize;
  transition: color 0.3s ease;
}

.category-header h2::before {
  content: '';
  width: 5px;
  height: 22px;
  margin-right: 14px;
  background-color: var(--border-color);
  border-radius: 5px;
  transition: var(--transition-smooth);
}

.category-header .chevron {
  color: var(--secondary-text-color);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-header.collapsed .chevron {
  transform: rotate(-90deg);
}

.category-header:not(.collapsed) h2 {
  color: var(--accent-color-primary);
}

.category-header:not(.collapsed) h2::before {
  background: var(--accent-gradient);
  box-shadow: 0 2px 10px -2px var(--accent-color-secondary);
}

.category-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-content.expanded {
  grid-template-rows: 1fr;
}

.endpoint-list {
  overflow: hidden;
}

.endpoint-item {
  margin-top: 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: var(--transition-smooth);
}

.endpoint-item.active {
  border-color: var(--accent-color-primary);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.15);
}

.endpoint-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.endpoint-summary .chevron {
  margin-left: auto;
  transition: var(--transition-smooth);
}

.endpoint-item.active .endpoint-summary .chevron {
  transform: rotate(90deg);
  color: var(--accent-color-primary);
}

.endpoint-method {
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-family-mono);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.endpoint-method.get {
  background-color: #eef2ff;
  color: #4f46e5;
}

.endpoint-method.post {
  background-color: #f0fdf4;
  color: #16a34a;
}

.endpoint-method.put {
  background-color: #fefce8;
  color: #a16207;
}

.endpoint-method.delete {
  background-color: #fff1f2;
  color: #be123c;
}

.endpoint-path {
  flex-grow: 1;
  font-size: 0.9rem;
  font-family: var(--font-family-mono);
  color: var(--primary-text-color);
  word-break: break-all;
}

.endpoint-details {
  display: none;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.endpoint-main-description {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--secondary-text-color);
  border-bottom: 1px solid var(--border-color);
}

.param {
  margin-bottom: 1rem;
}

.param-info {
  margin-bottom: 0.5rem;
}

.param-label {
  font-weight: 500;
}

.param-required {
  color: #db2777;
  font-size: 0.85rem;
}

.param-description {
  font-size: 0.85rem;
  color: var(--secondary-text-color);
}

.param input[type='text'] {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.9rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.param input[type='text']:focus {
  outline: none;
  border-color: var(--accent-color-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.file-input-wrapper {
  position: relative;
  width: 100%;
}

.file-input-hidden {
  display: none;
}

.file-input-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background-color: var(--surface-color);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.file-input-label:hover,
.file-input-wrapper.drag-over .file-input-label {
  border-color: var(--accent-color-primary);
  background-color: #ede9fe;
  color: var(--accent-color-primary);
}

.file-input-label i {
  width: 28px;
  height: 28px;
  margin-bottom: 0.5rem;
  color: var(--secondary-text-color);
  transition: var(--transition-smooth);
}

.file-input-label:hover i,
.file-input-wrapper.drag-over .file-input-label i {
  color: var(--accent-color-primary);
}

.file-input-label span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary-text-color);
  transition: var(--transition-smooth);
}

.file-input-label:hover span,
.file-input-wrapper.drag-over .file-input-label span {
  color: var(--accent-color-primary);
}

.file-input-name {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-family-mono);
  color: var(--secondary-text-color);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-input-name.has-file {
  font-weight: 500;
  color: var(--primary-text-color);
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.execute-btn {
  color: white;
  background: var(--accent-gradient);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.execute-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.3);
}

.execute-btn:disabled {
  background: var(--secondary-text-color);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.clear-btn {
  color: var(--primary-text-color);
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
}

.clear-btn:hover {
  background-color: #ede9fe;
}

.response-section {
  display: none;
  margin-top: 1.5rem;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.response-status {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-family-mono);
  border-radius: var(--radius-sm);
}

.status-success {
  color: #4ade80;
}

.status-error {
  color: #f87171;
}

.request-info-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.request-info-block {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.request-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  background-color: #334155;
}

.request-info-header h4 {
  display: flex;
  flex-grow: 1;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #cbd5e1;
  text-transform: uppercase;
}

.copy-btn {
  width: auto;
  padding: 0.4rem;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: #94a3b8;
}

.copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.request-info-block code {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-family: var(--font-family-mono);
  color: #f1f5f9;
  white-space: pre;
  word-break: break-all;
  overflow-x: auto;
}

.copy-btn[data-copied='true'] {
  color: #4ade80;
}

.loader-wrapper,
.main-loader {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

.loader {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color-primary);
  border-radius: 50%;
  animation: rotation 0.8s linear infinite;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: rotation 0.6s linear infinite;
}

.footer {
  margin-top: 2rem;
  padding: 2.5rem 0;
  font-size: 0.9rem;
  text-align: center;
  color: var(--secondary-text-color);
  border-top: 1px solid var(--border-color);
}

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

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (min-width: 769px) {
  .nav {
    display: block;
  }
  .hamburger-menu {
    display: none;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    gap: 0.6rem;
  }
  .stat-item {
    min-height: 90px;
    padding: 1rem 0.5rem;
  }
  .stat-icon {
    width: 20px;
    height: 20px;
  }
  .stat-number {
    font-size: 1rem;
  }
  .stat-label {
    font-size: 0.65rem;
  }
}
