  * {
    box-sizing: border-box;
  }
  
  @font-face {
    font-family: "CrackedJohnnie";
    src: url('fonts/CrackedJohnnie.woff2') format('woff2'),
         url('fonts/CrackedJohnnie.woff') format('woff');
    font-weight: normal;
  }
 
  :root {
    --color-background: #223a;
    --color-header: steelblue;
    --color-body: #eef;
    --color-link: dodgerblue;
    --color-link-active: deepskyblue;
  }
  
  body.frantic {
    --color-background: #322a;
    --color-header: crimson;
    --color-body: #fee;
    --color-link: orangered;
    --color-link-active: red;
  }

  a {
    text-decoration: none;
    font-weight: 400;
    transition: color 250ms ease, text-shadow 250ms ease;
    text-shadow: transparent 0 0 0;
  }
  
  a, a:visited {
    color: var(--color-link) !important;
  }
  
  a:hover {
    color: var(--color-link-active) !important;
    text-shadow: black 0.25rem 0.25rem 0.25rem;
  }

  html, body {
    background: url('img/bg-repeating-texture.png'), var(--color-background);
    background-repeat: repeat;
    background-attachment: fixed;
    color: var(--color-body);
    font-weight: 0;
    font-family: "Tomorrow", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
  }
  
  body {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-direction: column;
    font-size: 125% !important;
    text-align: justify;
  }
  
  #background-gradient{
    background:
      radial-gradient(circle, transparent 70%, #00000080 100%),
      linear-gradient(to bottom, transparent 0%, black 120%),
      var(--color-background);
    width: 100%;
    height: 110%;
    position: fixed;
    top: 0;
    z-index: 0;
  }
  
  #sonic-upside-down {
    position: fixed;
    top: 0;
    right: 5%;
    z-index: 3;
    cursor: pointer;
    image-rendering: pixelated;
    user-select: none;
  }
  
  #sonic-upside-down.exploded {
    cursor: initial;
  }
  
  .thin {
    opacity: 0.5;
  }
  
  .cracked-johnnie {
    font-family: "CrackedJohnnie", sans-serif;
  }

  table {
    border-spacing: 1rem 0;
    margin-bottom: 1rem;
  }
  
  section::after, header::after {
    content: " ";
    background: linear-gradient(to right, transparent, var(--color-body), transparent);
    height: 1px;
    width: 100%;
    opacity: 0.65;
    display: block;
    margin-top: 2rem;
  }
  
  li {
    margin-bottom: 1rem;
  }

  header {
    width: 100%;
  }
  
  #erazor-logo {
    max-height: 12rem;
    max-width: 100%;
    filter: contrast(2) brightness(1.1) drop-shadow(0 0 0.5rem black);
  }
  
  .frantic #erazor-logo {
    filter: hue-rotate(-200deg) contrast(2) saturate(2) drop-shadow(0 0 0.5rem black);
    transform: rotate(-4deg);
  }

  h1, h2, h3 {
    color: var(--color-header);
    text-shadow: black 0.5rem 0.5rem 0.5rem;
  }
  
  h1, h2 {
    font-family: "CrackedJohnnie", sans-serif;
  }
  
  h1 {
    font-size: 400% !important;
    color: var(--color-body);
  }
  
  h2 {
    margin-top: 2rem;
    font-size: 200% !important;
    margin-left: -1rem;
    font-weight: bold;
  }

  h3 {
    font-size: 125% !important;
  }
  
  section {
    width: 100%;
  }

  header {
    text-align: center;
  }
  
  header p {
    font-style: italic;
    font-size: 80%;
    opacity: 0.65;
    margin-top: 2rem;
  }

  #main {
    width: 100%;
    height: 100%;
    margin: 1rem 0;
    border-radius: 6rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-direction: column;
    max-width: min(68rem, 85vw);
    padding: 0 5rem;
    background: #0006;
    z-index: 1;
  }

  .carousel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    cursor: pointer;
    margin: 2rem 0;
    filter: drop-shadow(0.5rem 0.5rem 0.5rem black);
    user-select: none;
  }

  .carousel-slide {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease-in-out;
    image-rendering: pixelated;
    border-radius: 1rem;
  }

  .carousel-container .carousel-slide:first-child {
    position: relative;
  }

  .carousel-slide.active {
    opacity: 1;
    z-index: 1;
  }
  
  #carousel-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    user-select: none;
  }
  
  #carousel-page {
    width: 5rem;
    font-weight: bold;
    text-align: center;
  }
  
  #carousel-prev, #carousel-next {
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-size: 200%;
  }
  
  #carousel-prev:hover, #carousel-next:hover {
    opacity: 1.0;
  }
    
  #download h2 {
    margin-left: 0;
    margin-bottom: 2rem;
    text-align: center;
  }

  .download-list {
    display: grid;
    gap: 1rem;
    width: fit-content;
    margin: auto;
    margin-bottom: 1rem;
  }

  .download-row {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    padding: 1rem;
    border-radius: 6px;
    transition: color 250ms ease, background 250ms ease, text-shadow 250ms ease;
  }

  .download-row:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .download-row img {
    height: 50px;
    width: auto;
    justify-self: center;
    filter: drop-shadow(0.25rem 0.25rem 0.25rem black);
  }
  
  .frantic .download-row img[alt="Windows"] {
    filter: grayscale(1.0);
  }

  .download-row .version-main {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .download-row .version-name {
    font-size: 150%;
    font-weight: bold;
  }
  
  .download-row .file-size {
    opacity: 0.8;
  }
  
  #current-version {
    text-align: center;
    opacity: 0.5;
    margin-bottom: 1rem;
  }
  
  #overview-list {
    list-style: disclosure-closed;
  }
 
  #trailer iframe {
      width: 100%;
      height: auto;
      aspect-ratio: 16 / 9;
      box-shadow: 0 0 2vmin black,
                  0 0 3vmin black;
  }
  
  #controls {
    width: fit-content;
  }
 
  #faq {
      margin-bottom: 1rem;
  }

  #faq h3 {
    cursor: pointer;
    color: var(--color-link) !important;
    transition: color 250ms ease, text-shadow 250ms ease;
    user-select: none;
    text-shadow: transparent 0 0 0;
    padding: 1rem;
    margin: -1rem;
  }
  #faq h3:hover {
    color: var(--color-link-active) !important;
    text-shadow: black 0.25rem 0.25rem 0.25rem;
  }
  
  .faq-entry {
    background: #0008;
    border-radius: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    transition: background 250ms ease;
  }
  
  .faq-entry:not(.show):hover {
    background: #2228;
  }
  
  .faq-entry p {
    margin-bottom: 0;
  }
  
  .faq-entry > div {
    display: none;
  }
  
  .faq-entry.show > div {
    display: initial;
  }
  
  #credits ul {
    font-size: 90%;
    opacity: 0.65;
    padding: 0;
    list-style-type: none;
    text-align: left;
    margin: 0 8%;
  }
 
  #links {
    width: fit-content;
  }

  #links ul {
    padding: 0;
    list-style-type: none;
    text-align: center;
  }

  #links li {
    margin-bottom: 0;
    padding: 0.25rem;
  }

  footer {
    text-align: center;
    font-size: 90%;
    opacity: 0.65;
  }

  @media only screen and (max-aspect-ratio: 3/2) {
    #sonic-upside-down {
      position: relative;
      top: 0;
      left: 0;
      right: 0;
    }

    h1 {
      font-size: 300% !important;
    }

    h2 {
      font-size: 175% !important;
      margin-left: auto;
      margin-right: auto;
      text-align: center;
    }
    
    body {
      text-align: left;
    }
        
    #main {
      max-width: 100vw;
      padding: 0 8vw;
      margin: 0;
      border-radius: 0;
      background: none;
    }
    
    #credits ul {
      margin: 0;
    }
    
    
    .download-row {
      grid-template-columns: 4rem 1fr;
    }
    
    .download-row .version-main {
      flex-direction: column;
      align-items: start;
    }

    .download-row .version-name {
      display: block;
    }
    
    .windows-recommendation {
      display: none;
    }
  }
}