/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background-color: #f4f6f8;
  color: #333;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: url('assets/deepsliphq.webp');
  background-repeat: no-repeat;
  background-position: center 15%;
  background-attachment: fixed;
  background-size: cover;
}

header {
  background: linear-gradient(#001e3d, #002b53);
  padding: 1rem;
  text-align: center;
  color: #fff;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

.table-container {
  flex: 1;
  width: 90%;
  max-width: 1000px;
  margin: 2rem auto;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #202020;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  color:#ffffff
}

thead {
  background: linear-gradient(90deg, #0066cc, #004080);
}

thead th {
  color: #ffffff;
  font-weight: 500;
}

tbody tr {
  transition: background-color 0.2s ease;
}

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

tbody tr:hover {
  background-color: #3f3f3f;
}

tbody td a {
  text-decoration: none;
  font-weight: 500;
  color: #0066cc;
}

tbody td a:hover {
  text-decoration: underline;
}

#leaderboard tbody td:nth-child(2) a {
  color: #fff;
  text-decoration: none;
}

#leaderboard tbody td:nth-child(2) a:hover {
  color: #fff;
}


#leaderboard tbody td:nth-child(5) a {
  color: #0066cc;
}

#leaderboard tbody td:nth-child(5) a:hover {
  color: #004080;
}

/* Responsive text sizing */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }
  th, td {
    padding: 0.5rem 0.75rem;
  }
}

/* Tooltip wrapper around the ℹ️ icon */
.info-tooltip {
  position: relative;
  display: inline-block;
  margin-left: 0.25em;
  cursor: help;
  font-size: 0.9em;
  line-height: 1;
}

/* Hidden tooltip text */
.info-tooltip .tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 200px;
  background-color: rgba(32, 33, 36, 0.95);
  color: #fff;
  text-align: left;
  border-radius: 4px;
  padding: 0.5em;
  font-size: 0.875em;
  line-height: 1.2;
  
  /* position above the icon */
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-0.5em);
  
  /* smooth fade-in */
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
  display: none;
}

/* Show on hover */
.info-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.table-container {
  overflow-x: auto;
  overflow-y: visible;
  position: relative;  /* establish a stacking context */
}

/* ensure the table itself isn’t clipping overflow */
.table-container table {
  overflow: visible;
}

.floating-tooltip {
  visibility: hidden;      /* shown by JS */
  background-color: rgba(32,33,36,0.95);
  color: #fff;
  padding: 0.5em;
  border-radius: 4px;
  font-size: 0.875em;
  line-height: 1.2;
  max-width: 200px;
  white-space: pre-wrap;
  z-index: 9999;
}