* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background-color: rgba(249, 115, 22, 0.2);
  color: rgba(251, 146, 60, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  min-height: 100vh;
  background: 
    radial-gradient(circle at 0% 0%, rgba(255, 97, 0, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(255, 97, 0, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #111827 0%, #1e1b18 100%);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  padding: 2rem 1rem 5rem;
}

/* Background particles */
.background-particles {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  top: 0;
  left: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(249, 115, 22, 0.3);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 3s; }
.particle:nth-child(8) { left: 80%; animation-delay: 5s; }

@keyframes float {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
}

.back-button {
  display: inline-block;
  background: linear-gradient(to right, rgb(249, 115, 22), rgb(234, 88, 12));
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.back-button:hover {
  background: linear-gradient(to right, rgb(234, 88, 12), rgb(194, 65, 12));
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
}

.title {
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.9);
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: rgba(251, 146, 60, 1);
  font-weight: 500;
}

/* Table of Contents */
.toc {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.08));
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.toc-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.toc-link {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  display: block;
}

.toc-link:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

/* Documentation Container */
.doc-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Category Section */
.doc-category {
  scroll-margin-top: 2rem;
}

.category-title {
  font-size: 2rem;
  font-weight: 600;
  color: rgba(251, 146, 60, 1);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(249, 115, 22, 0.3);
}

/* Documentation Section */
.doc-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.doc-section:hover {
  border-color: rgba(249, 115, 22, 0.2);
}

.doc-section.info {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(234, 88, 12, 0.06));
  border-color: rgba(249, 115, 22, 0.2);
}

/* Documentation Header */
.doc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.method {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.method.get {
  background: linear-gradient(135deg, rgb(34, 197, 94), rgb(22, 163, 74));
  color: white;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.endpoint {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 1.125rem;
  color: rgba(251, 146, 60, 1);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
}

.doc-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

/* Documentation Subsection */
.doc-subsection {
  margin-top: 1.5rem;
}

.doc-subsection h3 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(251, 146, 60, 1);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

/* Code Block */
.code-block {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  white-space: pre;
}

.code-block::-webkit-scrollbar {
  height: 8px;
}

.code-block::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.5);
  border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.7);
}

/* Parameter List */
.param-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.param-list li {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid rgba(249, 115, 22, 0.5);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  line-height: 1.6;
}

.param-list li code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  color: rgba(251, 146, 60, 1);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.param-type {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  color: rgb(147, 197, 253);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

.required {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  color: rgb(252, 165, 165);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

.optional {
  display: inline-block;
  background: rgba(34, 197, 94, 0.2);
  color: rgb(134, 239, 172);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

.note {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid rgb(59, 130, 246);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  line-height: 1.6;
}

.note code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  color: rgba(251, 146, 60, 1);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

/* Info List */
.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-list li {
  padding-left: 1.75rem;
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.info-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: rgba(249, 115, 22, 1);
  font-weight: 700;
  font-size: 1.125rem;
}

/* Language Grid */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.lang-tag {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(251, 146, 60, 1);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.lang-tag .lang-name {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  z-index: 10;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
  }
  
  .toc-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    padding: 1.5rem 1rem 4rem;
  }

  .header {
    margin-bottom: 2rem;
  }

  .doc-container {
    gap: 2rem;
  }

  .category-title {
    font-size: 1.5rem;
  }

  .doc-section {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }

  .toc {
    padding: 1.5rem;
  }

  .toc-title {
    font-size: 1.25rem;
  }

  .toc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .toc-link {
    padding: 0.875rem;
    font-size: 0.875rem;
  }

  .doc-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .method {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }

  .endpoint {
    font-size: 0.9375rem;
    padding: 0.5rem 0.875rem;
    width: 100%;
  }

  .code-block {
    font-size: 0.8125rem;
    padding: 1rem;
  }

  .lang-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .lang-tag {
    padding: 0.875rem;
  }

  .param-list li {
    padding: 0.875rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1rem 0.75rem 4rem;
  }

  .header {
    margin-bottom: 1.5rem;
  }

  .back-button {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
  }

  .doc-container {
    gap: 1.5rem;
  }

  .category-title {
    font-size: 1.25rem;
  }

  .doc-section {
    padding: 1.25rem;
  }

  .toc {
    padding: 1.25rem;
  }

  .toc-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }

  .toc-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .toc-link {
    padding: 0.75rem;
    font-size: 0.8125rem;
  }

  .endpoint {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  .code-block {
    font-size: 0.75rem;
    padding: 0.875rem;
  }

  .lang-grid {
    grid-template-columns: 1fr;
  }

  .info-list li {
    font-size: 0.875rem;
  }
}
