/* ========================================
   API DOCUMENTATION PAGE STYLES
   ======================================== */

.api-hero {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   padding: 100px 0 80px;
   color: white;
   position: relative;
   overflow: hidden;
}

.api-hero::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
   opacity: 0.5;
}

.api-hero .container {
   position: relative;
   z-index: 2;
}

.api-hero h1 {
   font-size: 3rem;
   font-weight: 800;
   margin-bottom: 1rem;
}

.api-hero p {
   font-size: 1.25rem;
   opacity: 0.95;
}

.api-content {
   padding: 80px 0;
   background: #f7fafc;
}

.api-sidebar {
   position: sticky;
   top: 100px;
   background: white;
   border-radius: 15px;
   padding: 2rem;
   box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.api-sidebar h5 {
   font-weight: 700;
   margin-bottom: 1.5rem;
   color: var(--text-dark);
}

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

.api-nav li {
   margin-bottom: 0.75rem;
}

.api-nav a {
   color: var(--text-light);
   text-decoration: none;
   display: block;
   padding: 0.5rem 1rem;
   border-radius: 8px;
   transition: all 0.3s ease;
   font-weight: 500;
}

.api-nav a:hover,
.api-nav a.active {
   background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
   color: white;
}

.api-section {
   background: white;
   border-radius: 15px;
   padding: 2.5rem;
   margin-bottom: 2rem;
   box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.api-section h2 {
   font-size: 2rem;
   font-weight: 800;
   color: var(--text-dark);
   margin-bottom: 1rem;
   padding-bottom: 1rem;
   border-bottom: 3px solid #e2e8f0;
   position: relative;
}

.api-section h2::before {
   content: '';
   position: absolute;
   bottom: -3px;
   left: 0;
   width: 80px;
   height: 3px;
   background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.api-section h3 {
   font-size: 1.5rem;
   font-weight: 700;
   color: var(--text-dark);
   margin-top: 2rem;
   margin-bottom: 1rem;
}

.api-section h4 {
   font-size: 1.25rem;
   font-weight: 600;
   color: var(--text-dark);
   margin-top: 1.5rem;
   margin-bottom: 0.75rem;
}

.api-section p {
   color: var(--text-light);
   line-height: 1.8;
   margin-bottom: 1rem;
}

.code-block {
   background: #1a202c;
   border-radius: 10px;
   padding: 1.5rem;
   margin: 1.5rem 0;
   position: relative;
   overflow-x: auto;
}

.code-block pre {
   margin: 0;
   color: #e2e8f0;
   font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
   font-size: 14px;
   line-height: 1.6;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
   text-rendering: optimizeLegibility;
}

.code-block code {
   color: #e2e8f0;
   font-family: inherit;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
}

.code-lang {
   position: absolute;
   top: 1rem;
   right: 1rem;
   background: rgba(102, 126, 234, 0.3);
   color: white;
   padding: 0.25rem 0.75rem;
   border-radius: 5px;
   font-size: 0.75rem;
   font-weight: 600;
   text-transform: uppercase;
}

.copy-btn {
   position: absolute;
   top: 1rem;
   right: 80px;
   background: rgba(102, 126, 234, 0.3);
   color: white;
   border: none;
   padding: 0.25rem 0.75rem;
   border-radius: 5px;
   font-size: 0.75rem;
   cursor: pointer;
   transition: all 0.3s ease;
}

.copy-btn:hover {
   background: var(--primary-color);
}

.param-table {
   width: 100%;
   border-collapse: collapse;
   margin: 1.5rem 0;
   background: white;
   border-radius: 10px;
   overflow: hidden;
   box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.param-table thead {
   background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
   color: white;
}

.param-table th {
   padding: 1rem;
   text-align: left;
   font-weight: 600;
}

.param-table td {
   padding: 1rem;
   border-bottom: 1px solid #e2e8f0;
}

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

.param-table code {
   background: #f7fafc;
   padding: 0.25rem 0.5rem;
   border-radius: 5px;
   font-family: 'Courier New', monospace;
   color: var(--primary-color);
   font-size: 0.9rem;
}

.badge {
   display: inline-block;
   padding: 0.35rem 0.75rem;
   border-radius: 50px;
   font-size: 0.85rem;
   font-weight: 600;
}

.badge-get {
   background: #d4edda;
   color: #155724;
}

.badge-post {
   background: #d1ecf1;
   color: #0c5460;
}

.badge-required {
   background: #f8d7da;
   color: #721c24;
}

.badge-optional {
   background: #fff3cd;
   color: #856404;
}

.alert-info {
   background: #e7f3ff;
   border-left: 4px solid var(--primary-color);
   padding: 1.25rem 1.5rem;
   border-radius: 8px;
   margin: 1.5rem 0;
}

.alert-info i {
   color: var(--primary-color);
   margin-right: 0.5rem;
   font-size: 1.25rem;
}

.alert-info p {
   margin: 0;
}

.endpoint-card {
   background: #f7fafc;
   border-left: 4px solid var(--primary-color);
   padding: 1.5rem;
   border-radius: 8px;
   margin: 1.5rem 0;
}

.endpoint-card .method {
   display: inline-block;
   padding: 0.35rem 0.75rem;
   border-radius: 5px;
   font-weight: 700;
   font-size: 0.85rem;
   margin-right: 1rem;
}

.endpoint-card .method.get {
   background: #28a745;
   color: white;
}

.endpoint-card .method.post {
   background: #007bff;
   color: white;
}

.endpoint-card .url {
   font-family: 'Courier New', monospace;
   color: var(--text-dark);
   font-weight: 600;
}

code[class*=language-],
pre[class*=language-] {
   color: white !important;
   background: none !important;
   text-shadow: none !important;
}

/* Responsive */
@media (max-width: 991px) {
   .api-sidebar {
      position: static;
      margin-bottom: 2rem;
   }

   .api-hero {
      padding: 80px 0 60px;
   }

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

   .api-content {
      padding: 60px 0;
   }
}

@media (max-width: 767px) {
   .api-section {
      padding: 1.5rem;
   }

   .code-block {
      padding: 1rem;
   }

   .param-table {
      font-size: 0.85rem;
   }

   .param-table th,
   .param-table td {
      padding: 0.75rem 0.5rem;
   }
}