:root {
  --bg-base: #f5f5f5;
  --bg-surface: #ffffff;
  --bg-surface-2: #eaeaea;
  --border: #cccccc;
  --border-light: #dddddd;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #888888;
  --accent: #6c757d;
  --accent-light: #e9ecef;
  --accent-hover: #5a6268;
  --green: #28a745;
  --green-light: #d4edda;
  --red: #dc3545;
  --orange: #fd7e14;
  --orange-light: #fff3cd;
  --method-get: #28a745;
  --method-get-bg: #d4edda;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: 80px;
}

.floating-nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  pointer-events: none;
}

.nav-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 60px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.logo-fallback {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.logo-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--orange-light);
  color: var(--orange);
  border: 1px solid #e6d06a;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.nav-menu {
  display: flex;
  gap: 8px;
}

.nav-menu-item {
  padding: 6px 14px;
  border-radius: 30px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-menu-item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.nav-menu-item.active {
  background: var(--accent);
  color: white;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 30px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-secondary);
}

.mobile-menu {
  display: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 8px 16px 0;
  padding: 8px;
  box-shadow: var(--shadow-md);
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  z-index: 99;
  max-width: 1200px;
  margin: 8px auto 0;
  width: calc(100% - 32px);
}

.mobile-menu.active {
  display: flex;
  flex-direction: column;
}

.mobile-menu-item {
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-weight: 500;
}

.mobile-menu-item.active {
  background: var(--accent-light);
  color: var(--accent);
}

.main-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 32px;
}

.content-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.content-section.active {
  display: block;
}

.hero-section {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  margin-bottom: 32px;
  color: white;
  text-align: center;
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-highlight {
  background: linear-gradient(135deg, #a0a0a0, #c0c0c0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto 24px;
  opacity: 0.95;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-btn {
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-btn.primary {
  background: white;
  color: var(--accent);
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-btn.primary:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
}

.hero-btn.secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(5px);
}

.hero-btn.secondary:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  font-size: 28px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 12px;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.faq-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
}

.faq-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  padding: 16px;
  background: var(--bg-surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.faq-question:hover {
  background: #e0e0e0;
}

.faq-question.active {
  background: var(--accent-light);
  color: var(--accent);
}

.faq-question i {
  transition: transform 0.2s;
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--bg-surface);
}

.faq-answer.active {
  padding: 16px;
  max-height: 200px;
  border-top: 1px solid var(--border);
}

.search-container {
  margin: 24px 0 20px;
}

.search-wrapper-large {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-icon-large {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.search-input-large {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1px solid var(--border);
  border-radius: 60px;
  font-size: 15px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-large:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.15);
}

.category-slider-container {
  margin-bottom: 24px;
  overflow-x: auto;
}

.category-slider {
  display: flex;
  gap: 8px;
  padding: 4px 2px;
}

.category-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-btn i {
  font-size: 14px;
}

.category-btn:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.category-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.endpoint-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #b6d6f5;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.endpoint-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.endpoint-card:hover {
  box-shadow: var(--shadow-md);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  flex-wrap: wrap;
}

.endpoint-header:hover {
  background: #e0e0e0;
}

.endpoint-header.active {
  background: var(--accent-light);
  border-bottom-color: var(--accent);
}

.endpoint-header.active .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-icon {
  margin-left: auto;
  transition: transform 0.2s;
}

.method-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.method-badge.get {
  background: var(--method-get-bg);
  color: var(--method-get);
  border: 1px solid #aaefbb;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.endpoint-title {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 4px;
  flex: 1;
}

.http-status-info {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.info-header {
  padding: 10px 14px;
  background: var(--bg-surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.info-header i {
  transition: transform 0.2s;
}

.info-header.active i {
  transform: rotate(180deg);
}

.info-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--bg-surface);
}

.info-content.active {
  padding: 14px;
  max-height: 200px;
  border-top: 1px solid var(--border);
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.status-table th {
  text-align: left;
  padding: 6px 8px;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-weight: 600;
}

.status-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-light);
}

.status-code {
  font-family: var(--font-mono);
  font-weight: 600;
}

.endpoint-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  flex-wrap: wrap;
}

.url-display {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  word-break: break-all;
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
}

.copy-btn-sm {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  font-family: var(--font-sans);
}

.copy-btn-sm:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.copy-btn-sm.copied {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.try-section {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.param-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.param-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 80px;
}

.param-name .required {
  color: var(--red);
  font-size: 14px;
}

.param-input {
  flex: 1;
  min-width: 160px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.param-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.15);
}

.execute-btn {
  padding: 7px 16px;
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  font-family: var(--font-sans);
}

.execute-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.execute-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.no-param-text {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.result-box {
  margin-top: 10px;
  display: none;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e6edf3;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.result-box.visible {
  display: block;
  animation: fadeIn 0.2s ease;
}

.result-box .loading {
  color: #7d8590;
}

.result-box .error {
  color: #ff7b72;
}

.status-container {
  padding: 20px 0;
}

.status-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.status-card-icon {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 12px;
}

.status-card h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.status-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.status-label {
  font-size: 12px;
  color: var(--text-muted);
}

.faq-container {
  padding: 20px 0;
}

.faq-main-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item-large {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question-large {
  padding: 18px 20px;
  background: var(--bg-surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.faq-question-large:hover {
  background: #e0e0e0;
}

.faq-question-large.active {
  background: var(--accent-light);
  color: var(--accent);
}

.faq-question-large i {
  transition: transform 0.2s;
}

.faq-question-large.active i {
  transform: rotate(180deg);
}

.faq-answer-large {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--bg-surface);
}

.faq-answer-large.active {
  padding: 20px;
  max-height: 200px;
  border-top: 1px solid var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 12px;
}

.footer-donate {
  text-decoration: none;
  color: var(--green);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--green);
  border-radius: 99px;
  transition: background 0.15s;
}

.footer-donate:hover {
  background: var(--green-light);
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.popup-backdrop.active {
  display: block;
  opacity: 1;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 400px;
  max-width: 90vw;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  z-index: 201;
  padding: 28px 24px 20px;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  text-align: center;
  pointer-events: auto;
}

.popup.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1f2328;
  color: white;
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  z-index: 300;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  
  .nav-menu {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-section {
    padding: 40px 20px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .endpoint-header {
    flex-wrap: wrap;
  }
  
  .copy-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .copy-btn-sm {
    align-self: flex-end;
  }
  
  .param-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .param-input { width: 100%; }
  .execute-btn { width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .status-grid {
    grid-template-columns: 1fr;
  }
  
  .badge {
    display: none;
  }
  
  .nav-time {
    display: none;
  }
}