/**
 * Design by fromScratch Studio - 2022, 2023 (fromscratch.io)
 * Implementation in HTML/CSS/JS by Timendus - 2024 (https://github.com/Timendus)
 *
 * See https://github.com/librespeed/speedtest/issues/585
 */

@import url("colors.css?v=pdip2");
@import url("fonts.css?v=pdip2");
@import url("main.css?v=pdip2");
@import url("server-selector.css?v=pdip2");
@import url("button.css?v=pdip2");
@import url("results.css?v=pdip2");
@import url("dialog.css?v=pdip2");

/* Setting up the basic structure */

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

html,
body {
  min-height: 100vh;
  width: 100vw;
}

html {
  background-color: var(--background-backup-color);
  background-image:
    radial-gradient(ellipse 100% 70% at 50% -15%, rgb(200 16 46 / 42%), transparent 68%),
    radial-gradient(ellipse 55% 45% at 0% 100%, rgb(119 17 36 / 28%), transparent 70%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgb(154 12 36 / 22%), transparent 70%),
    linear-gradient(165deg, #030303 0%, #1a080c 38%, #0a0305 62%, #030303 100%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  font-size: 10px;

  @media screen and (max-width: 800px) {
    font-size: 8px;
  }
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--background-overlay-color);
  color: var(--primary-text-color);
  display: flex;
  flex-direction: column;
}

/* Position the logo */

header {
  padding: 3rem 7rem;
  border-bottom: 1px solid rgb(200 16 46 / 35%);
  background: linear-gradient(180deg, rgb(52 5 13 / 55%) 0%, transparent 100%);

  & img.brand-logo {
    display: block;
    max-height: 11rem;
    width: auto;
    max-width: min(32rem, 92vw);
    margin: 0 auto;
  }

  @media screen and (max-width: 800px) {
    padding: 4rem 2rem;
    text-align: center;

    & img.brand-logo {
      max-height: 9rem;
    }
  }
}

/* Position the source code link */

footer {
  margin: auto auto 0 auto;
  padding: 5rem;

  & > p.source {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08rem;
    color: var(--pdip-300);
    text-transform: uppercase;
  }

  & > p.source a {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.1rem;
    color: var(--theme-green);
    text-underline-offset: 0.3rem;
    transition: text-underline-offset 0.2s;

    &:hover {
      color: var(--theme-pink);
      text-underline-offset: 0.5rem;
    }
  }

  @media screen and (max-width: 800px) {
    padding: 4rem;
  }
}
