:root {
  --bg-primary: #080c16;
  --bg-secondary: #0f172a;
  --card-bg: rgba(15, 23, 42, 0.7);
  --card-border: rgba(255, 255, 255, 0.06);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  
  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.15);
  
  --status-active: #00f0ff;
  --status-active-glow: rgba(0, 240, 255, 0.4);
  
  --status-completed: #10b981;
  --status-completed-glow: rgba(16, 185, 129, 0.2);
  
  --status-despawned: #ef4444;
  --status-despawned-glow: rgba(239, 68, 68, 0.15);
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

header {
  border-bottom: 1px solid var(--card-border);
  background: rgba(8, 12, 22, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--status-completed));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.brand-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: #000;
}

.brand-title h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-title p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #ef4444;
}

.status-dot.connected {
  background-color: var(--status-completed);
  box-shadow: 0 0 8px var(--status-completed);
  animation: pulse 2s infinite;
}

.status-dot.disconnected {
  background-color: var(--status-despawned);
  box-shadow: 0 0 8px var(--status-despawned);
  animation: pulse 1s infinite;
}

main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title svg {
  color: var(--accent-cyan);
  width: 1.5rem;
  height: 1.5rem;
}

.counter {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* Active Missions Grid */
.active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.no-missions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--card-bg);
  border: 1px dashed var(--card-border);
  border-radius: 1rem;
  text-align: center;
  color: var(--text-secondary);
}

.no-missions svg {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* Mission Card */
.mission-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
}

.mission-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), #0077ff);
}

.mission-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.08);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.mission-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge.active {
  background: rgba(0, 240, 255, 0.1);
  color: var(--status-active);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.badge.active .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-active);
  box-shadow: 0 0 6px var(--status-active);
  animation: pulse 1.5s infinite;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.coord-display {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coord-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.coord-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.time-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.time-elapsed {
  font-weight: 600;
  color: var(--text-primary);
}

.time-remaining {
  font-weight: 700;
  transition: var(--transition-smooth);
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  width: 100%;
  transition: width 1s linear, background-color 0.5s ease;
  box-shadow: 0 0 8px currentColor;
}

.card-footer {
  margin-top: auto;
}

.izurvive-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(0, 119, 255, 0.1) 100%);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 0.5rem;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.izurvive-btn:hover {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0077ff 100%);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  border-color: transparent;
}

.izurvive-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

/* History List Table style */
.history-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: rgba(0, 0, 0, 0.15);
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 700;
  border-bottom: 1px solid var(--card-border);
}

td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.9rem;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr {
  transition: var(--transition-smooth);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge.completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--status-completed);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge.despawned {
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-despawned);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.history-coords {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fff;
}

.action-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.action-link:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.action-link svg {
  width: 0.9rem;
  height: 0.9rem;
}

footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--card-border);
  margin-top: auto;
}

footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(0, 240, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 240, 255, 0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
  }
  
  .active-grid {
    grid-template-columns: 1fr;
  }
  
  main {
    padding: 1rem;
    gap: 1.5rem;
  }
}

/* Tab Buttons */
.tabs-container {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  padding: 0.35rem;
  border-radius: 0.75rem;
  width: fit-content;
  align-self: center;
  backdrop-filter: blur(8px);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.tab-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: #000;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.tab-btn.active svg {
  stroke: #000;
}

/* Stats Header Controls */
.stats-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Toggle active/total switch */
.toggle-container {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  padding: 0.25rem;
  border-radius: 0.5rem;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.toggle-btn:hover {
  color: #fff;
}

.toggle-btn.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-cyan);
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.15);
}

/* Alive / Dead status badges */
.player-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.player-status-badge.alive {
  background: rgba(16, 185, 129, 0.1);
  color: var(--status-completed);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.player-status-badge.dead {
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-despawned);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Cumulative total row styling */
.table-totals-row {
  background: rgba(0, 240, 255, 0.03);
  font-weight: 700;
}

.table-totals-row td {
  border-top: 2px solid rgba(0, 240, 255, 0.3) !important;
  border-bottom: none !important;
  color: #fff;
}

.table-totals-row td:first-child {
  color: var(--accent-cyan) !important;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* Player awards styling */
.player-award {
  font-size: 1.25rem;
  cursor: help;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-right: 0.35rem;
  vertical-align: middle;
}

.player-award:hover {
  transform: scale(1.3) rotate(8deg);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

/* Load More button styling */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: 1.25rem;
  border-top: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.15);
}

.load-more-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.6rem 2rem;
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.load-more-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

/* Mods Tab Layout */
.mods-tables-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .mods-tables-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  
  .mods-section {
    margin-top: 0 !important;
  }
}

.mods-subtitle {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
}



