/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  transition: all 0.3s ease;
}

/* Color Theme: Blue, Red, White */
.bg-primary {
  background-color: #1e3a8a !important; /* Blue */
}

.bg-secondary {
  background-color: #dc2626 !important; /* Red */
}

.bg-accent {
  background-color: #f8fafc !important; /* White */
}

.text-primary {
  color: #1e3a8a !important;
}

.text-secondary {
  color: #dc2626 !important;
}

.border-primary {
  border-color: #1e3a8a !important;
}

.border-secondary {
  border-color: #dc2626 !important;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100%;
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar.open {
  left: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
}

.sidebar-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.sidebar-menu {
  padding: 20px 0;
}

.sidebar-item {
  padding: 12px 20px;
  color: white;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.sidebar-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-item i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Status Bar Styles */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.status-item {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #4b5563;
}

.status-item i {
  margin-right: 5px;
}

.battery-container {
  display: flex;
  align-items: center;
}

.battery-level {
  width: 20px;
  height: 10px;
  border: 1px solid #4b5563;
  border-radius: 2px;
  margin-right: 5px;
  position: relative;
  overflow: hidden;
}

.battery-fill {
  height: 100%;
  background-color: #10b981;
  transition: width 0.5s ease;
}

.battery-tip {
  width: 2px;
  height: 4px;
  background-color: #4b5563;
  border-radius: 0 1px 1px 0;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #1e3a8a;
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* Main Content Styles */
.main-content {
  padding: 20px;
  transition: all 0.3s ease;
}

.main-content.sidebar-open {
  margin-left: 300px;
}

/* Banner Styles */
#banner {
  position: relative;
  border: 2px dashed #1e3a8a;
  background-color: #f8fafc;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
  overflow: hidden;
  margin-bottom: 30px;
  margin-top: 15px;
}

#banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(to right, rgba(30, 58, 138, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 58, 138, 0.05) 1px, transparent 1px);
  background-size: 10px 10px;
  z-index: 0;
}

#banner>* {
  position: relative;
  z-index: 1;
}

/* Pixel-inspired elements */
.bg-gray-800 {
  background-color: #1e3a8a !important; /* Blue */
}

.border-gray-300 {
  border-color: #dbeafe !important; /* Light blue */
}

.border-gray-500 {
  border-color: #93c5fd !important; /* Medium blue */
}

.bg-gray-50 {
  background-color: #f8fafc !important; /* White */
}

/* Buttons and interactive elements */
button,
#submit-api {
  background-color: #1e40af !important; /* Blue */
  transition: all 0.2s ease;
}

button:hover,
#submit-api:hover {
  background-color: #1e3a8a !important; /* Darker blue */
  transform: translateY(-1px);
}

/* Pixel dots */
.bg-gray-800.rounded-full {
  background-color: #3b82f6 !important; /* Blue */
  box-shadow: 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Input field styling */
#api-search {
  border-color: #93c5fd !important;
  background-color: #f8fafc;
}

#api-search:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 1px #3b82f6;
}

/* Modal styling */
#api-modal .bg-white {
  border: 2px solid #3b82f6;
  box-shadow: 4px 4px 0 rgba(30, 58, 138, 0.2);
}

/* Tab content */
.tab-content {
  border-top: 2px solid #dbeafe;
}

/* Loader animation */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader {
  width: 32px;
  height: 32px;
  position: relative;
}

.loader:before,
.loader:after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: #1e40af;
  border-radius: 2px;
  animation: loader-animation 1.5s infinite ease-in-out;
}

.loader:before {
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.loader:after {
  top: 0;
  right: 0;
  animation-delay: 0.5s;
}

@keyframes loader-animation {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.5);
    opacity: 0.5;
  }
}

/* Soft pixel-like elements */
.bg-blue-100 {
  background-color: #dbeafe !important; /* Light blue */
}

.text-blue-800 {
  color: #1e3a8a !important; /* Dark blue */
}

/* Response box */
#response-data {
  border: 1px dashed #93c5fd;
  border-radius: 4px;
  background-color: #f8fafc;
}

/* Author badge */
#api-author {
  background-color: #dc2626 !important; /* Red */
}

/* Hover effects */
a:hover {
  color: #1e3a8a;
}

/* Material icons color */
.material-icons {
  color: #1e40af;
}

/* Perbaikan untuk icon close (X) */
#close-modal .material-icons {
  color: #666 !important;
  background-color: transparent !important;
}

/* Perbaikan tambahan untuk memastikan */
.bg-gray-800:not(nav) {
  background-color: #1e3a8a !important;
}

/* ==================== */
/* IMPROVED HEADER STYLE */
/* ==================== */
nav {
  background-color: #1e3a8a !important;
  border-bottom: 3px dashed #dbeafe !important;
  padding: 15px 20px !important;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15) !important;
}

nav::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(to right,
      transparent,
      transparent 10px,
      #f8fafc 10px,
      #f8fafc 20px);
}

/* Navigation content styling */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo/Title area */
nav::after {
  content: "YoedzXy";
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: #f8fafc;
  letter-spacing: 1px;
}

/* Pixel-inspired decoration */
nav {
  position: relative;
  overflow: hidden;
}

nav::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: #f8fafc;
  top: 5px;
  left: 5px;
  box-shadow:
    0 0 0 2px #1e3a8a,
    calc(100% - 13px) 0 0 #f8fafc,
    calc(100% - 13px) 0 0 2px #1e3a8a,
    0 calc(100% - 13px) 0 #f8fafc,
    0 calc(100% - 13px) 0 2px #1e3a8a,
    calc(100% - 13px) calc(100% - 13px) 0 #f8fafc,
    calc(100% - 13px) calc(100% - 13px) 0 2px #1e3a8a;
}

/* Hover effects */
#api-info:hover {
  transform: translateY(-2px);
}

#api-info button {
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* Responsive adjustment */
@media (max-width: 768px) {
  nav {
    padding: 12px 15px !important;
  }

  nav::after {
    font-size: 1rem;
  }

  .sidebar {
    width: 250px;
    left: -250px;
  }

  .main-content.sidebar-open {
    margin-left: 0;
  }

  .status-bar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

/* ==================== */
/* ENDPOINT CATEGORY TABS */
/* ==================== */
#api-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Category header */
.api-category {
  background-color: #f8fafc;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.1);
}

/* Category title */
.api-category-title {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px dashed #dbeafe;
}

.api-category-title span {
  font-weight: 600;
  color: #1e3a8a;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

/* Category count bubble */
.api-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: #1e40af;
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 10px;
}

/* Endpoint list */
.api-endpoints {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Individual endpoint */
.api-endpoint {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.api-endpoint:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(30, 58, 138, 0.15);
  border-color: #3b82f6;
}

/* Endpoint method */
.endpoint-method {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 8px;
}

.endpoint-method.get {
  background-color: #dbeafe;
  color: #1e3a8a;
}

.endpoint-method.post {
  background-color: #fecaca;
  color: #991b1b;
}

/* Endpoint path */
.endpoint-path {
  font-family: monospace;
  font-size: 0.9rem;
  color: #1e40af;
}

/* Endpoint description */
.endpoint-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.4;
}

/* Category Navigation - Horizontal Scroll */
.category-nav {
  display: flex;
  gap: 8px;
  margin: 5px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px dashed #dbeafe;
  align-items: flex-end;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #1e40af #f8fafc;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

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

.category-nav::-webkit-scrollbar-thumb {
  background-color: #1e40af;
  border-radius: 3px;
}

.category-nav::-webkit-scrollbar-track {
  background-color: #f8fafc;
}

.category-tag {
  display: inline-block;
  padding: 4px 12px 6px;
  background-color: #dbeafe;
  color: #1e3a8a;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #93c5fd;
  position: relative;
  top: 3px;
  line-height: 1.5;
  flex-shrink: 0;
}

.category-tag:hover {
  background-color: #93c5fd;
  transform: translateY(-1px);
}

.category-tag.active {
  background-color: #1e40af;
  color: white;
  border-color: #1e3a8a;
}

/* API Key Input Styling */
.api-key-input {
  background-color: #f8f9fa;
  border: 2px solid #e2e8f0;
  font-family: monospace;
  transition: all 0.2s ease;
}

.api-key-input:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

/* Error Message Styling */
.text-red-500 {
  color: #ef4444;
}

.border-red-500 {
  border-color: #ef4444;
}

.bg-red-50 {
  background-color: #fef2f2;
}

/* Response Status Styling */
.bg-green-100 {
  background-color: #d1fae5;
}

.text-green-800 {
  color: #065f46;
}

.bg-red-100 {
  background-color: #fee2e2;
}

.text-red-800 {
  color: #991b1b;
}

/* Tambahkan ini ke styles.css */
h2#api-name {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%231e40af' fill-opacity='0.6'%3E%3Cpath d='M0 0h4v4H0zM4 4h4v4H4z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: auto;
  padding: 4px 10px;
  color: #1e3a8a;
  font-weight: 700;
  border-radius: 4px;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Add these to styles.css */
.api-category {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  border: 1px solid #e2e8f0;
}

.api-category-title {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px dashed #dbeafe;
}

.api-category-count {
  background-color: #1e40af;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-left: 10px;
}

.api-endpoints {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.api-endpoint {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 15px;
  transition: all 0.2s ease;
}

.api-endpoint:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
  border-color: #3b82f6;
}

.endpoint-method {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
}

.endpoint-method.get {
  background-color: #dbeafe;
  color: #1e3a8a;
}

.endpoint-path {
  font-family: monospace;
  font-size: 12px;
  color: #1e40af;
  overflow: hidden;
  text-overflow: ellipsis;
}