:root {
  --green: #1aff4c;
  --red: #ff2b2b;
  --bg: #08140d;
}

* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
  margin: 0;
  color: #fff;
  background: var(--bg);

}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 16px;
}

#eventTitle {
  color: #1aff4c;
  letter-spacing: 2px;
  text-shadow: 0 0 8px #1aff4c;
}

/* Banner */
.banner img {
  width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.navbar .logo {
  font-weight: 900;
  font-size: 24px;
  color: #1aff4c;
  letter-spacing: 2px;
  text-shadow: 0 0 8px #1aff4c;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 12px;
}

header h1 {
  margin: 0;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(249, 168, 37, .4);
}

.meta {
  margin-top: 6px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .9rem;
  color: #ccc;
}

/* Controls */
.controls {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0;
}

.controls input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #1aff4c;
  outline: none;
  min-width: 200px;
}

/* Event Tabs */
.tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tab {
  background: #08140d;
  color: #fff;
  border: 2px solid #1aff4c;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: .2s;
}

.tab.active {
  background: #1aff4c;
  color: #000;
  box-shadow: 0 0 15px #1aff4c;
}

.tab:hover {
  box-shadow: 0 0 10px #1aff4c;
}

/* Table Wrapper */
.table-wrapper {
  background: #161616;
  border-radius: 14px;
  overflow: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, .6);
  position: relative;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

/* Table Header */
thead {
  background-color: #023020;
}

thead th {
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Table Body */
tbody td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid #222;
  font-size: .9rem;
}

tbody tr:nth-child(even) {
  background: #1c1c1c;
}

tbody tr:hover {
  background: #01452d;

}

/* Acquire CP */
.acquire {
  color: var(--yellow);
  font-weight: 700;
}

/* Status */
.status {
  font-size: 1.05rem;
}

.status.up {
  color: #4caf50;
}

.status.down {
  color: #ef5350;
}

.status.same {
  color: #bbb;
}

/* Rank Badge */
.rank-badge {
  display: inline-block;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;

  min-width: 36px;
  height: 36px;
  background: #08140d;
  border: 2px solid #1aff4c;


  font-weight: 700;
  transition: .2s;
}

.pagination button:hover {
  box-shadow: 0 0 10px #1aff4c;
}

.pagination button:hover:not(:disabled) {
  background: #1aff4c;
  color: #000;
}

.pagination button.active {
  background: #1aff4c;
  color: #000;
  box-shadow: 0 0 12px #1aff4c;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}



@media(max-width:600px) {
  header h1 {
    font-size: 1.3rem;
  }

  .controls {
    justify-content: center;
  }

  table {
    min-width: 700px;
  }

  .banner img {
    max-height: 180px;
  }

  .rank-1 .rank-badge {
    font-size: 1.5rem;
  }

  .rank-2 .rank-badge {
    font-size: 1.3rem;
  }

  .rank-3 .rank-badge {
    font-size: 1.2rem;
  }
}

/* Spinner Overlay */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(26, 255, 76, 0.18);
  border-top-color: #1aff4c;
  border-right-color: #1aff4c;
  animation: spin 0.8s linear infinite;
  filter: drop-shadow(0 0 8px rgba(26, 255, 76, 0.55));
}

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