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

body {
  background: radial-gradient(ellipse at 50% 30%, #12002a 0%, #0a0014 50%, #050008 100%);
  color: #d0c0e0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Subtle CRT scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* --- Header --- */
#app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: rgba(10, 0, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 45, 149, 0.12);
  position: relative;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.header-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #e0d0f0;
}

.title-accent {
  background: linear-gradient(135deg, #ff2d95, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-subtitle {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #6b3a7a;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
}

.header-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.06);
  color: #00f0ff;
  transition: all 0.3s ease;
}

.header-badge.disconnected {
  color: #ff2020;
  border-color: rgba(255, 32, 32, 0.3);
  background: rgba(255, 32, 32, 0.08);
}

/* --- Globe --- */
#globe-container {
  width: 100%;
  height: 65vh;
  min-height: 400px;
  position: relative;
  display: flex;
  justify-content: center;
  cursor: grab;
}

#globe-container:active {
  cursor: grabbing;
}

#globe-container canvas {
  outline: none;
}

/* Vignette overlay on globe */
#globe-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(5, 0, 8, 0.6) 100%);
  pointer-events: none;
}

/* --- Stats Bar (Glassmorphism) --- */
#stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  padding: 0.8rem 2.5rem;
  margin: -2rem auto 0;
  width: fit-content;
  position: relative;
  z-index: 5;
  background: rgba(10, 0, 20, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 45, 149, 0.1);
  border-radius: 12px;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(255, 45, 149, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  position: relative;
}

/* Stat dividers */
.stat + .stat::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 15%;
  height: 70%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255, 45, 149, 0.15), transparent);
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(to bottom, #ff2d95, #cc1a70);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(255, 45, 149, 0.35));
}

.stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7a4a8a;
}

#connection-stat .stat-value {
  transition: all 0.3s;
  font-size: 1.4rem;
}

#connection-stat.connected .stat-value {
  background: #00f0ff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
  animation: pulse-glow 2s ease-in-out infinite;
}

#connection-stat.disconnected .stat-value {
  background: #ff2020;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(255, 32, 32, 0.5));
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.4)); }
  50% { filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.7)); }
}

/* --- Table Container --- */
#table-container {
  max-height: 35vh;
  overflow-y: auto;
  padding: 1rem 1rem 1rem;
  margin-top: 0.5rem;
}

.table-header-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #7a4a8a;
  text-transform: uppercase;
  padding: 0 1rem 0.5rem;
}

#table-container::-webkit-scrollbar {
  width: 5px;
}

#table-container::-webkit-scrollbar-track {
  background: transparent;
}

#table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 45, 149, 0.15);
  border-radius: 3px;
}

#table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 45, 149, 0.3);
}

/* --- Table --- */
#ban-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

#ban-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

#ban-table th {
  background: rgba(10, 0, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.5rem 1rem;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7a4a8a;
  border-bottom: 1px solid rgba(255, 45, 149, 0.1);
}

#ban-table td {
  padding: 0.4rem 1rem;
  border-bottom: 1px solid rgba(255, 45, 149, 0.03);
  white-space: nowrap;
}

#ban-table tbody tr {
  transition: background 0.3s;
}

#ban-table tbody tr:nth-child(even) {
  background: rgba(255, 45, 149, 0.015);
}

#ban-table tbody tr:hover {
  background: rgba(255, 45, 149, 0.08);
}

.row-new {
  animation: rowSlideIn 0.4s ease-out;
}

.row-new td {
  background: rgba(255, 45, 149, 0.15) !important;
  transition: background 2.5s ease-out;
}

@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ip-cell {
  font-weight: 700;
  background: linear-gradient(135deg, #ff2d95, #ff6eb4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 4px rgba(255, 45, 149, 0.25));
}

.location-cell {
  font-family: 'Inter', sans-serif;
  color: #9a7aaa;
}

.port-cell {
  color: #00f0ff;
  filter: drop-shadow(0 0 3px rgba(0, 240, 255, 0.2));
}

.org-cell {
  font-family: 'Inter', sans-serif;
  color: #6b5a7a;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jail-cell {
  color: #00aaff;
}

.time-cell {
  color: #4a3a5a;
  font-size: 0.78rem;
}

/* --- About --- */
#about {
  text-align: center;
  padding: 1rem 2rem;
  border-top: 1px solid rgba(255, 45, 149, 0.06);
}

#about p {
  font-size: 0.72rem;
  color: #5a2a6a;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

#about a {
  color: #ff2d95;
  text-decoration: none;
}

#about a:hover {
  text-decoration: underline;
  text-shadow: 0 0 6px rgba(255, 45, 149, 0.4);
}

/* --- Mobile --- */
@media (max-width: 768px) {
  #app-header {
    padding: 0.5rem 1rem;
  }

  .header-title {
    font-size: 0.95rem;
  }

  .header-subtitle {
    display: none;
  }

  #globe-container {
    height: 50vh;
    min-height: 300px;
  }

  #stats-bar {
    gap: 1.2rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    margin-top: -1.5rem;
  }

  .stat + .stat::before {
    left: -0.6rem;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  #ban-table {
    font-size: 0.72rem;
  }

  #ban-table th,
  #ban-table td {
    padding: 0.35rem 0.5rem;
  }

  .provider-col,
  .org-cell {
    display: none;
  }
}
