@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Montserrat:wght@600&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  color: #ffd700;  
  background-color: black;
  height: 100vh;
  overflow: hidden;
  cursor: url('angel.png') 16 16, auto;
}

.wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  text-align: center;
  padding: 1.5rem 0;
  
  /* Standard Syntax */
  background: linear-gradient(to bottom right, #1b0303, #430701, #1b0303);
  
  /* Adding a subtle border-bottom to match your gold theme */
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  
  /* Keep your shadow for that 'lifted' look */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
  color: #ffdf00;
  letter-spacing: 3px;
  text-shadow: 0 0 10px #ffe135;
}

body b {
  margin: 0;
  font-size: 1.2rem;
  color: #ffdf00;
  letter-spacing: 1px;
  text-shadow: 0 0 4px #ffe135;
  display: block;
  text-align: center;
}

body b.sub {
  margin: 0;
  font-size: 1rem;
  color: #ffdf00;
  letter-spacing: 1px;
  text-shadow: 0 0 3px #ffe135;
  display: block;
  text-align: start;
}

main {
  flex: 1;
  overflow-y: auto;
  padding-top: 2.5rem;
  padding-bottom: 1rem;

  
    background: url('bg1.jpg') no-repeat center top;
  background-size: cover; 
  
  /* Fallback for older mobile browsers that struggle with 'fixed' */
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
}

.controls {
  text-align: center;
  margin-bottom: 1rem;
}

.controls input {
  padding: 0.5rem;
  border: 1px solid gold;
  border-radius: 5px;
  width: 200px;
  background-color: #111;
  color: gold;
  font-size: 1rem;
}

.controls button {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: gold;
  color: black;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 10px #ffd700;
  transition: background-color 0.3s ease;
}

.elo-cell {
  position: relative;
  text-align: center;
}

.elo {
  display: inline-block;
}

.elo-change {
  position: absolute;
  left: 50%;
  transform: translateX(24px); /* a bit more space than rank */
  font-size: 12px;
}

.elo-change.up {
  color: green;
}

.elo-change.down {
  color: red;
}

.place-cell {
  position: relative;
  text-align: center;
}

.place {
  display: inline-block;
}

.rank-change {
  font-size: 12px;
  margin-left: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(10px); /* move a bit to the right */
  font-size: 12px;
}

.rank-change.new {
  color: cyan;
}

.rank-change.down {
  color: red;
}

.rank-change.up {
  color: green;
}

.controls button:hover {
  background-color: #ffec8b;
}

.table-container {
  width: min(1100px, 100%);
  max-height: 80vh;
  margin: auto;
  overflow-y: auto; 
  
  box-sizing: border-box; 
  
  border-radius: 16px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.add-padding-about {
  padding-left: 1em;
  padding-right: 1em;
}

thead th {
  /* This keeps the header at the top while scrolling */
  position: sticky;
  top: 0;
  z-index: 10;
  
  background: linear-gradient(90deg, #ffd700, #b8860b);
  color: black;
  padding: 0.8rem;
  font-size: 1rem;
  border: none;
}

table {
  width: 100%;
  border-collapse: separate; /* 🔥 important */
  border-spacing: 0;
  color: gold;
}

tbody td {
  padding: 0.5rem;
  text-align: center;
  font-size: 1.1rem;
  border-top: 1px solid #444;
  transition: background-color 0.3s ease;
}

tbody tr:hover {
  background-color: rgba(255, 215, 0, 0.2);
}

.table-container::-webkit-scrollbar {
  width: 12px;
}

.table-container::-webkit-scrollbar-track {
  background: #111;
  /* Match the border radius of your container */
  border-radius: 0 16px 16px 0; 
}

.table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(#ffd700, #b8860b);
  border-radius: 10px;
  border: 2px solid #111; /* Creates padding around the thumb */
}

footer {
  text-align: center;
  font-size: 0.8rem;
  padding: 0.3rem;
  background: black;
  color: gold;
  border-top: 1px solid #444;
}

th {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.arrow {
  font-size: 18px;
  margin-left: 6px;
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
  color: #666;
}

th:hover .arrow {
  color: #000;
  transform: scale(1.2);
}