@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300&display=swap');

@font-face {
  font-family: hyperSuperFast; /* set name */
  src: url(/fonts/HyperSuperFast.ttf); /* url of the font */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}


.logo {

    margin: 1.5rem;

    width: 5rem;

    height: 5rem;

}



.primary-header {

    align-items: center;

    justify-content: space-between;

    background-color: black;

    margin: 0;

    padding: 0;

    width: 100%;

    height: 7rem;

}



.primary-navigation {

    list-style: none;

    padding: 0;

    margin: 0;



    background: hsl(0 0% 0% / 0.75);

}



.mobile-nav-toggle {

    display: none;

}



@supports (backdrop-filter: blue(1rem)) {

    .primary-navigation {

        background: hsl(0 0% 0% / 0.75);

        backdrop-filter: blue(4rem);

    }

}



.primary-navigation a {

    text-decoration: none;

    font-weight: 300;

    font-family:  "Titillium Web", sans-serif;

    font-size: 20px;

    margin-inline-end: .75rem;

    color: white;

    white-space: nowrap;

}



@media (max-width: 35em) {

    .primary-navigation {

        --gap: 3em;

        

        position: fixed;

        z-index: 1000;

        inset: 0 0 0 40%;



        flex-direction: column;

        padding: min(30vh, 10rem) 2em;



        background: hsl(0 0% 0% / 0.75);

        backdrop-filter: blue(4rem);



        transform: translateX(100%);

        transition: transform 350ms ease-out;

    }



    .primary-header {

        width: 100%;

    }



    .primary-navigation[data-visible="true"] {

        transform: translateX(0%);

    }



    .mobile-nav-toggle {

        display: block;

        position: absolute;

        z-index: 9999;

        background-color: transparent;

        background-image: url("/images/icon-hamburger.png");

        background-repeat: no-repeat;



        width: 2rem;

        border: 0;

        aspect-ratio: 1;

        top: 2.5rem;

        right: 2rem;

    }



    .mobile-nav-toggle[aria-expanded="true"]{

        background-image: url("/images/icon-closed.png");

    }



}

@media (max-width: 600px) {
  .driver-portrait {
    height: 65%;
  }

  .driver-number {
    width: 100px;
  }
}

@media (max-width: 600px) {
  .driver-number {
    width: 100px;
  }

  .driver-number-fallback {
    width: 100px;
    font-size: 52px;
  }
}


@media (min-width: 35em) and (max-width: 55em)

{

    .primary-navigation a > [aria-hidden] {

        display: none;

    }

}



@media (min-width: 35em) {

    .primary-navigation {

        --gap: 3rem;

        padding: 1rem;

        padding-inline: clamp(2rem, 9vw, 8rem);

    }

}

@media (max-width: 768px) {
  .current-points-table,
  .current-points-table thead,
  .current-points-table tr {
    display: block;
    width: 100%;
  }

  .current-points-table tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .current-points-table th {
    display: block;
    font-size: 18px;
    white-space: nowrap;
    background: var(--soft-chip-bg);
    color: var(--soft-chip-text);
    padding: 6px 10px;
    border-radius: 6px;
  }
}

@media (min-width: 768px) {
  .current-points-table th {
    font-size: 28px;
    gap: 26px;
  }
}



.flex {

    display: flex;

    gap: var(--grap, 1rem);

}

.current-points-table th:nth-child(1),
.current-points-table th:nth-child(2) {
  background: #5cc0b3;
  color: #000;
}

body{
  background: var(--page-bg);
  color: var(--text-color);
}

.emailLink, body {

    overflow-x: hidden;

    text-align: center;

    color: var(--text-color);

    font-family:  "Titillium Web", sans-serif;

    font-weight: 300;

    font-size: 16px;

    text-decoration: none;

    margin: 0;

    padding: 0;

}



a {

    color: var(--link-color);

    font-family:  "Titillium Web", sans-serif;

    font-weight: 300;

    font-size: 16px;

    text-decoration: none; 

}

:root{

    --table-head-color: #5cc0b3;

    --table-head-text-color: #ffffff;

    --table-tr-color: #dddddd;

    --table-tr-even-color: #eeeeee;

    --table-tr-last-color: #5cc0b3;

    --h2-color: #181818;

    --bg-color: #ffffff;

    /* NEW: general theme */
    --page-bg: #ffffff;
    --text-color: #181818;
    --link-color: #181818;

    /* light “chip” background used by current-points headers */
    --soft-chip-bg: rgba(0,0,0,0.05);
    --soft-chip-text: #181818;

    /* table wrapper / misc white panels */
    --panel-bg: #ffffff;

}



.darkmode {

  --table-head-color: #5cc0b3;
  --table-head-text-color: #000000;
  --table-tr-color: #2b2b2b;
  --table-tr-even-color: #202020;
  --table-tr-last-color: #5cc0b3;
  --h2-color: #ebebeb;

  /* NEW: general theme */
  --page-bg: #0f0f10;
  --text-color: #ebebeb;
  --link-color: #ebebeb;

  --soft-chip-bg: rgba(255,255,255,0.08);
  --soft-chip-text: #ffffff;

  --panel-bg: #151515;

}

.darkmode .content-table{
  box-shadow: 0 0 20px rgba(0,0,0,0.55);
}


.content-table {

    border-collapse: collapse;

    margin: 25px 0px;

    font-size: 0.8em;

    min-width: 400px;

    border: 5px 5px 0 0;

    overflow: hidden;

    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);

}

.current-points-table,
.current-points-table thead,
.current-points-table tr {
  display: block;
  width: 100%;
}

.current-points-table tr {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.current-points-table th {
  font-family: "hyperSuperFast";
  font-size: 24px;
  white-space: nowrap;

  background: rgba(0, 0, 0, 0.05);
  padding: 8px 14px;
  border-radius: 8px;
}


#trackImg {
  width: 100%;
  height: 400px;
  display: block;
}

.top-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;

  background: rgba(0, 0, 0, 0.7);
  color: white;

  font-family: "hyperSuperFast";
  font-size: 36px;
  font-weight: bold;

  padding: 20px 0;
  text-align: center;
}

.unknown-driver {
  position: absolute;
  bottom: 20px;
  left: 20px;

  font-family: "hyperSuperFast";
  font-size: 24px;
  color: white;
  opacity: 0.8;
}


.driver-portrait {
  position: absolute;
  bottom: 0;
  left: 20px;

  height: 80%;
  max-height: 520px;

  pointer-events: none; /* optional */

  filter: drop-shadow(-5px 5px 15px rgba(0,0,0,0.6));
}

.finish-container {
  position: absolute;
  bottom: 20px;
  right: 20px;

  text-align: right;
}

.finish-text {
  font-family: "hyperSuperFast";
  font-size: 28px;
  font-weight: bold;
  color: white;

  margin-bottom: 10px;
  text-shadow:
    -2px -2px 0 #000,
     2px -2px 0 #000,
    -2px  2px 0 #000,
     2px  2px 0 #000;
}

.driver-number {
  width: 140px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.6));
}

/* Text fallback styled to match the image footprint */
.driver-number-fallback {
  width: 140px;              /* match .driver-number width */
  line-height: 1;            /* remove extra vertical padding */
  margin: 0;                 /* no default spacing */
  padding: 0;                /* no padding */
  display: flex;
  align-items: flex-end;     /* visually sits like the PNG does */
  justify-content: flex-end; /* hug bottom-right */
  
  font-family: "hyperSuperFast";
  font-size: 72px;           /* tweak to taste */
  color: white;

  text-shadow:
    -2px -2px 0 #000,
     2px -2px 0 #000,
    -2px  2px 0 #000,
     2px  2px 0 #000;

  filter: drop-shadow(0 0 8px rgba(0,0,0,0.6));
}

.content-table thead tr {

    background-color: var(--table-head-color);

    color: var(--table-head-text-color);

    text-align: center;

    font-weight: bold;

    font-size: 12px;

}

.currentStandings {
  margin-bottom: 20px;
}

.image-container {
  position: relative;
  width: 700px;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.top-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  background-color: rgba(0, 0, 0, 0.65);
  color: white;

  font-family: "hyperSuperFast";
  font-size: 36px;
  font-weight: bold;

  padding: 0px 0;

  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;
}

.text-overlay {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);

  color: white;
  font-family: "hyperSuperFast";
  font-size: 36px;
  font-weight: bold;

  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;

  padding: 10px 20px;
}

.content-table th,

.content-table td {

padding: 6px 3px;

}



.content-table tbody tr {

    border-bottom: 1px solid var(--table-tr-color);

}



.content-table tbody tr:nth-of-type(even) {

    background-color: var(--table-tr-even-color);

}



.content-table tbody td:nth-child(1) {

    background-color: var(--table-tr-even-color);

}



.content-table tbody tr:last-of-type {

    border-bottom: 2px solid var(--table-tr-last-color);

}



.leaderboard {

  background-color: var(--panel-bg);

}



h2 {

    text-align: center;

    color: var(--h2-color);

    font-family:  "hyperSuperFast";

    font-weight: 300;

    font-size: 54px;

    text-decoration: none;

}



.pickLink

{

    text-align: center;

    color: var(--h2-color);

    font-family:  "Titillium Web", sans-serif;

    font-weight: 300;

    font-size: 16px;

    text-decoration: none;

    margin: -1px 0px;

}



#loginstate

{

    color: white;

}








#loginstate a

{

    color: white;

}

.h2h-card {
  width: 700px;
  max-width: 100%;
  margin: 30px auto;
  padding: 20px;
  background: #000;
  color: #fff;
  font-family: "hyperSuperFast";
}

.h2h-players {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.vs{
  font-family:"hyperSuperFast";
  font-size: 36px;
  color: rgba(255,255,255,0.75);
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
  padding: 0 10px;
}

@media (max-width: 600px){
  .h2h-players{ grid-template-columns: 1fr; }

}

.player {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 14px;
  border-radius: 10px;
}

.player.winner {
  background: rgba(92, 192, 179, 0.9);
  color: white;
}

.h2h-summary {
  margin-top: 16px;
  text-align: center;
  font-size: 18px;
}

@media (max-width: 600px) {
  .h2h-players {
    grid-template-columns: 1fr;
  }
}

.compare-bar {
  width: 700px;
  max-width: 100%;
  margin: 16px auto;
  display: flex;
  justify-content: center;
}

.compare-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(0,0,0,0.85);
  color: white;
  border-radius: 12px;
  font-family: "hyperSuperFast";
}

.compare-form select,
.compare-form button {
  font-family: inherit;
  font-size: 16px;
  padding: 8px 10px;
}

.compare-form button {
  cursor: pointer;
}

.compare-form a {
  font-family: hyperSuperFast;
}

.h2h-scoreboard{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  font-family: "hyperSuperFast";
  text-align: center;
}

.sb-item{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 10px;
}

.sb-label{
  font-size: 14px;
  opacity: 0.85;
  letter-spacing: 1px;
}

.sb-value{
  font-size: 26px;
  margin-top: 6px;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

.sb-value.pos{ color: #5cc0b3; }
.sb-value.neg{ color: #ff6b6b; }

.sb-chip{
  margin-top: 8px;
  display: inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(92,192,179,0.25);
  border: 1px solid rgba(92,192,179,0.6);
  font-size: 14px;
}

@media (max-width: 700px){
  .h2h-scoreboard{ grid-template-columns: repeat(2, 1fr); }
}

.player { position: relative; overflow: hidden; }

.winner-badge{
  position:absolute;
  top:10px;
  left:10px;
  background:#000;
  color: white;
  border:2px solid white;
  padding:6px 10px;
  border-radius:10px;
  font-size:14px;
  letter-spacing:1px;
}

.rival-glow{
  box-shadow: 0 0 25px rgba(255, 60, 0, 0.45);
}

.season-badges{
  width: 700px;
  max-width: 100%;
  margin: 10px auto 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.season-badges .badge{
  font-family: "hyperSuperFast";
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 18px;
  border: 1px solid rgba(92,192,179,0.45);
}

.rival-card{
  width: 700px;
  max-width: 100%;
  margin: 12px auto;
  margin-left: auto;
  margin-right: auto;
  padding: 12px 14px;
  background: rgba(0,0,0,0.85);
  border-radius: 12px;
  border: 1px solid rgba(255,60,0,0.35);
  box-shadow: 0 0 18px rgba(255,60,0,0.18);
  font-family: "hyperSuperFast";
  color: white;
  text-align: center;
}

.rival-title{ font-size: 20px; margin-bottom: 6px; }
.rival-stats{ font-size: 16px; }
.rival-stats a {
  color: #5cc0b3;
  margin-left: 0;          /* ✅ remove */
  text-decoration: none;
}

.projection-bar{
  width: 700px;
  max-width: 100%;
  margin: 10px auto 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.proj-tile{
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(92,192,179,0.35);
  border-radius: 14px;
  padding: 12px 10px;
  font-family: "hyperSuperFast";
  color: white;
  text-align: center;
}

.proj-label{
  font-size: 14px;
  opacity: 0.85;
  letter-spacing: 1px;
}

.proj-value{
  margin-top: 6px;
  font-size: 26px;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

/* Trend accents (optional but fun) */
.proj-value.trend.hot{ color: #ffb703; }      /* gold-ish */
.proj-value.trend.warm{ color: #5cc0b3; }     /* your teal */
.proj-value.trend.steady{ color: #ffffff; }
.proj-value.trend.cold{ color: #8ecae6; }     /* light blue */
.proj-value.trend.ice-cold{ color: #48cae4; } /* brighter blue */

@media (max-width: 700px){
  .projection-bar{
    grid-template-columns: 1fr;
  }
}

.rival-stats {
  display: flex;
  align-items: center;
  justify-content: center; /* ✅ this recenters the whole line */
  gap: 8px;
  flex-wrap: wrap;
  font-family: "hyperSuperFast";
}

.rival-divider {
  opacity: 0.6;
  margin: 0 4px;
}

.momentum-chip {
  font-size: 18px;
}

.momentum-chip.A_HOT,
.momentum-chip.B_HOT {
  color: #ff6b6b;
}

.momentum-chip.A_EDGE {
  color: #5cc0b3;
}

.momentum-chip.B_EDGE {
  color: #f39c12;
}


.image-container {
  position: relative; /* important so absolute children anchor correctly */
}

.win-flag{
  position: absolute;
  right: 0px;        /* align to the same right edge as FINISHED/number */
  bottom: 100%;    /* sit ABOVE the finish block */
  margin-bottom: 8px; /* little gap */
  width: 120px;
  height: auto;
  z-index: 6;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.35));
}

/* Mobile tweak */
@media (max-width: 600px){
  .win-flag{
    width: 120px;
    margin-bottom: 6px;
  }
}

.finish-container { position: absolute;
  right: 20px;
  bottom: 18px;
  text-align: right;
}

.rival-card{
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 44px; /* arrows + content + arrows */
  align-items: center;
  gap: 8px;
}

.rival-content{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rival-arrow{
  appearance: none;
  border: 0;
  background: transparent;
  color: white;
  font-family: "hyperSuperFast";
  font-size: 34px;
  cursor: pointer;
  padding: 8px 0;
  line-height: 1;
  opacity: 0.9;
}

.rival-arrow:hover{ opacity: 1; }
.rival-arrow:active{ transform: scale(0.96); }

@media (max-width: 600px){
  .rival-card{ grid-template-columns: 36px 1fr 36px; }
  .rival-arrow{ font-size: 30px; }
}

.rival-arrow.is-hidden{
  visibility: hidden;   /* keeps spacing */
  pointer-events: none; /* can’t click */
}

.finish-emoji.win-flag-anim{
  display: inline-block;
  animation: glowPulse 1.75s ease-in-out infinite;
}

@keyframes glowPulse{
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
  50%      { filter: drop-shadow(0 0 10px rgba(255,255,255,0.75)); }
}

@media (prefers-reduced-motion: reduce){
  .win-flag-anim{ animation: none !important; }
}

.usedup-panel{
  width: 700px;
  max-width: 100%;
  margin: 10px auto 16px;
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(92,192,179,0.35);
  border-radius: 14px;
  padding: 10px 12px;
  font-family: "hyperSuperFast";
  color: white;
}

.usedup-summary{
  cursor: default;
  list-style: none;
  font-size: 16px;
  letter-spacing: 0.5px;

  display: flex;
  align-items: center;
  justify-content: center;   /* ✅ center text */

  text-align: center;
  width: 100%;
}

.usedup-summary::-webkit-details-marker{ display:none; }

.usedup-alert{
  color: #ffb703;
  margin-left: 10px;
}

.usedup-grid{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.usedup-item{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.usedup-item.overused{
  border-color: rgba(255, 183, 3, 0.7);
  box-shadow: 0 0 12px rgba(255, 183, 3, 0.18);
}

.usedup-number{
  width: 56px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.55));
}

.usedup-fallback{
  font-size: 22px;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

.usedup-count{
  position: absolute;
  bottom: -8px;
  right: -8px;
  background: rgba(92,192,179,0.95);
  color: #000;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,0.35);
}

.usedup-note{
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.85;
  font-family: "Titillium Web", sans-serif;
}

.usedup-note-warn{
  color: #ffb703;
  margin-left: 8px;
}

@media (max-width: 600px){
  .usedup-number{ width: 46px; }
}

.champion-glow{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 0;               /* create stacking context */
}

/* Put glow BEHIND the image */
.champion-glow::before{
  content: "";
  position: absolute;
  inset: -14px;             /* glow reach */
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;

  background: radial-gradient(
    closest-side,
    rgba(255,183,3,0.55),
    rgba(255,183,3,0.00) 90%
  );

  filter: blur(12px);
  opacity: 0.25;
  transform: scale(0.96);

  will-change: opacity, transform;
  -webkit-animation: champAura 2.2s ease-in-out infinite;
  animation: champAura 2.2s ease-in-out infinite;
}

/* iOS Safari likes prefixed keyframes */
@-webkit-keyframes champAura{
  0%, 100% { opacity: 0.20; transform: scale(0.96); }
  50%      { opacity: 0.60; transform: scale(1.05); }
}
@keyframes champAura{
  0%, 100% { opacity: 0.20; transform: scale(0.96); }
  50%      { opacity: 0.60; transform: scale(1.05); }
}

.champion-badge-img{
  height: 48px;
  width: auto;
  display: block;

  /* keep your base glow if you want */
  filter:
    drop-shadow(0 0 6px rgba(255,183,3,0.35))
    drop-shadow(0 0 14px rgba(255,183,3,0.22));
}

.champion-badge-link{ display: inline-flex; }

@media (max-width: 480px){
  .champion-badge-img{ height: 42px; }
}

/* normalize the name + champion badge spacing */
h2{
  margin: 18px 0 10px;   /* top/bottom spacing you control */
  line-height: 1.05;     /* helps reduce extra perceived whitespace */
}

.champion-badges{
  margin: 0 auto 14px;   /* remove top margin so it doesn't push down */
}

/* optional: tighten the gap before the stat tiles */
.currentStandings{
  margin-top: 0;
  margin-bottom: 20px;  /* keep as-is (or adjust) */
}

.theme-toggle-wrap{
  width: 700px;
  max-width: 100%;
  margin: 10px auto 0;
  padding: 0 12px;
  display: flex;
  justify-content: flex-end;
  box-sizing: border-box;
}

.theme-toggle{
  font-family: "hyperSuperFast";
  background: rgba(0,0,0,0.85);
  color: #fff;
  border: 1px solid rgba(92,192,179,0.45);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1;
}

.darkmode .theme-toggle{
  background: rgba(255,255,255,0.06);
  color: #fff;
}
