/* page fills viewport; footer sits at bottom */
html, body { height: 90%; margin: 0;  }
body.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #f5f5f5;
  font-family: system-ui, sans-serif;
  background: linear-gradient(180deg, #1e1e2f, #3a3a5c);
  background-attachment: fixed;
  color: #fff;
}

.page-content {
  flex: 1 1 auto;             /* push footer to the bottom */
  padding: 1rem;
  display: flow-root;   /* prevents margin collapsing from first child */
  isolation: isolate;
}

.site-header {
  color: #fff;
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
  font-family: "Luckiest Guy", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin-top: 0rem;
  flex: 0 0 auto;
  overflow: hidden;
}


.bg-wrapper {
  position: absolute;               /* full-bleed background */
  inset: 0;
  z-index: 0;
  height: 13%;
  overflow: hidden;
}

.bg-wrapper img {
  width: 100%;
  object-fit: cover;               
  display: block;  
}                

.site-header h1 {
  margin: 0; 
  position: relative;
  z-index: 1;
}

.site-header h1 a {
  display: inline-block;
  padding: 1rem 1rem;
  background: #ff4747;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 0 #c33, 0 6px 6px rgba(0,0,0,0.3);
  font-size: clamp(0.6rem, 5vw, 2rem); /* scale w screen size */
  white-space: nowrap; /* stops breaking into two lines */
  transition: all 0.15s ease-in-out;
}

.site-header h1 a:hover {
  background: #ff7070;
  box-shadow: 0 2px 0 #c33, 0 3px 3px rgba(0,0,0,0.3);
  transform: translateY(2px);
}

.site-footer {
  background: #3a3a5c;
  color: #aaa;
  text-align: center;
  padding: 1rem;
  font-size: 0.7rem;
  flex: 0 0 auto;
  margin-top: auto;
  z-index: 2;
}

/* title above each leaderboard */
.map_title {
  text-align: center;
  font-family: "Luckiest Guy", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: 0.02em;
  font-size: clamp(2rem, 4vw + 1rem, 5rem);
  color: #fafbc7;
  text-shadow: 2px 2px 0 #000;
  background: none;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.cup-title {
font-family: "Luckiest Guy", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(1.8rem, 3vw + 0.5rem, 3rem);
  color: #fafbc7;
  text-shadow: 2px 2px 0 #000;
  background: none;
  margin-top: 0.3rem;
  margin-right: -1rem;
  margin: 0;
}

.cup-container {
  display: flex;
  align-items: center;
}


.track-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin-bottom: 3rem;
  margin-top: 0rem;
}

.board-wrapper {
    overflow-x: visible;      
    max-width: 100%;
    max-width: 800px;
    margin: 0 auto;     
}

.board {
    border-collapse: collapse;
    width: 100%;               
    max-width: 90%;            
    margin: 2rem auto;         
    background: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: visible;
    font-size: 1rem;          
    color: #333;               
    position: relative;
}

@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --clr-1: #1e1e2f;
  --clr-2: #863e03;
  --clr-3: #910b0b;
  --clr-4: #8ab51c;
  --clr-5: #354f9e;
}

.board::before,
.board::after {
  content: "";
  position: absolute;
  inset: -0.5rem;
  z-index: -1;
  background: conic-gradient(
    from var(--gradient-angle),
    var(--clr-3),
    var(--clr-4),
    var(--clr-5),
    var(--clr-4),
    var(--clr-3)
  );
  border-radius: inherit;
  animation: rotation 6s linear infinite;
}

.board::after {
  filter: blur(0.5rem);
}

@keyframes rotation {
  0% {
    --gradient-angle: 0deg;
  }
  100% {
    --gradient-angle: 360deg;
  }
}

.board th, 
.board td {
  padding: 0.75em 1em;       
  text-align: left;
}

.board thead th {
  background: #ebe9e9; 
  font-weight: 600;
  color: #333;
}

.board tbody tr:first-child td {
    font-weight: 600;
    background: #fccdcd;
}

.board tbody tr:nth-child(2) td {
    font-weight: 600;
    background: #fcf6cd;
}

.board tbody tr:nth-child(3) td {
    font-weight: 600;
    background: #cdd6fc;
}

/*.board tr:hover td {
  background: #cdcccc;       /* subtle hover effect */
/*}*/

.board .empty {
  text-align: center;
  color: #777;
  font-style: italic;
}
  
.back-link a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: #ff4747;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 3px 0 #c33, 0 4px 4px rgba(0,0,0,0.25);
  transition: all 0.15s ease-in-out;
}

.back-link a:hover {
  background: #ff7070;
  box-shadow: 0 1px 0 #c33, 0 2px 2px rgba(0,0,0,0.25);
  transform: translateY(2px);
}

.submit-button {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: #ff4747;
  color: #fff;
  border: none;              /* remove default button border */
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;           /* hand cursor like links */
  text-decoration: none;
  line-height: 1;            
  box-shadow: 0 3px 0 #c33, 0 4px 4px rgba(0,0,0,0.25);
  transition: all 0.15s ease-in-out;
  margin-top: 0.8rem;
}

.submit-button:hover {
  background: #ff7070;
  box-shadow: 0 1px 0 #c33, 0 2px 2px rgba(0,0,0,0.25);
  transform: translateY(2px);
}

.submit-button:focus {
  outline: none;             /* remove default focus ring */
}

.submit-button:active {
  transform: translateY(2px); /* ensures click state matches hover */
}

.submit-button-signup {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: #b8afd7;
  color: #180e0e;
  border: none;              /* remove default button border */
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;           /* hand cursor like links */
  text-decoration: none;
  line-height: 1;            
  box-shadow: 0 3px 0 rgb(73, 66, 88), 0 4px 4px rgba(0,0,0,0.25);
  transition: all 0.15s ease-in-out;
  margin-top: 0.8rem;
}

.submit-button-signup:hover {
  background: #fff;
  box-shadow: 0 1px 0 rgb(197, 189, 231), 0 2px 2px rgba(0,0,0,0.25);
  transform: translateY(2px);
}

.submit-button-signup:focus {
  outline: none;             
}

.submit-button-signup:active {
  transform: translateY(2px); 
}

.sign-up-buttons {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  margin-top: 2rem;
} 

.sign-up-buttons a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: #b8afd7;
  color: #180e0e;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 3px 0 rgb(73, 66, 88), 0 4px 4px rgba(0,0,0,0.25);
  transition: all 0.15s ease-in-out;
}

.sign-up-buttons a:hover {
  background: #fff;
  box-shadow: 0 1px 0 rgb(197, 189, 231), 0 2px 2px rgba(0,0,0,0.25);
  transform: translateY(2px);
}

.not-signed-up a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: #b8afd7;
  color: #180e0e;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 3px 0 rgb(73, 66, 88), 0 4px 4px rgba(0,0,0,0.25);
  transition: all 0.15s ease-in-out;
}

.not-signed-up a:hover {
  background: #fff;
  box-shadow: 0 1px 0 rgb(197, 189, 231), 0 2px 2px rgba(0,0,0,0.25);
  transform: translateY(2px);
}

.submit-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 1rem;
  align-items: flex-start;
  gap: 0.6rem;
  border-radius: 0.8rem;
}

.submit-form-signup {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 2rem;
  align-items: center;
  gap: 0.6rem;
  border-radius: 0.8rem;
}

.input-wrapper {
  position: relative;
  border-radius: 0.5rem;
  padding: 2px; 
  display: inline-block;
}

.input-wrapper:hover::before,
.input-wrapper:hover::after {
  content: "";
  position: absolute;
  inset: -0.1rem;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(
    from var(--gradient-angle),
    var(--clr-3),
    var(--clr-4),
    var(--clr-5),
    var(--clr-4),
    var(--clr-3)
  );
  animation: rotation 6s linear infinite;
}

.input-wrapper::after {
  filter: blur(0.5rem);
}

.input-wrapper input {
  width: 250px;
  padding: 0.2rem 0.4rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  outline: none;
  background: #fff;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flashes { 
  list-style-type: none; 
  padding: 0; 
  /* center in page */
  display: flex;
  flex-direction: column;
  align-items: center;
}
.flashes li.invalid_time { color: red; }
.flashes li.invalid_screenshot { color: red; }
.flashes li.missing_screenshot { color: red; }
.flashes li.invalid_credentials { color: red; }
.flashes li.pending { color: yellow; }
.flashes li.success { color: green; }
