:root {
  --color-volt-lime: #91e500;
  --color-sunburst: #fff600;
  --color-hyper-pink: #fd1a9f;
  --color-primary-bg: #050015;
  --color-panel-bg: rgba(10, 0, 32, 0.9);
  --font-display: "Bebas Neue", "Arial Black", sans-serif;
  --font-body: "Space Grotesk", "Arial", sans-serif;
}

/* --- Reset & Full Screen Setup --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-primary-bg);
  color: #f8f8ff;
  display: flex;
  position: relative;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
}

/* Achtergrond Glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at top left,
      rgba(255, 136, 0, 0.1),
      rgba(13, 0, 64, 0.5)
    ),
    radial-gradient(
      circle at bottom right,
      rgba(253, 26, 159, 0.15),
      rgba(10, 0, 32, 0.5)
    );
  mix-blend-mode: screen;
  opacity: 0.8;
  pointer-events: none;
  z-index: -1;
}

/* --- Main Container: Full Screen --- */
.container {
  display: flex;
  width: 100vw;
  height: 100vh;
  gap: 2vw;
  padding: 4vh 6vw;
}

/* --- Recente Uitslag: Fixed Width --- */
.recent-result {
  flex: 0 0 32vw;
  display: flex;
  flex-direction: column;
  padding: 2vh 1.5vw;
  background: rgba(15, 0, 40, 0.85);
  border-radius: 15px;
  border: 2px solid var(--color-hyper-pink);
  box-shadow: 0 0 20px rgba(253, 26, 159, 0.2);
}

.recent-result h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vh, 3rem);
  color: var(--color-hyper-pink);
  text-align: center;
  border-bottom: 2px solid var(--color-hyper-pink);
  padding-bottom: 1vh;
  margin-bottom: 2vh;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

#recent-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.match-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1.5vw;
}

.team-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.match-details .name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vh, 2rem);
  font-weight: bold;
  color: var(--color-sunburst);
  text-shadow: 0 0 8px rgba(255, 246, 0, 0.5);
  margin-bottom: 1.5vh;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
  max-width: 100%;
  padding: 0 0.5vw;
}

.match-details .score {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vh, 7rem);
  font-weight: bold;
  color: var(--color-volt-lime);
  text-shadow: 0 0 15px rgba(145, 229, 0, 0.7);
  line-height: 1;
}

.match-details .vs {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vh, 3rem);
  color: #ccc;
  flex-shrink: 0;
  padding: 0 0.5vw;
}

/* --- Top 10: Takes Remaining Space --- */
.top-10 {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2vh 1.5vw;
  background: rgba(15, 0, 40, 0.85);
  border-radius: 15px;
  border: 2px solid var(--color-volt-lime);
  box-shadow: 0 0 20px rgba(145, 229, 0, 0.2);
  min-width: 0;
  overflow: hidden;
}

.top-10 h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vh, 3.5rem);
  color: var(--color-volt-lime);
  text-align: center;
  border-bottom: 2px solid var(--color-volt-lime);
  padding-bottom: 1vh;
  margin-bottom: 1.5vh;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.table-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5vw;
}

.table-wrapper::-webkit-scrollbar {
  width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: rgba(10, 0, 32, 0.5);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(145, 229, 0, 0.4);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(145, 229, 0, 0.6);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 1vh;
  font-family: var(--font-display);
  table-layout: fixed;
}

th, td {
  padding: 1.2vh 1vw;
  text-align: left;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  background-color: rgba(50, 0, 100, 0.3);
  color: var(--color-sunburst);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(1rem, 1.8vh, 1.5rem);
  position: sticky;
  top: 0;
  z-index: 10;
}

tbody tr {
  background-color: rgba(10, 0, 32, 0.7);
  transition: background-color 0.2s ease, transform 0.2s ease;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

tbody tr:hover {
  transform: scale(1.005);
  background-color: rgba(15, 0, 45, 0.9);
}

tbody td {
  font-size: clamp(1.1rem, 2vh, 1.8rem);
  white-space: nowrap;
}

/* Rank Column */
.rank {
  width: 12%;
  text-align: center;
  font-weight: bold;
  color: var(--color-hyper-pink);
}

/* Team Name Column - Takes Most Space */
td:nth-child(2) {
  width: 68%;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding-right: 1.5vw;
}

/* Points Column */
td:nth-child(3) {
  width: 20%;
  text-align: right;
  font-weight: bold;
}

/* Top 3 Styling */
.rank-1 td {
  background-color: rgba(145, 229, 0, 0.2) !important;
  color: #fff;
  box-shadow: 0 0 10px rgba(145, 229, 0, 0.4);
  border: 1px solid rgba(145, 229, 0, 0.3);
}

.rank-2 td {
  background-color: rgba(253, 26, 159, 0.2) !important;
  color: #fff;
  border: 1px solid rgba(253, 26, 159, 0.3);
}

.rank-3 td {
  background-color: rgba(255, 246, 0, 0.2) !important;
  color: #fff;
  border: 1px solid rgba(255, 246, 0, 0.3);
}

/* Loading State */
tbody tr td[colspan="3"] {
  text-align: center;
  font-size: clamp(1rem, 2vh, 1.5rem);
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* --- Admin Panel Stijlen --- */
.admin-body {
  background: linear-gradient(
    140deg,
    rgba(10, 0, 32, 1) 0%,
    rgba(58, 0, 112, 1) 50%,
    rgba(10, 0, 32, 1) 100%
  );
  color: #f8f8ff;
  display: block;
  padding: 10px;
}

.admin-container {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background: rgba(10, 0, 32, 0.95);
  border: 1px solid rgba(173, 118, 255, 0.4);
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(173, 118, 255, 0.3);
}

.admin-container h2 {
  font-family: var(--font-display);
  color: var(--color-volt-lime);
  border-bottom: 2px solid var(--color-hyper-pink);
  padding-bottom: 8px;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-size: 1.8rem;
}

.team-input {
  margin-bottom: 15px;
  padding: 15px;
  border: 1px dashed var(--color-sunburst);
  border-radius: 8px;
}

.team-input h3 {
  font-family: var(--font-display);
  color: var(--color-hyper-pink);
  margin-top: 0;
  text-transform: uppercase;
  font-size: 1.4rem;
}

.admin-container label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-family: var(--font-display);
  color: #fff;
}

.admin-container input[type="text"],
.admin-container input[type="number"],
.admin-container input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-top: 0;
  border-radius: 6px;
  border: 1px solid rgba(173, 118, 255, 0.5);
  background: rgba(10, 0, 32, 0.7);
  color: #fff;
  font-size: 1rem;
}

.admin-container input[type="submit"],
.admin-container a {
  padding: 10px 18px;
  margin-top: 15px;
  font-size: 1rem;
}

/* --- Responsive: Mobiel --- */
@media (max-width: 768px) {
  .admin-body {
    padding: 5px;
  }

  .admin-container {
    margin: 10px auto;
    padding: 15px;
    width: 100%;
  }

  .container {
    flex-direction: column;
    gap: 2vh;
    padding: 1vh 2vw;
  }

  .recent-result {
    flex: 0 0 auto;
    height: 35vh;
  }

  .top-10 {
    flex: 1;
  }

  .match-details {
    gap: 2vw;
  }

  .match-details .name {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
  }

  .match-details .score {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }
}