@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --RESULT-DIALOG-WIDTH: min(85vw, 500px);
    --NAMES-DIALOG-WIDTH: min(85vw, 700px);
    --HEADER-WIDTH: min(90vw, 550px);
    --GAMEBOARD-SIDE: min(90vw, 470px);

    --TITLE-FS: clamp(3rem, 13vw, 4.5rem);
    --TURN-MSG-FS: clamp(1.5rem, 10vw, 2.5rem);
    --PLAYER-SYMBOL-FS: clamp(2rem, 15vw, 5rem);
    --FOOTER-FS: clamp(1rem, 5vw, 1.2rem);
    --RESULT-DIALOG-FS: clamp(1.2rem, 8vw, 2.3rem);

    --LIGHT-COLOR: rgb(216, 200, 173);
    --EXTRA-LIGHT-COLOR: rgb(230, 223, 210);
}

html {
    position: relative;
    min-height: 100vh;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: rgb(211, 162, 88);
    margin-bottom: 100px;
    user-select: none;
}

/* HEADER */

header {
    padding-top: 30px;
    margin-bottom: 40px;
}

header h1 {
    margin: 0 auto;
    padding: 20px 0;
    width: var(--HEADER-WIDTH);
    text-align: center;
    font-size: var(--TITLE-FS);
    background-color: var(--LIGHT-COLOR);
    color: #333;
    border-radius: 20px;
}

header h1:hover {
    background-color: var(--EXTRA-LIGHT-COLOR);
}

/* MAIN */

main p {
    margin-bottom: 20px;
    text-align: center;
    font-size: var(--TURN-MSG-FS);
}

main .gameboard {
    width: var(--GAMEBOARD-SIDE);
    height: var(--GAMEBOARD-SIDE);
    margin: 0 auto;
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 20px;
    background-color: var(--LIGHT-COLOR);

    display: grid;
    gap: 3px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.gameboard .gamecell {
    border: 2px solid black;
    font-size: var(--PLAYER-SYMBOL-FS);
    cursor: pointer;

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

.gameboard .gamecell:hover {
    background-color: var(--EXTRA-LIGHT-COLOR);
}

main button {
    display: block;
    font: inherit;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 auto;
    padding: 20px 70px;
    border: none;
    border-radius: 10px;
    background-color: var(--LIGHT-COLOR);
    cursor: pointer;
}

main button:hover {
    background-color: var(--EXTRA-LIGHT-COLOR);
}

/* DIALOG */

dialog {
    position: fixed;
    border: none;
    border-radius: 20px;
    user-select: none;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* --- RESULT DIALOG */

.result-dialog {
    top: 300px;
    left: calc(50% - (var(--RESULT-DIALOG-WIDTH) / 2));
}

.result-dialog h1 {
    padding: 70px 10px;
    width: var(--RESULT-DIALOG-WIDTH);
    text-align: center;
    font-size: var(--RESULT-DIALOG-FS);
    font-weight: 700;
}

/* --- NAMES DIALOG */

.names-dialog {
    background-color: grey; /* Changed to grey */
    padding: 50px; /* Add padding for spacing */
    border-radius: 10px; /* Optional: rounded corners */
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); /* Optional: subtle shadow */
    top: 200px;
    left: calc(50% - (var(--NAMES-DIALOG-WIDTH) / 2));
}

.names-dialog form {
    padding: 50px 0 70px 0;
    width: var(--NAMES-DIALOG-WIDTH);

    display: grid;
    row-gap: 50px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
}

.names-dialog p.title {
    grid-column: 1 / -1;
    width: 100%;
    background-color: #e0e0e0; /* set your desired background color */
    padding: 20px;
    border-radius: 10px; /* Optional: rounded corners */
    box-sizing: border-box;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.names-dialog p.player-name {
    display: flex;
    flex-direction: column;
    gap: 10px;

    font-size: 1.3rem;
    font-weight: 500;
    color: #333;
}

.names-dialog input {
    width: 230px;
    padding: 5px;
    border: 2px solid #333;
    border-radius: 5px;
    font-size: 1rem;
}

.names-dialog button {
    grid-column: 1 / -1;

    margin-top: 25px;
    padding: 25px 70px;
    background-color: rgb(116, 233, 116);
    border: 0.5px solid black;
    border-radius: 10px;
    font: inherit;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
}

.names-dialog button:hover {
    background-color: rgb(146, 255, 146);
}

@media screen and (max-width: 600px) {
    .names-dialog {
        top: 100px;
    }
    .names-dialog form {
        row-gap: 40px;
        grid-template-columns: 1fr;
    }
    .names-dialog p.title {
        font-size: clamp(1.5rem, 8vw, 2.2rem);
    }
    .names-dialog button {
        padding-inline: 60px;
        font-size: 1.2rem;
    }
}

/* FOOTER */

footer {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    color: black;
    font-size: var(--FOOTER-FS);
    user-select: text;
}

/* Fullscreen Layout */
html, body {
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1a1a1a;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

/* Background Styling */
.container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    --s: 200px; 
    --c1: #1d1d1d;
    --c2: #4e4f51;
    --c3: #3c3c3c;
    background: repeating-conic-gradient(
                from 30deg, 
                #0000 0 120deg, 
                var(--c3) 0 180deg
              )
              calc(0.5 * var(--s)) calc(0.5 * var(--s) * 0.577),
              repeating-conic-gradient(
                from 30deg, 
                var(--c1) 0 60deg, 
                var(--c2) 0 120deg, 
                var(--c3) 0 180deg
              );
    background-size: var(--s) calc(var(--s) * 0.577);
}


body.light-mode .container {
    --s: 105px; /* control the size */
    --c1: #b9b9b9;
    --c2: #dcdcdc;
    --c3: #fafafa;
  
    background: conic-gradient(
          from 75deg,
          var(--c1) 15deg,
          var(--c2) 0 30deg,
          #0000 0 180deg,
          var(--c2) 0 195deg,
          var(--c1) 0 210deg,
          #0000 0
        )
        calc(0.5 * var(--s)) calc(0.5 * var(--s) / 0.577),
      conic-gradient(
        var(--c1) 30deg,
        var(--c3) 0 75deg,
        var(--c1) 0 90deg,
        var(--c2) 0 105deg,
        var(--c3) 0 150deg,
        var(--c2) 0 180deg,
        var(--c3) 0 210deg,
        var(--c1) 0 256deg,
        var(--c2) 0 270deg,
        var(--c1) 0 286deg,
        var(--c2) 0 331deg,
        var(--c3) 0
      );
    background-size: var(--s) calc(var(--s) / 0.577);
    /* 0.577=tan(30deg) */
  }

/* Title Styling */
h1 {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    text-align: center;
}

/* Game Board */
.board {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(3, 120px);
    gap: 10px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.3);
}

/* Individual Cell */
.cell {
    width: 120px;
    height: 120px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    background: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

/* Cell Hover Effect */
.cell:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* Winning Cells */
.winner {
    background: lightgreen;
    color: black;
    box-shadow: 0px 0px 15px rgba(144, 238, 144, 0.9);
    transition: all 0.3s ease-in-out;
}

/* Reset Button */
button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(to right, #007bff, #00d4ff);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

/* Button Hover Effect */
button:hover {
    background: linear-gradient(to right, #0056b3, #0080ff);
    box-shadow: 0px 0px 10px rgba(0, 123, 255, 0.5);
    transform: scale(1.05);
}

/* Hall Of Fame */
#hallOfFame {
    margin: 20px auto 0;
    padding: 15px;
    width: 90%;
    max-width: 500px;
    border: 2px solid #333;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
#hallOfFame h2 {
    text-align: center;
    margin-bottom: 10px;
}
#hallOfFame ol {
    list-style: decimal;
    padding-left: 20px;
}

body.light-mode .cell {
    background-color: rgb(83, 83, 83);
    color: white;
}

body.light-mode .cell.winner {
    background-color: lightgreen;
    color: black;
}

body.light-mode h1 {
    color: rgba(0, 0, 0, 0.555);
}

/* From Uiverse.io by 00Kubi */
.theme-switch {
    --toggle-size: 30px;
      position: absolute;
      top: 10px;
      right: 10px;
    /* the size is adjusted using font-size,
       this is not transform scale,
       so you can choose any size */
    --container-width: 5.625em;
    --container-height: 2.5em;
    --container-radius: 6.25em;
    /* radius 0 - minecraft mode :) */
    --container-light-bg: #3d7eae;
    --container-night-bg: #1d1f2c;
    --circle-container-diameter: 3.375em;
    --sun-moon-diameter: 2.125em;
    --sun-bg: #ecca2f;
    --moon-bg: #c4c9d1;
    --spot-color: #959db1;
    --circle-container-offset: calc(
      (var(--circle-container-diameter) - var(--container-height)) / 2 * -1
    );
    --stars-color: #fff;
    --clouds-color: #f3fdff;
    --back-clouds-color: #aacadf;
    --transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
    --circle-transition: 0.3s cubic-bezier(0, -0.02, 0.35, 1.17);
  }
  
  .theme-switch,
  .theme-switch *,
  .theme-switch *::before,
  .theme-switch *::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: var(--toggle-size);
  }
  
  .theme-switch__container {
    width: var(--container-width);
    height: var(--container-height);
    background-color: var(--container-light-bg);
    border-radius: var(--container-radius);
    overflow: hidden;
    cursor: pointer;
    -webkit-box-shadow:
      0em -0.062em 0.062em rgba(0, 0, 0, 0.25),
      0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
    box-shadow:
      0em -0.062em 0.062em rgba(0, 0, 0, 0.25),
      0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
    -webkit-transition: var(--transition);
    -o-transition: var(--transition);
    transition: var(--transition);
    position: relative;
    background-image: linear-gradient(
      to bottom,
      var(--container-light-bg) 0%,
      #5490c0 100%
    );
    transition: all var(--transition);
  }
  
  .theme-switch__container::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    -webkit-box-shadow:
      0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset,
      0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
    box-shadow:
      0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset,
      0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
    border-radius: var(--container-radius);
  }
  
  .theme-switch__checkbox {
    display: none;
  }
  
  .theme-switch__circle-container {
    width: var(--circle-container-diameter);
    height: var(--circle-container-diameter);
    background-color: rgba(255, 255, 255, 0.1);
    position: absolute;
    left: var(--circle-container-offset);
    top: var(--circle-container-offset);
    border-radius: var(--container-radius);
    -webkit-box-shadow:
      inset 0 0 0 3.375em rgba(255, 255, 255, 0.1),
      0 0 0 0.625em rgba(255, 255, 255, 0.1),
      0 0 0 1.25em rgba(255, 255, 255, 0.1);
    box-shadow:
      inset 0 0 0 3.375em rgba(255, 255, 255, 0.1),
      0 0 0 0.625em rgba(255, 255, 255, 0.1),
      0 0 0 1.25em rgba(255, 255, 255, 0.1);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-transition: var(--circle-transition);
    -o-transition: var(--circle-transition);
    transition: var(--circle-transition);
    pointer-events: none;
  }
  
  .theme-switch__sun-moon-container {
    pointer-events: auto;
    position: relative;
    z-index: 2;
    width: var(--sun-moon-diameter);
    height: var(--sun-moon-diameter);
    margin: auto;
    border-radius: var(--container-radius);
    background-color: var(--sun-bg);
    -webkit-box-shadow:
      0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset,
      0em -0.062em 0.062em 0em #a1872a inset;
    box-shadow:
      0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset,
      0em -0.062em 0.062em 0em #a1872a inset;
    -webkit-filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25))
      drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
    filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25))
      drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
    overflow: hidden;
    -webkit-transition: var(--transition);
    -o-transition: var(--transition);
    transition: var(--transition);
    transform: scale(1);
    transition: transform 0.3s ease;
  }
  
  .theme-switch__sun-moon-container:hover {
    transform: scale(1.1) rotate(5deg);
  }
  
  .theme-switch__moon {
    -webkit-transform: translateX(100%);
    -ms-transform: translateX(100%);
    transform: translateX(100%);
    width: 100%;
    height: 100%;
    background-color: var(--moon-bg);
    border-radius: inherit;
    -webkit-box-shadow:
      0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset,
      0em -0.062em 0.062em 0em #969696 inset;
    box-shadow:
      0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset,
      0em -0.062em 0.062em 0em #969696 inset;
    -webkit-transition: var(--transition);
    -o-transition: var(--transition);
    transition: var(--transition);
    position: relative;
    transition:
      all var(--transition),
      transform 0.3s ease;
  }
  
  .theme-switch__moon:hover {
    transform: rotate(15deg);
  }
  
  .theme-switch__spot {
    position: absolute;
    top: 0.75em;
    left: 0.312em;
    width: 0.75em;
    height: 0.75em;
    border-radius: var(--container-radius);
    background-color: var(--spot-color);
    -webkit-box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
    box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
    transition: background-color 0.3s ease;
  }
  
  .theme-switch__spot:nth-of-type(2) {
    width: 0.375em;
    height: 0.375em;
    top: 0.937em;
    left: 1.375em;
  }
  
  .theme-switch__spot:nth-last-of-type(3) {
    width: 0.25em;
    height: 0.25em;
    top: 0.312em;
    left: 0.812em;
  }
  
  .theme-switch__moon:hover .theme-switch__spot {
    background-color: #7a7f8c;
  }
  
  .theme-switch__clouds {
    width: 1.25em;
    height: 1.25em;
    background-color: var(--clouds-color);
    border-radius: var(--container-radius);
    position: absolute;
    bottom: -0.625em;
    left: 0.312em;
    -webkit-box-shadow:
      0.937em 0.312em var(--clouds-color),
      -0.312em -0.312em var(--back-clouds-color),
      1.437em 0.375em var(--clouds-color),
      0.5em -0.125em var(--back-clouds-color),
      2.187em 0 var(--clouds-color),
      1.25em -0.062em var(--back-clouds-color),
      2.937em 0.312em var(--clouds-color),
      2em -0.312em var(--back-clouds-color),
      3.625em -0.062em var(--clouds-color),
      2.625em 0em var(--back-clouds-color),
      4.5em -0.312em var(--clouds-color),
      3.375em -0.437em var(--back-clouds-color),
      4.625em -1.75em 0 0.437em var(--clouds-color),
      4em -0.625em var(--back-clouds-color),
      4.125em -2.125em 0 0.437em var(--back-clouds-color);
    box-shadow:
      0.937em 0.312em var(--clouds-color),
      -0.312em -0.312em var(--back-clouds-color),
      1.437em 0.375em var(--clouds-color),
      0.5em -0.125em var(--back-clouds-color),
      2.187em 0 var(--clouds-color),
      1.25em -0.062em var(--back-clouds-color),
      2.937em 0.312em var(--clouds-color),
      2em -0.312em var(--back-clouds-color),
      3.625em -0.062em var(--clouds-color),
      2.625em 0em var(--back-clouds-color),
      4.5em -0.312em var(--clouds-color),
      3.375em -0.437em var(--back-clouds-color),
      4.625em -1.75em 0 0.437em var(--clouds-color),
      4em -0.625em var(--back-clouds-color),
      4.125em -2.125em 0 0.437em var(--back-clouds-color);
    -webkit-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
    -o-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
    transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  }
  
  .theme-switch__stars-container {
    position: absolute;
    color: var(--stars-color);
    top: -100%;
    left: 0.312em;
    width: 2.75em;
    height: auto;
    -webkit-transition: var(--transition);
    -o-transition: var(--transition);
    transition: var(--transition);
  }
  
  /* actions */
  
  .theme-switch__checkbox:checked + .theme-switch__container {
    background-color: var(--container-night-bg);
    background-image: linear-gradient(
      to bottom,
      var(--container-night-bg) 0%,
      #2d3142 100%
    );
  }
  
  .theme-switch__checkbox:checked
    + .theme-switch__container
    .theme-switch__circle-container {
    left: calc(
      100% - var(--circle-container-offset) - var(--circle-container-diameter)
    );
  }
  
  .theme-switch__checkbox:checked
    + .theme-switch__container
    .theme-switch__circle-container:hover {
    left: calc(
      100% - var(--circle-container-offset) - var(--circle-container-diameter) -
        0.187em
    );
  }
  
  .theme-switch__circle-container:hover {
    left: calc(var(--circle-container-offset) + 0.187em);
  }
  
  .theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
    -webkit-transform: translate(0);
    -ms-transform: translate(0);
    transform: translate(0);
  }
  
  .theme-switch__checkbox:checked
    + .theme-switch__container
    .theme-switch__clouds {
    bottom: -4.062em;
  }
  
  .theme-switch__checkbox:checked
    + .theme-switch__container
    .theme-switch__stars-container {
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
  }
  
  .theme-switch__container:hover .theme-switch__clouds {
    transform: translateX(15px) scale(1.02);
  }
  
  .theme-switch__sun-moon-container::after {
    content: "";
    position: absolute;
    inset: -5px;
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 70%
    );
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .theme-switch__sun-moon-container:hover::after {
    opacity: 1;
  }
  
  .theme-switch__shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    top: 20%;
    left: -10%;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .theme-switch__shooting-star-2 {
    position: absolute;
    width: 1px;
    height: 1px;
    background: white;
    top: 35%;
    left: -10%;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .theme-switch__meteor {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffd700;
    border-radius: 50%;
    top: -10%;
    left: 50%;
    opacity: 0;
    filter: blur(1px);
    transition: opacity 0.3s ease;
  }
  
  .theme-switch__checkbox:checked
    + .theme-switch__container
    .theme-switch__shooting-star {
    animation: shootingStar 2s linear infinite;
    opacity: 1;
  }
  
  .theme-switch__checkbox:checked
    + .theme-switch__container
    .theme-switch__shooting-star-2 {
    animation: shootingStar 3s linear infinite 1s;
    opacity: 1;
  }
  
  .theme-switch__checkbox:checked
    + .theme-switch__container
    .theme-switch__meteor {
    animation: meteor 4s linear infinite 2s;
    opacity: 1;
  }
  
  @keyframes shootingStar {
    0% {
      transform: translateX(0) translateY(0) rotate(45deg);
      opacity: 1;
    }
    100% {
      transform: translateX(150px) translateY(150px) rotate(45deg);
      opacity: 0;
    }
  }
  
  @keyframes meteor {
    0% {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
    100% {
      transform: translateY(150px) scale(0.3);
      opacity: 0;
    }
  }
  
  .theme-switch__stars-cluster {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .theme-switch__stars-cluster .star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px 1px white;
  }
  
  .theme-switch__stars-cluster .star:nth-child(1) {
    top: 20%;
    left: 20%;
    animation: twinkle 1s infinite ease-in-out;
  }
  .theme-switch__stars-cluster .star:nth-child(2) {
    top: 30%;
    left: 55%;
    animation: twinkle 1s infinite ease-in-out 0.3s;
  }
  .theme-switch__stars-cluster .star:nth-child(3) {
    top: 40%;
    left: 80%;
    animation: twinkle 1s infinite ease-in-out 0.6s;
  }
  
  /* From Uiverse.io by SelfMadeSystem */ 
 @keyframes hue-rotate {
    to {
      filter: hue-rotate(360deg);
    }
  }
  
  .cube-container {
    --w: 35px;
    --g: 5px;
    --t: calc(var(--w) + var(--g));
    width: var(--w);
    aspect-ratio: 1;
    perspective: 120px;
    transform-style: preserve-3d;
  }
  
  .cube-container .cube {
    --fz: 0;
    --rx: 0;
    --fx: 0;
    --ry: 0;
    --fy: 0;
    position: absolute;
    background: #fffc;
    border: 2px solid black;
    width: var(--w);
    aspect-ratio: 1;
    bottom: calc(var(--w) * -0.5);
    right: calc(var(--w) * -0.5);
    animation:
      rotate 20s linear infinite,
      hue-rotate 20s linear infinite;
    transition: 5s;
    --a: translateZ(calc(0.5 * var(--w)))
      translateX(calc(var(--x) * var(--t) - 0.5 * var(--fy) * var(--w)))
      translateY(calc(var(--y) * var(--t) - 0.5 * var(--fx) * var(--w)))
      translateZ(
        calc(
          var(--z) * var(--t) - 0.5 * var(--ry) * var(--w) - 0.5 * var(--rx) *
            var(--w) - var(--fz) * var(--w)
        )
      )
      rotateX(calc(90deg * var(--rx))) rotateY(calc(90deg * var(--ry)));
    --p: translateX(calc(-0.5 * var(--w))) translateY(calc(-0.5 * var(--w)))
      translateZ(calc(-0.5 * var(--w)));
  }

  .cube-container .cube:hover {
    background: #f00e;
    filter: hue-rotate(180deg); /* Forces an instant color shift */
    transition: 0s;
  }
  
  @keyframes rotate {
    0% {
      transform: var(--p) rotateZ(0deg) rotateY(0deg) rotateX(0deg) var(--a);
    }
    to {
      transform: var(--p) rotateZ(360deg) rotateY(720deg) rotateX(360deg) var(--a);
    }
  }

  /* Score Board */ 
.card * {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.card .teams {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, transparent, #111, transparent);
}
.card .teams > span {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 13px;
  text-wrap: nowrap;
}
.card .teams .team-name-info {
  text-wrap: nowrap;
  color: #ffffff;
  max-width: 210px;
  text-overflow: ellipsis;
  font-weight: 600;
  overflow: hidden;
  display: block;
}
.card .teams span.progress-dots {
  height: 3px;
  position: relative;
  width: 60px;
  display: block;
  overflow: hidden;
  margin: 0;
  border-radius: 10px;
}
.card .teams span.progress-dots .load {
  background: linear-gradient(90deg, #3a3dff, #ff2929);
  display: block;
  height: 1.5px;
  width: 3px;
  bottom: 0;
  position: absolute;
  transform: translateX(0px);
  animation: loading_dots 7.5s ease both infinite;
}
@keyframes loading_dots {
  0% {
    width: 3px;
    transform: translateX(0px);
  }
  40% {
    width: 3px;
    transform: translateX(57px);
  }

  75% {
    width: 100%;
    transform: translateX(0px);
  }
  100% {
    width: 3px;
    transform: translateX(0px);
  }
}
.card .teams .team-home,
.card .teams .team-away {
  padding: 15px 37px;
  position: relative;
  overflow: hidden;
}
.card .teams .team-away {
  transform: skew(-41deg, 0deg);
  border-radius: 10px 10px 30px 10px;
}
.card .teams .team-home {
  border-radius: 10px 10px 10px 30px;
  transform: skew(41deg, 0deg);
}
.card .teams .team-home::after {
  position: absolute;
  top: -3px;
  background: #00caff;
  content: "";
  height: 23px;
  border-radius: 27px;
  left: -20px;
  filter: blur(2px);
  transform: rotate(208deg);
  width: 20px;
  box-shadow: 0px 0px 32px #00ffed;
}
.card .teams .team-home::before {
  position: absolute;
  bottom: -15px;
  background: #0048ff;
  content: "";
  height: 17px;
  border-radius: 80px;
  right: 0;
  filter: blur(1px);
  transform: translate(-50%, 0%);
  width: 80%;
  box-shadow: 0px 0px 32px #0026ff;
}
.card .teams .team-away::after {
  position: absolute;
  top: -3px;
  background: #cc9d00;
  content: "";
  height: 23px;
  border-radius: 27px;
  right: -20px;
  filter: blur(2px);
  transform: rotate(208deg);
  width: 20px;
  box-shadow: 0px 0px 32px #cc3700;
}
.card .teams .team-away::before {
  position: absolute;
  bottom: -15px;
  background: #ff0000;
  content: "";
  height: 17px;
  border-radius: 80px;
  left: 0;
  filter: blur(1px);
  transform: translate(50%, 0%);
  width: 80%;
  box-shadow: 0px 0px 32px #d50000;
}

.card .teams .team-home .team-name-info {
  transform: skew(-41deg, 0);
}
.card .teams .team-away .team-name-info {
  transform: skew(41deg, 0);
}

.event-info-banner .info-heading {
  position: absolute;
  right: 12px;
  bottom: 5px;
  color: rgba(255, 255, 255, 0.2);
  margin: 0;
}
.card .event-scoreboard .event-score-container {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 10px;
  width: fit-content;
  background: linear-gradient(#1e1e1e 0%, #0c0c0c8e 4%, #1a1419);
  box-shadow:
    inset 0 0 1px 0 #2c2c2c,
    0 0 20px 0 #1313139c;
  margin: 10px 0;
}
.card .event-scoreboard .event-score-container .score-container {
  font-size: 24px;
  background: linear-gradient(90deg, #3a3dff, #ff2929);
  -webkit-background-clip: text;
  width: 100%;
  -webkit-text-fill-color: transparent;
}
.card .event-scoreboard .event-score-container .current-time-container {
  font-size: 12px;
  margin-bottom: 8px;
  width: 100%;
  font-family: "SegoeUI";
  color: #a1a1a1;
  justify-content: center;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 5px;
}
.card
  .event-scoreboard
  .event-score-container
  .current-time-container
}
