/* ==================== RESET & BASE STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Colors */
  --primary-color: #007aff;
  --secondary-color: #5856d6;
  --accent-color: #32d74b;
  --success-color: #32d74b;
  --warning-color: #ff9500;
  --error-color: #ff3b30;
  --info-color: #007aff;

  /* Background */
  --bg-color: #ffffff;
  --surface-color: rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.1);

  /* Text */
  --text-color: #1f2937;
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-muted: #6b7280;

  /* Borders */
  --border-color: #e5e7eb;

  /* Shadows */
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.15);

  /* Components */
  --card-bg: #ffffff;
  --header-bg: #f9fafb;
  --sidebar-bg: rgba(248, 249, 250, 0.95);
  --sidebar-text: rgba(0, 0, 0, 0.8);
  --sidebar-hover: rgba(0, 0, 0, 0.05);
  --sidebar-active: rgba(0, 122, 255, 0.1);
  --footer-bg: #f9fafb;
  --code-bg: #1e293b;
  --code-color: #e2e8f0;
  --button-bg: #f3f4f6;
  --hover-bg: #f3f4f6;
  --input-bg: #ffffff;
  --endpoint-header-bg: #f8fafc;
  --table-header-bg: #f8fafc;

  /* Sizes */
  --sidebar-width: 250px;
  --blur-amount: 20px;
}

/* Dark Theme */
[data-theme="dark"] {
  --primary-color: #60a5fa;
  --secondary-color: #34d399;
  --accent-color: #32d74b;
  --bg-color: #1a1a1a;
  --surface-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-color: #e5e5e5;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: #a1a1a1;
  --border-color: #374151;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --card-bg: #252525;
  --header-bg: #1f1f1f;
  --sidebar-bg: rgba(20, 20, 20, 0.9);
  --sidebar-text: rgba(255, 255, 255, 0.9);
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --sidebar-active: rgba(0, 122, 255, 0.3);
  --footer-bg: #1f1f1f;
  --code-bg: #2d2d2d;
  --code-color: #e5e5e5;
  --button-bg: #374151;
  --hover-bg: #374151;
  --input-bg: #374151;
  --endpoint-header-bg: #2d2d2d;
  --table-header-bg: #374151;
}

/* ==================== BODY & HTML ==================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== LAYOUT ==================== */
.container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.main-content {
  /* margin-left: var(--sidebar-width); */
  padding: 0;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
  flex: 1;
}

.content {
  padding: 24px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  position: fixed;
  transition: transform 0.3s ease;
  transform: translateX(0);
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  padding: 0;
  overflow-y: auto;
  z-index: 1000;
  transition: transform 0.3s ease;
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
}

/* Prevent icon flicker during translation */
.nav-menu a i,
.submenu a i {
  display: inline-block;
  min-width: 18px;
  text-align: center;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
  background: var(--sidebar-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.sidebar-header h1 {
  color: var(--text-color);
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-content {
  padding: 16px 0;
}

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

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.nav-menu a:hover {
  background: var(--sidebar-hover);
  border-left-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateX(4px);
}

.nav-menu a.active {
  background: var(--primary-color);
  color: white;
  border-left-color: var(--primary-color);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.nav-menu a i {
  margin-right: 12px;
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 1;
  transition: all 0.3s ease;
}

.nav-menu a:hover i,
.nav-menu a.active i {
  opacity: 1;
  transform: scale(1.05);
}

/* ==================== HEADER ==================== */
.header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  margin: 0 0 32px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo img {
  height: 40px;
}

.logo-text h1 {
  margin: 0;
  color: var(--text-color);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.logo-text span {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-toggle {
  display: none;
  background: var(--button-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--hover-bg);
  border-color: var(--primary-color);
}

.mobile-menu-toggle i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover i {
  transform: scale(1.1);
}

.sidebar.active ~ .main-content .mobile-menu-toggle i {
  transform: rotate(90deg);
}

.toggleSidebarBtn {
  background: var(--button-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggleSidebarBtn:hover {
  background: var(--hover-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.toggleSidebarBtn:active {
  transform: scale(0.95);
}

.toggleSidebarBtn i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.toggleSidebarBtn:hover i {
  transform: scale(1.1);
}

.search-container {
  position: relative;
}

.search-container input {
  padding: 10px 15px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-color);
  width: 300px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-container .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.theme-toggle,
.language-toggle {
  background: var(--button-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.theme-toggle:hover,
.language-toggle:hover {
  background: var(--hover-bg);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.theme-toggle:active,
.language-toggle:active {
  transform: translateY(0);
  background: var(--primary-color);
  color: white;
}

.theme-toggle {
  border: 2px solid var(--primary-color) !important;
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.5) !important;
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: var(--border-color);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transition: width 0.3s ease;
}

/* ==================== SECTIONS ==================== */
.section {
  margin-bottom: 48px;
}

.section:first-child {
  margin-top: 0;
}

.section h2 {
  color: var(--text-color);
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.3;
}

.section h2::before {
  content: "";
  width: 4px;
  height: 32px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
  flex-shrink: 0;
}

.section > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 18px;
  line-height: 1.6;
  max-width: 1000px;
}

/* ==================== CARDS ==================== */
.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-color);
}

.info-card h3 {
  color: var(--text-color);
  margin: 0 0 16px 0;
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-card h3::before {
  content: "";
  width: 4px;
  height: 22px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
  flex-shrink: 0;
}

.info-card p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.6;
}

.info-card .code-block {
  margin-top: 16px;
}

.info-card .parameter-table {
  margin-top: 20px;
  margin-bottom: 0;
}

.endpoint-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 25px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.endpoint-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.endpoint-header {
  background: var(--endpoint-header-bg);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--border-color);
}

.method {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 50px;
  text-align: center;
}

.method.get {
  background: var(--success-color);
  color: white;
}

.method.post {
  background: var(--warning-color);
  color: white;
}

.method.put {
  background: var(--secondary-color);
  color: white;
}

.method.delete {
  background: var(--error-color);
  color: white;
}

.path {
  font-family: "Fira Code", monospace;
  background: var(--code-bg);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--code-color);
}

.endpoint-card h3 {
  color: var(--text-color);
  margin: 20px 20px 10px;
  font-size: 18px;
  font-weight: 600;
}

.endpoint-card > p {
  color: var(--text-muted);
  margin: 0 20px 20px;
}

/* ==================== TABLES ==================== */
.parameter-table {
  margin: 24px 0;
  background: var(--card-bg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.parameter-table h4 {
  color: var(--text-color);
  margin: 0 0 0 0;
  padding: 20px 24px 16px;
  font-size: 18px;
  font-weight: 600;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.parameter-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}

.table-responsive table {
  min-width: 600px;
}

.parameter-table th,
.parameter-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.parameter-table th {
  background: var(--table-header-bg);
  color: var(--text-color);
  font-weight: 600;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 2px solid var(--border-color);
}

.parameter-table td {
  color: var(--text-color);
  vertical-align: top;
  line-height: 1.5;
}

.parameter-table td:first-child {
  font-family: "Fira Code", monospace;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 13px;
  background: rgba(0, 122, 255, 0.05);
}

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

.parameter-table tbody tr:hover {
  background: var(--surface-color);
}

.parameter-table tbody tr:hover td:first-child {
  background: rgba(0, 122, 255, 0.1);
}

/* ==================== TABS ==================== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin: 20px 20px 0;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--text-color);
  background: var(--hover-bg);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
  padding: 20px;
}

.tab-content.active {
  display: block;
}

/* ==================== CODE BLOCKS ==================== */
.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.code-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--code-color);
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.nav-btn {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 1.08rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  margin: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.nav-btn i {
  font-size: 1.2em;
}
.nav-btn:hover,
.nav-btn:focus {
  background: #0056b3;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  outline: none;
}

/* ==================== DROPDOWNS ==================== */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-arrow {
  font-size: 0.75rem;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--surface-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  margin-left: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown.open .submenu {
  max-height: 500px;
  padding: 0.5rem 0;
  animation: dropdownSlide 0.3s ease;
}

.submenu li {
  margin: 0;
}

.submenu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.375rem;
  margin: 0.25rem 0.5rem;
}

.submenu a:hover {
  background: var(--sidebar-hover);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  transform: translateX(2px);
}

.submenu a.active {
  background: var(--sidebar-active);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.submenu a i {
  margin-right: 0.75rem;
  font-size: 0.875rem;
  width: 18px;
  text-align: center;
  opacity: 1;
  transition: all 0.3s ease;
}

.submenu a:hover i,
.submenu a.active i {
  opacity: 1;
  color: var(--primary-color);
  transform: scale(1.05);
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 40px 20px;
  margin: 60px -20px -20px;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: left;
}

.footer-section h4 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
}

.footer-section p,
.footer-section ul {
  color: var(--text-muted);
  margin: 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==================== ANIMATIONS ==================== */
@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .sidebar.active {
    transform: translateX(0);
  }

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

  .content {
    padding: 20px 16px;
  }

  .header-content {
    padding: 16px 20px;
    flex-direction: column;
    gap: 16px;
  }

  .header-controls {
    flex-direction: row;
    gap: 12px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: block;
    order: -1;
  }

  .header-buttons {
    gap: 8px;
  }

  .theme-toggle,
  .language-toggle {
    padding: 8px 10px;
    font-size: 13px;
  }

  .search-container input {
    width: 100%;
    max-width: 300px;
  }

  .section h2 {
    font-size: 28px;
  }

  .section > p {
    font-size: 16px;
  }

  .info-card {
    padding: 20px;
    margin-bottom: 20px;
  }

  .info-card h3 {
    font-size: 20px;
  }

  .parameter-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    margin: 16px 0;
  }

  .parameter-table h4 {
    padding: 16px 20px 12px;
    font-size: 16px;
  }

  .parameter-table table {
    min-width: 500px;
  }

  .parameter-table th,
  .parameter-table td {
    padding: 12px 16px;
    white-space: nowrap;
  }

  .parameter-table th {
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .parameter-table td {
    font-size: 13px;
  }

  .parameter-table td:first-child {
    font-size: 12px;
  }

  .parameter-table td:nth-child(2) {
    white-space: normal;
    min-width: 200px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .dropdown-toggle {
    font-size: 0.9rem;
  }

  .submenu a {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }

  .submenu a i {
    font-size: 0.8rem;
    margin-right: 0.5rem;
  }
}

@media (min-width: 1400px) {
  .content {
    max-width: 1400px;
    padding: 32px 48px;
  }

  .header-content {
    max-width: 1400px;
    padding: 24px 48px;
  }
}

/* ==================== FOOTER STYLES ==================== */
.footer-modern {
  background-color: var(--card-bg);
  padding: 20px;
  color: var(--text-color);
  border-top: 1px solid var(--border-color);
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 10px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: contain;
}

.footer-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-social a {
  margin-left: 12px;
  color: var(--text-muted);
  font-size: 16px;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: var(--primary-color);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
}

.footer-links h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-tools {
  display: flex;
  gap: 12px;
}

.footer-tools button,
.footer-tools a {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.footer-tools button:hover,
.footer-tools a:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-social {
    margin-top: 12px;
  }
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-sections {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .footer-main {
    padding: 40px 0 30px;
  }

  .footer-sections {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .brand-logo {
    justify-content: center;
    text-align: center;
  }
}

/* ==================== DARK THEME ENHANCEMENTS ==================== */
[data-theme="dark"] .nav-menu a:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.2) 0%,
    rgba(88, 86, 214, 0.2) 100%
  );
  color: #ffffff;
  border-left-color: var(--primary-color);
}

[data-theme="dark"] .nav-menu a.active {
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.3) 0%,
    rgba(88, 86, 214, 0.3) 100%
  );
  color: #ffffff;
  border-left-color: var(--primary-color);
}

[data-theme="dark"] .submenu a:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.2) 0%,
    rgba(88, 86, 214, 0.2) 100%
  );
  color: #ffffff;
}

[data-theme="dark"] .submenu a.active {
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.25) 0%,
    rgba(88, 86, 214, 0.25) 100%
  );
  color: #ffffff;
}

[data-theme="dark"] .parameter-table td:first-child {
  background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .parameter-table tbody tr:hover td:first-child {
  background: rgba(96, 165, 250, 0.2);
}

/* Dark theme cho footer với sidebar */
[data-theme="dark"] .sidebar-collapsed #footer-container {
  background: var(--footer-bg);
}

[data-theme="dark"] #footer-container {
  background: var(--footer-bg);
}

.collapsed {
  transform: translateX(-100%);
}

.check-sidebar {
  margin-left: 0px;
}

/* CSS cho khi sidebar bị collapse */
.sidebar-collapsed .main-content {
  margin-left: 0;
  transition: margin-left 0.3s ease;
}

.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

/* CSS cho footer khi sidebar mở/đóng */
.sidebar-collapsed #footer-container {
  margin-left: 0;
  transition: margin-left 0.3s ease;
}

/* Footer container styling */
#footer-container {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Footer margin khi sidebar collapsed */
.sidebar-collapsed #footer-container .footer {
  margin: 60px 20px -20px;
}

/* Footer margin khi sidebar expanded */
#footer-container .footer {
  margin: 60px -20px -20px;
  transition: margin 0.3s ease;
}

/* Responsive behavior */
@media (max-width: 768px) {
  .sidebar-collapsed .main-content {
    margin-left: 0;
  }

  .sidebar-collapsed #footer-container {
    margin-left: 0;
  }

  /* Footer margin trên mobile */
  .sidebar-collapsed #footer-container .footer {
    margin: 60px 20px -20px;
  }

  #footer-container .footer {
    margin: 60px 20px -20px;
  }
}

@media (min-width: 769px) {
  .main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }

  .footer-container {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
  }
}
