/* API Page - Cyberpunk Theme */
:root {
  --primary-bg: #020204;
  --secondary-bg: #0a0a0a;
  --card-bg: #121212;
  --highlight: #FCEE0A; /* Neon Yellow */
  --highlight-hover: #E6D805;
  --text-primary: #F0F0F0;
  --text-secondary: #A0A0A0;
  --border-color: #333333;
  --danger: #FF0055;
  --success: #00FF9F;
  --warning: #FFB800;
  --info: #00F0FF;
  --border-radius-sm: 0;
  --border-radius: 0;
  --border-radius-lg: 0;
  --transition: none;
  --shadow-sm: 0 0 5px rgba(252, 238, 10, 0.1);
  --shadow: 0 0 10px rgba(252, 238, 10, 0.1);
  --shadow-lg: 0 0 20px rgba(252, 238, 10, 0.2);
}

body {
  background-color: var(--primary-bg);
  color: var(--text-primary);
  font-family: 'Inter', monospace;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Navigation & Header */
.api-header {
  background-color: var(--secondary-bg);
  border-bottom: 1px solid var(--highlight);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.api-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.api-nav-links {
  display: flex;
  gap: 1.5rem;
}

.api-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}

.api-nav-link:hover {
  color: var(--highlight);
}

.api-nav-link.active {
  color: var(--highlight);
  text-shadow: 0 0 5px var(--highlight);
}

.api-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--highlight);
}

/* Quick Navigation */
.api-nav-quick {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding: 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--highlight);
  border-radius: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--highlight) transparent;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

/* Main Container */
.api-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem;
  overflow-x: hidden;
}

.api-nav-quick::-webkit-scrollbar {
  height: 6px;
}

.api-nav-quick::-webkit-scrollbar-track {
  background: transparent;
}

.api-nav-quick::-webkit-scrollbar-thumb {
  background-color: var(--highlight);
  border-radius: 0;
}

.api-nav-quick-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  font-family: 'Courier New', monospace;
}

.api-nav-quick-link:hover {
  background-color: rgba(252, 238, 10, 0.1);
  color: var(--highlight);
  border-color: var(--highlight);
}

.api-nav-quick-link.active {
  background-color: var(--highlight);
  color: #000;
  border-color: var(--highlight);
  font-weight: bold;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--highlight) transparent;
  border: 1px solid var(--border-color);
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.table-responsive::-webkit-scrollbar-thumb {
  background-color: var(--highlight);
  border-radius: 0;
}

/* API URL Styling */
.api-url {
  font-family: 'Courier New', monospace;
  background-color: rgba(252, 238, 10, 0.1);
  color: var(--highlight);
  padding: 0.25rem 0.5rem;
  border-radius: 0;
  font-size: 0.875rem;
  border: 1px dashed var(--highlight);
}

/* API Key Text Styling */
.api-key-text {
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
}

.api-account-link {
  color: var(--highlight);
  text-decoration: underline;
  font-weight: 500;
}

.api-account-link:hover {
  color: #fff;
  text-decoration: none;
  background-color: var(--highlight);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Mobile View Enhancements */
body.mobile-view .api-nav-quick {
  padding: 0.75rem;
}

body.mobile-view .api-nav-quick-link {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
}

body.mobile-view .service-type-tabs {
  justify-content: flex-start;
  align-items: flex-start;
}

body.mobile-view .api-table {
  min-width: 500px;
}

/* Hero Section */
.api-hero {
  margin-bottom: 4rem;
  text-align: center;
}

.api-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--highlight);
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(252, 238, 10, 0.5);
}

.api-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  font-family: 'Courier New', monospace;
}

/* API Info Card */
.api-info-card {
  background-color: var(--card-bg);
  border-radius: 0;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 10px var(--highlight-light);
  border: 1px solid var(--highlight);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

/* API Section */
.api-section {
  margin-bottom: 4rem;
}

.api-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.api-section-title h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--highlight);
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}

.api-section-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--highlight);
  color: #000;
  width: 24px;
  height: 24px;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Tables */
.api-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  overflow: hidden;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
  font-family: 'Courier New', monospace;
}

.api-table thead,
.api-table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.api-table tbody {
  overflow-y: auto;
}

.api-table thead {
  background-color: rgba(252, 238, 10, 0.05);
}

.api-table th {
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  word-wrap: break-word;
  white-space: normal;
  color: var(--highlight);
  text-transform: uppercase;
}

.api-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
}

.api-table tr:last-child td {
  border-bottom: none;
}

.width-40 {
  width: 40%;
}

/* Code Blocks */
.code-container {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid var(--highlight);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(252, 238, 10, 0.1);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--highlight);
}

.code-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--highlight);
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}

.copy-button {
  background-color: transparent;
  border: 1px solid var(--highlight);
  color: var(--highlight);
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  text-transform: uppercase;
}

.copy-button:hover {
  background-color: var(--highlight);
  color: #000;
}

.code {
  background-color: #000;
  border-radius: 0;
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 0;
  color: #0f0; /* Classic terminal green */
  max-height: 400px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Tabs for Service Types */
.service-type-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.service-type-tab {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}

.service-type-tab:hover {
  border-color: var(--highlight);
  color: var(--highlight);
}

.service-type-tab.active {
  background-color: var(--highlight);
  color: #000;
  border-color: var(--highlight);
  font-weight: bold;
}

/* Buttons */
.api-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--highlight);
  border: 1px solid var(--highlight);
  border-radius: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.api-button:hover {
  background-color: var(--highlight);
  color: #000;
  box-shadow: 0 0 10px var(--highlight);
}

.api-button svg {
  width: 16px;
  height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .api-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .api-nav-links {
    flex-wrap: wrap;
  }

  .api-container {
    padding: 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  .api-hero h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .api-hero p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .api-info-card {
    padding: 0.75rem;
    margin-bottom: 1rem;
    overflow-x: auto;
  }

  .api-section {
    margin-bottom: 2rem;
  }

  .api-section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .api-section-title h2 {
    font-size: 1.25rem;
  }

  .api-table {
    font-size: 0.8rem;
    min-width: 100%;
  }

  .api-table th,
  .api-table td {
    padding: 0.5rem;
    min-width: 120px;
  }

  .width-40 {
    width: auto;
    min-width: 140px;
  }

  .service-type-tabs {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .service-type-tab {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .code {
    font-size: 0.75rem;
    padding: 1rem;
    max-height: 300px;
  }

  .code-header {
    padding: 0.5rem 0.75rem;
  }

  .copy-button {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .api-container {
    padding: 0.5rem;
  }

  .api-hero {
    margin-bottom: 2rem;
  }

  .api-hero h1 {
    font-size: 1.5rem;
  }

  .api-info-card {
    padding: 0.5rem;
  }

  .api-table th,
  .api-table td {
    padding: 0.4rem;
    font-size: 0.75rem;
  }

  .service-type-tab {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

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

@media (max-width: 320px) {
  .api-hero h1 {
    font-size: 1.25rem;
  }

  .api-table {
    font-size: 0.7rem;
  }

  .api-table th,
  .api-table td {
    padding: 0.3rem;
  }
}

/* Non-authenticated styles - Optimized spacing */
.main-top {
  padding: 20px 0 !important;
  height: auto !important;
}

.app-content {
  margin-top: 0 !important;
}

@media (max-width: 991.98px) {
  .main-top {
    padding: 20px 0 !important;
  }
}

@media (min-width: 1199.98px) {
  .main-top {
    padding: 20px 0 !important;
  }
  .app-content {
    margin-top: 0 !important;
  }
}

.lgn-btn {
  display: none !important;
}

/* Focus States for Accessibility */
.api-nav-quick-link:focus,
.service-type-tab:focus,
.copy-button:focus,
.api-button:focus {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

/* Touch-friendly targets */
@media (max-width: 768px) {
  .service-type-tab,
  .copy-button,
  .api-button,
  .api-nav-quick-link {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .api-nav-quick-link {
    min-width: auto;
    padding: 0.75rem 1rem;
  }
}

/* Print Styles */
@media print {
  .api-nav-quick,
  .copy-button {
    display: none;
  }
  
  .api-container {
    max-width: none;
    padding: 0;
  }
  
  .api-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
