* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #0b0c0d;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
}

.bg-grid {
  position: fixed;
  top: -90px;
  left: 0;
  width: 100%;
  height: calc(100% + 180px);
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 90px 90px;
  animation: grid-scroll 7s linear infinite;
}

@keyframes grid-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(90px); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-grid {
    animation: none;
  }
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  background: #111213;
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.logo {
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  user-select: none;
  color: #ffffff;
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.logo:hover {
  transform: scale(1.06);
}

.logo .text-white {
  color: #ffffff;
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.discord-center-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #5865F2;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

.discord-center-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.45);
}

.discord-center-btn:active {
  transform: translateY(0);
}

.nav-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0px;
  height: 38px;
  padding: 0 10px;
  background-color: #5865F2;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.25);
  overflow: hidden;
  white-space: nowrap;
}

.discord-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.discord-btn .discord-label {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.discord-btn:hover {
  background-color: #4752c4;
  padding: 0 14px;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.45);
}

.discord-btn:hover .discord-label {
  max-width: 100px;
  opacity: 1;
  margin-left: 8px;
}

.discord-btn:active {
  transform: scale(0.97);
}

.lang-selector {
  position: relative;
  user-select: none;
}

.lang-toggle-btn {
  background: #191b1d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 5px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.lang-toggle-btn:hover {
  background: #24272a;
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 170px;
  background: #191b1d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 200;
}

.lang-selector.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: #9ca3af;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  text-align: left;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
}

.lang-option.active {
  background: #112d23;
  border-color: rgba(52, 211, 153, 0.25);
  color: #34d399;
}

.lang-name {
  flex: 1;
}

.check-icon {
  width: 16px;
  height: 16px;
  stroke: #34d399;
  display: none;
}

.lang-option.active .check-icon {
  display: block;
}

.flag-icon {
  width: 24px;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  display: block;
}

.navbar-banner-strip {
  position: relative;
  background: #111213;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #9ca3af;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.navbar-banner-strip::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #2b2e33;
}

.banner-text {
  text-align: center;
  letter-spacing: 0.2px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.banner-text.is-switching {
  opacity: 0;
  transform: translateY(-4px);
}

.navbar-fade {
  height: 25px;
  width: 100%;
  background: linear-gradient(to bottom, #111213 0%, rgba(17, 18, 19, 0.4) 45%, #0b0c0d 100%);
  pointer-events: none;
}

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

.section-header {
  margin-bottom: 20px;
}

.section-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-title {
  font-size: 21px;
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: -0.2px;
  margin-bottom: 0;
}

.section-header-spaced {
  margin-top: 48px;
}

#scriptsTableWrap[hidden],
#sectionTitle[hidden],
#scriptsDivider[hidden],
#autorobSection[hidden],
.search-no-results[hidden] {
  display: none;
}

.search-no-results {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 40px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 18px;
  font-weight: 500;
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  stroke: #6b7280;
  pointer-events: none;
}

.search-input {
  width: 220px;
  height: 36px;
  padding: 0 12px 0 34px;
  background: #191b1d;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.search-input::placeholder {
  color: #6b7280;
}

.search-input:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.search-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: #1d2023;
}

@media (max-width: 640px) {
  .section-controls {
    width: 100%;
  }

  .search-wrap,
  .search-input {
    width: 100%;
  }
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #191b1d;
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.filter-btn:hover {
  background: #24272a;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.filter-btn:active {
  transform: scale(0.97);
}

.filter-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

body.modal-open {
  overflow: hidden;
}

.filter-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 900;
}

.filter-overlay.is-open {
  display: flex;
}

.filter-modal {
  width: 100%;
  max-width: 520px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: #101114;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.filter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #f3f4f6;
}

.filter-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-clear {
  padding: 7px 12px;
  background: #191b1d;
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-clear:hover {
  background: #24272a;
  color: #ffffff;
}

.filter-close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #9ca3af;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-close:hover {
  background: #24272a;
  color: #ffffff;
}

.filter-modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 10px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 7px 14px;
  background: #191b1d;
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.filter-chip.is-selected {
  background: #f3f4f6;
  border-color: #f3f4f6;
  color: #0b0c0e;
}

.empty-row {
  grid-column: 1 / -1;
  padding: 28px 22px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

@media (max-width: 560px) {
  .filter-overlay {
    padding: 12px;
  }

  .filter-modal {
    max-height: 88vh;
  }
}

.section-divider {
  height: 1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
}

.table-wrapper {
  margin-top: 18px;
  background: #0f1013;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.scripts-grid {
  margin-top: 18px;
}

.scripts-grid-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.script-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: #101213;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.script-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #14171a;
}

.script-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 24px;
}

.script-card-head .item-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.card-discord-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: #5865f2;
}

.card-discord-avatar {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
}

.card-discord-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.script-card-head .rec-tag {
  margin-left: auto;
}

.script-card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.script-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
}

.script-card-label {
  color: #8a8f94;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.script-card .updated-time {
  color: #9ca3af;
  font-size: 12.5px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .scripts-grid-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .scripts-grid-items {
    grid-template-columns: 1fr;
  }
}

.scripts-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.scripts-table thead tr {
  background: #141518;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scripts-table th {
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.scripts-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s ease;
  background: #0d0e11;
  cursor: pointer;
  user-select: none;
}

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

.scripts-table tbody tr:hover {
  background: #14161b;
}

.scripts-table td {
  padding: 16px 22px;
  vertical-align: middle;
  color: #d1d5db;
}

.name-cell-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.row-menu-btn {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.row-menu-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.row-menu-btn:hover,
.row-menu-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.row-pin-icon {
  width: 14px;
  height: 14px;
  stroke: #d1d5db;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: none;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.25));
}

.script-row.is-pinned .row-pin-icon {
  display: inline-block;
}

.item-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}

.rec-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  background: #1b1c1e;
  color: #f472b6;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.script-row.is-recommended .item-name {
  color: #fbbf24;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}

.status-pill.updated {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-pill.bugging {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.status-pill.in-development {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.status-pill.in-development .status-dot {
  background: #fbbf24;
}

.status-pill.down {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-pill.down .status-dot {
  background: #ef4444;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.detection-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.detection-pill.undetected {
  color: #4ade80;
}

.detection-pill.detected {
  color: #f87171;
}

.detection-pill.detected .shield-icon {
  stroke: #f87171;
}

.detection-pill.banwave {
  color: #fbbf24;
}

.detection-pill.banwave .shield-icon {
  stroke: #fbbf24;
}

.detection-pill.unknown {
  color: #9ca3af;
}

.detection-pill.unknown .shield-icon {
  stroke: #9ca3af;
}

.shield-icon {
  width: 15px;
  height: 15px;
  stroke: #4ade80;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.keysystem-tag {
  display: inline-block;
  font-size: 12.5px;
  color: #9ca3af;
  font-weight: 500;
}

.keysystem-tag.keyless {
  color: #60a5fa;
}

.price-tag {
  font-weight: 600;
  color: #f3f4f6;
  font-size: 13px;
}

.price-tag.free {
  color: #34d399;
}

.updated-time {
  color: #9ca3af;
  font-size: 13px;
  white-space: nowrap;
}

.custom-context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 195px;
  background: #16181d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: scale(0.96) translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  user-select: none;
}

.custom-context-menu.visible {
  display: flex;
  opacity: 1;
  transform: scale(1) translateY(0);
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #e5e7eb;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.12s ease;
}

.context-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.context-menu-item svg {
  width: 16px;
  height: 16px;
  stroke: #9ca3af;
  flex-shrink: 0;
  transition: stroke 0.12s ease;
}

.context-menu-item:hover svg {
  stroke: #ffffff;
}

.top-notification {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -80px) scale(0.95);
  opacity: 0;
  z-index: 9999;
  background: #13151a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 13px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
  transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 300px;
}

.top-notification.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

.notif-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(34, 197, 94, 0.14);
  border: 1.5px solid rgba(34, 197, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon-box svg {
  width: 18px;
  height: 18px;
  stroke: #16a34a;
}

.notif-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 0.1px;
}

.notif-desc {
  font-size: 12.5px;
  color: #d1d5db;
}

@media (max-width: 850px) {
  .table-wrapper {
    overflow-x: auto;
  }
}

@keyframes page-drop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar,
.navbar-banner-strip,
.content-section > * {
  animation: page-drop 0.24s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.navbar-banner-strip {
  animation-delay: 0.02s;
}

.content-section > *:nth-child(1) { animation-delay: 0.04s; }
.content-section > *:nth-child(2) { animation-delay: 0.06s; }
.content-section > *:nth-child(3) { animation-delay: 0.08s; }
.content-section > *:nth-child(4) { animation-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
  .navbar,
  .navbar-banner-strip,
  .content-section > * {
    animation: none;
  }
}

.details-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 1200;
}
.details-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.details-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(380px, 92vw);
  background: #111213;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 0.24s ease;
  z-index: 1210;
  display: flex;
  flex-direction: column;
}
.details-drawer.is-open {
  transform: translateX(0);
}
.details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.details-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.details-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #1c1d1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.details-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.details-title-block { min-width: 0; }
.details-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.details-sub {
  font-size: 12px;
  color: #8f949a;
  margin-top: 2px;
}
.details-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #18191b;
  color: #c9ced4;
  cursor: pointer;
  flex-shrink: 0;
}
.details-close:hover { color: #fff; border-color: rgba(255,255,255,0.16); }
.details-body {
  padding: 16px 18px 24px;
  overflow-y: auto;
}
.details-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.details-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #18191b;
  color: #f2f4f7;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.details-btn:hover {
  background: #202225;
  border-color: rgba(255, 255, 255, 0.18);
}
.details-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8f949a;
  margin-bottom: 10px;
}
.details-list { display: grid; gap: 0; }
.details-item[hidden] {
  display: none;
}

.details-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.details-item dt {
  font-size: 13px;
  color: #8f949a;
  flex-shrink: 0;
}
.details-item dd {
  margin: 0;
  font-size: 13px;
  color: #eef1f4;
  font-weight: 500;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}
.script-row { cursor: pointer; }

.details-item dd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.details-pricing {
  margin-top: 18px;
}

.details-pricing[hidden] {
  display: none;
}

.details-pricing .details-section-title {
  margin-bottom: 6px;
}

.details-pricing-text {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #eef1f4;
  overflow-wrap: anywhere;
}
.details-item dd .status-pill,
.details-item dd .detection-pill,
.details-item dd .keysystem-tag,
.details-item dd .price-tag {
  font-size: 12.5px;
}

.logo {
  text-decoration: none;
  cursor: pointer;
}

/* In-page Discord connect view (#discord) */
.auth-page {
  display: none;
  min-height: calc(100vh - 100px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body.route-discord #discordView,
body.route-admin #adminView,
body.route-scriptpage #scriptPageView,
body.route-notfound #notFoundView {
  display: flex;
}

body.route-discord .content-section,
body.route-admin .content-section,
body.route-scriptpage .content-section,
body.route-notfound .content-section,
body.route-discord .navbar-banner-strip,
body.route-admin .navbar-banner-strip,
body.route-scriptpage .navbar-banner-strip,
body.route-notfound .navbar-banner-strip,
body.route-discord .navbar-fade,
body.route-admin .navbar-fade,
body.route-scriptpage .navbar-fade,
body.route-notfound .navbar-fade {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.auth-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #ffffff;
  margin-bottom: 22px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-btn .discord-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.auth-btn-primary {
  background: #5865F2;
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.3);
}

.auth-btn-primary:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.45);
}

.auth-btn-secondary {
  background: #191b1d;
  border-color: rgba(255, 255, 255, 0.12);
}

.auth-btn-secondary:hover {
  background: #24272a;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.auth-btn:active {
  transform: translateY(0);
}

/* Admin panel (#admin) */
.admin-card {
  max-width: 520px;
  text-align: left;
}

.admin-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #141618;
}

.admin-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #191b1d;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-account-name {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.admin-account-id {
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #8a8f94;
}

.admin-table-block {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #101213;
}

.admin-table-title {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141618;
  color: #c7ccd1;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-table-wrap {
  max-height: 260px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th,
.admin-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
  color: #8a8f94;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-table td {
  color: #e7e9ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.admin-table tr.is-you td {
  background: rgba(88, 101, 242, 0.12);
}

.admin-table-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1011;
}

.admin-add-admin {
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(88, 101, 242, 0.5);
  border-radius: 8px;
  background: rgba(88, 101, 242, 0.16);
  color: #c3c8ff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.admin-add-admin:hover:not(:disabled) {
  border-color: rgba(88, 101, 242, 0.8);
  background: rgba(88, 101, 242, 0.26);
}

.admin-add-admin:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-you-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.2);
  color: #a5adff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}

.admin-perms-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
}

.admin-perms-count {
  color: #8a8f94;
  font-family: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.admin-perms-btn {
  height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #191c1f;
  color: #e7e9ea;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.admin-perms-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.26);
  background: #23272b;
}

.admin-perms-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.context-menu-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.context-menu-item.is-danger {
  color: #f87171;
}

.context-menu-item.is-danger svg {
  stroke: #f87171;
}

.context-menu-item.is-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.context-menu-item.is-danger:hover:not(:disabled) svg {
  stroke: #fca5a5;
}

.admin-actions {
  margin-top: 18px;
}

/* 404 view (#admin without a listed ID) */
.notfound-card {
  max-width: 380px;
  text-align: center;
}

.notfound-code {
  font-size: 74px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: #ffffff;
}

.notfound-text {
  margin: 10px 0 20px;
  color: #9aa0a6;
  font-size: 14.5px;
}

/* Most Popular Scripts */
.popular-card {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #121416 0%, #0f1112 100%);
}

.popular-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.popular-title {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.popular-counter {
  color: #9aa0a6;
  font-size: 12.5px;
}

.popular-counter strong {
  color: #ffffff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.popular-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  margin-top: 16px;
}

.popular-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.popular-chart {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  margin: 0 auto;
}

.popular-donut {
  display: block;
  width: 100%;
  height: 100%;
}

.popular-segment {
  cursor: pointer;
  transition: stroke-width 0.2s ease, stroke-opacity 0.2s ease, filter 0.2s ease;
}

.popular-donut.is-hovering .popular-segment {
  stroke-opacity: 0.35;
}

.popular-donut .popular-segment.is-active {
  stroke-width: 34;
  stroke-opacity: 1;
  filter: brightness(1.12) drop-shadow(0 0 7px rgba(255, 255, 255, 0.22));
}

.popular-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}

.popular-donut-center strong {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}

.popular-donut-center span {
  max-width: 124px;
  overflow: hidden;
  color: #9aa0a6;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.popular-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 5px 16px;
}

.popular-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9aa0a6;
  font-size: 12px;
}

.popular-legend-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.popular-legend-name > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popular-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
}

.popular-stats {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.popular-stat {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.popular-stat + .popular-stat {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.popular-stat-icon {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: #1b1e21;
}

.popular-stat-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #b9bfc4;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.popular-stat-title {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
}

.popular-stat-sub {
  margin-top: 2px;
  color: #8b9196;
  font-size: 11.5px;
}

.popular-stat-value {
  text-align: right;
}

.popular-stat-value strong {
  color: #ffffff;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.popular-stat-bar {
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 6px;
  margin-left: auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.popular-stat-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #34d399;
}

@media (max-width: 720px) {
  .popular-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .popular-chart {
    width: 190px;
    height: 190px;
  }
}

/* Admin panel: script tabs and editor */
.admin-panel {
  width: 100%;
  max-width: 1040px;
}

.admin-panel-head {
  margin-bottom: 18px;
}

.script-page-head {
  margin-bottom: 16px;
}

.admin-panel-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-panel-title {
  margin-bottom: 0;
  text-align: left;
}

.admin-back {
  color: #9aa0a6;
  font-size: 13px;
  text-decoration: none;
}

.admin-back:hover {
  color: #ffffff;
}

.admin-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-tab-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #101213;
}

.admin-tab-group-title {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141618;
  color: #9aa0a6;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.admin-tab-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.admin-tab-list::-webkit-scrollbar,
.admin-table-wrap::-webkit-scrollbar {
  width: 8px;
}

.admin-tab-list::-webkit-scrollbar-track,
.admin-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.admin-tab-list::-webkit-scrollbar-thumb,
.admin-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.admin-tab-list::-webkit-scrollbar-thumb:hover,
.admin-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.34);
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c7ccd1;
  font-family: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.admin-tab-eye {
  display: inline-flex;
  flex-shrink: 0;
  color: #8b9196;
}

.admin-tab-eye svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
}

.admin-tab-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tab:hover {
  background: #191b1d;
  color: #ffffff;
}

.admin-tab.active {
  background: rgba(88, 101, 242, 0.18);
  color: #c3c8ff;
}

.admin-add-script {
  display: block;
  width: calc(100% - 12px);
  margin: 0 6px 6px;
  height: 34px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: transparent;
  color: #c7ccd1;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.admin-add-script:hover {
  background: #191b1d;
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.admin-content {
  min-width: 0;
}

.admin-content-head {
  margin-bottom: 14px;
}

.admin-content-title {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
}

.admin-content-sub {
  margin-top: 3px;
  color: #8a8f94;
  font-size: 13px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-field[hidden] {
  display: none;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field.full {
  grid-column: 1 / -1;
}

.admin-field label {
  color: #8a8f94;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #141618;
  color: #e7e9ea;
  font-family: inherit;
  font-size: 13.5px;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  outline: none;
  border-color: rgba(88, 101, 242, 0.7);
}

.admin-field textarea {
  min-height: 96px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

/* Checkbox toggle for "Recommended" */
.admin-check-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e7e9ea !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  user-select: none;
}

.admin-check-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.admin-check-toggle-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1px solid #b9c0c9;
  border-radius: 6px;
  background: #e9ecef;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.admin-check-toggle-box svg {
  display: block;
  width: 12px;
  height: 12px;
  stroke: #ffffff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.admin-check-toggle input:checked + .admin-check-toggle-box {
  background: #5865f2;
  border-color: #5865f2;
}

.admin-check-toggle input:checked + .admin-check-toggle-box svg {
  opacity: 1;
  transform: scale(1);
}

.admin-check-toggle input:focus-visible + .admin-check-toggle-box {
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.45);
}

/* Custom dropdowns */
.admin-select {
  position: relative;
}

.admin-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #141618;
  color: #e7e9ea;
  font-family: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.admin-select-trigger:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.admin-select.is-open .admin-select-trigger {
  border-color: rgba(88, 101, 242, 0.7);
}

.admin-select-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: #9aa0a6;
  transition: transform 0.16s ease;
}

.admin-select.is-open .admin-select-chevron {
  transform: rotate(180deg);
}

.admin-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  max-height: 210px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #16181d;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.admin-select.is-open .admin-select-menu {
  display: block;
}

.admin-select-menu::-webkit-scrollbar {
  width: 8px;
}

.admin-select-menu::-webkit-scrollbar-track {
  background: transparent;
}

.admin-select-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.admin-select-option {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.admin-select-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.admin-select-option.is-selected {
  background: rgba(88, 101, 242, 0.22);
  color: #c3c8ff;
}

/* Custom delete confirmation */
.admin-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(2px);
}

.admin-confirm-overlay[hidden] {
  display: none;
}

.admin-confirm-dialog {
  width: 100%;
  max-width: 380px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #131518;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
}

.admin-confirm-title {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

.admin-confirm-text {
  margin: 0 0 20px;
  color: #9aa0a6;
  font-size: 14px;
  line-height: 1.5;
}

.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.admin-confirm-actions .auth-btn {
  height: 40px;
}

.admin-confirm-danger {
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease;
}

.admin-confirm-danger:hover {
  background: #dc2626;
}

.admin-perms-dialog {
  max-width: 440px;
}

.admin-add-input {
  width: 100%;
  height: 42px;
  margin-bottom: 6px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #0e1011;
  color: #e7e9ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
}

.admin-add-input::placeholder {
  color: #6b7075;
}

.admin-add-input:focus {
  outline: none;
  border-color: rgba(88, 101, 242, 0.7);
}

.admin-perms-sub {
  margin-bottom: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.admin-perms-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-perm-row {
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #101213;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.admin-perm-row:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: #15181a;
}

.admin-perm-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.admin-perm-toggle {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: #1c1f22;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.admin-perm-toggle svg {
  display: block;
  width: 12px;
  height: 12px;
  stroke: #ffffff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.admin-perm-input:checked + .admin-perm-toggle {
  border-color: #5865f2;
  background: #5865f2;
}

.admin-perm-input:checked + .admin-perm-toggle svg {
  opacity: 1;
  transform: scale(1);
}

.admin-perm-input:focus-visible + .admin-perm-toggle {
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.45);
}

.admin-perm-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-perm-label {
  color: #e7e9ea;
  font-size: 13.5px;
  font-weight: 600;
}

.admin-perm-hint {
  color: #8a8f94;
  font-size: 12px;
  line-height: 1.4;
}

.admin-perms-status {
  min-height: 16px;
  margin: 0 0 12px;
  color: #f87171;
  font-size: 12.5px;
}

.admin-perms-save {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #5865f2;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease;
}

.admin-perms-save:hover {
  background: #4752c4;
}

.admin-perms-save:disabled {
  opacity: 0.6;
  cursor: default;
}

.admin-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.admin-form-actions .auth-btn {
  height: 42px;
}

.admin-form-status {
  grid-column: 1 / -1;
  min-height: 16px;
  color: #f87171;
  font-size: 12.5px;
}

.admin-empty {
  padding: 28px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #8a8f94;
  font-size: 13.5px;
  text-align: center;
}

@media (max-width: 820px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}
