:root {
  --primary-color: #6e48aa;
  --secondary-color: #9d50bb;
  --accent-color: #4776e6;
  --glass-color: rgba(255, 255, 255, 0.1);
  --glass-border: 1px solid rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #0f0f2e, #1a1a4a);
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
}

.no-scroll {
  overflow: hidden;
}

/* Loading Screen */
#loadingScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 9999;
  transition: opacity 0.5s ease;
}

/* Main Layout */
#mainLayout {
  min-height: 100vh;
  transition: all 0.3s ease;
}

/* Sidebar */
#sidebar {
  background: var(--glass-color);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-right: var(--glass-border);
  height: 100vh;
  position: sticky;
  top: 0;
  transition: all 0.3s ease;
  overflow-y: auto;
}

#sidebar h4 {
  color: white;
  font-weight: 600;
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#category-list {
  padding: 10px;
}

#category-list li {
  margin-bottom: 5px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#category-list li a {
  display: block;
  padding: 10px 15px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#category-list li a:hover,
#category-list li a.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(5px);
}

/* Content Area */
#content {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

#page {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

#description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Search Input */
#searchInput {
  background: var(--glass-color);
  border: var(--glass-border);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

#searchInput:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 0.25rem rgba(110, 72, 170, 0.25);
  border-color: var(--primary-color);
  outline: none;
}

#searchInput::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* API Links */
#apiLinks a {
  color: rgba(255, 255, 255, 0.8);
  margin-right: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

#apiLinks a:hover {
  color: white;
  border-bottom: 1px solid var(--primary-color);
}

/* API Items */
.api-item {
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.api-item .hero-section {
  background: var(--glass-color);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1.5rem;
  border: var(--glass-border);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.api-item .hero-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(110, 72, 170, 0.5);
}

.api-item h5 {
  color: white;
  font-weight: 600;
}

.api-item p {
  color: rgba(255, 255, 255, 0.8) !important;
}

.get-api-btn {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 50px;
  padding: 8px 20px;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(110, 72, 170, 0.3);
}

.get-api-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(110, 72, 170, 0.4);
}

/* Category Headers */
.category-header {
  position: relative;
  color: white;
  padding-bottom: 10px;
  margin-top: 2rem;
  margin-bottom: 1.5rem !important;
}

.category-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
}

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  padding: 1rem !important;
}

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

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.api-item {
  animation: fadeIn 0.5s ease forwards;
}

.category-header {
  animation: slideIn 0.5s ease forwards;
}

/* Modal Styles */
.modal-content {
  background: linear-gradient(135deg, #0f0f2e, #1a1a4a);
  border: var(--glass-border);
  backdrop-filter: blur(20px);
  color: white;
  border-radius: 15px;
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.close {
  color: white;
  text-shadow: none;
  opacity: 0.8;
}

.close:hover {
  color: white;
  opacity: 1;
}

#apiResponseContent {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
}

#apiEndpoint {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px;
  font-family: 'Courier New', Courier, monospace;
  word-break: break-all;
  color: #9d50bb;
}

.param-container input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.param-container input:focus {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(110, 72, 170, 0.25);
  color: white;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 50px;
  padding: 8px 25px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(110, 72, 170, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    z-index: 1000;
    width: 250px;
    left: -250px;
    transition: all 0.3s ease;
  }
  
  #content {
    padding: 1.5rem;
  }
  
  #page {
    font-size: 2rem;
  }
}
