* {
  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;
}

/* Header Leiste */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  background: #111213;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Logo links */
.nav-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  user-select: none;
}

.logo .highlight-green {
  color: #22c55e;
}

.logo .highlight-red {
  color: #ef4444;
}

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

/* Mitte: Links / Navigationselemente */
.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* Discord Button in der Mitte mit blauem Icon & Text */
.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);
}

/* Rechts: Connect Button & Flaggen Button */
.nav-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

/* Connect Button (mit hover text) */
.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;
  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);
}

/* Language Selector Container */
.lang-selector {
  position: relative;
  user-select: none;
}

/* Main Flag Button */
.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);
}

/* Dropdown Menu */
.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 SVG */
.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;
}

/* Sub-Leiste / Sub-Banner */
.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;
}

/* Weicher Übergang */
.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;
}

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

/* Titel "Emergency Hamburgs Scripts:" links */
.section-header {
  margin-bottom: 20px;
}

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

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

/* ================================================= */
/* Tabelle */
/* ================================================= */
.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-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: context-menu;
  user-select: none;
}

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

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

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

/* Name Zelle mit Pin-Icon */
.name-cell-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.row-pin-icon {
  width: 14px;
  height: 14px;
  stroke: #22c55e;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: none;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.5));
}

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

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

/* Status Pill */
.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.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 Badge */
.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;
}

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

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

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

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

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

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

/* ================================================= */
/* Custom Dark Context Menu */
/* ================================================= */
.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; /* Icons werden weiß bei Hover */
}

/* ================================================= */
/* Top Floating Notification — Heller Style */
/* ================================================= */
.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;
}

/* Responsive Table Scroll */
@media (max-width: 850px) {
  .table-wrapper {
    overflow-x: auto;
  }
}
