:root {
  --primary-background: #f1f7ff;
  --primary-text: #000000;
  --secondary-text: #006cff;
  --highlight-text: #579eff;
  --accent-color: #c4ddff;
  --error-color: #ff6e6e;
  --footer-text: #86b8ff;
  --background-image: url("backgroundCRH.svg");
}

@font-face {
  font-family: "e-Ukraine-Medium";
  src: url("e-Ukraine-Medium.ttf") format("opentype");
}

html {
  background: var(--primary-background);
}

ul {
  margin-top: 20px !important;
}

body {
  font-family: "e-Ukraine-Medium", sans-serif;
  color: var(--primary-text);
  background: none !important;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 40px 100px;
  z-index: 10000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.5s;
}

header.sticky {
  background: #fff;
  padding: 10px 100px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

header .logo {
  color: #fff;
  font-size: 1.4em;
  text-decoration: none;
}

header.sticky .logo {
  color: #111;
}

header .navigation {
  position: relative;
  display: flex;
}

header .navigation li {
  list-style: none;
  margin-left: 30px;
}

header .navigation li a {
  text-decoration: none;
  color: #fff;
  font-weight: 300;
}

header.sticky .navigation li a {
  color: #111;
}

header .navigation li a:hover {
  color: var(--secondary-text);
}

p {
  margin: 0.2em 0;
}

a {
  color: var(--secondary-text);
  text-decoration: none;
}

.top {
  display: flex;
  justify-content: flex-end;
}

.language {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 5em;
}

/* Стилі для фону */
html::before {
  content: "";
  background-image: var(--background-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.limits-box {
  text-align: right;
  margin: 7em 3em 0 0;
  font-size: 0.8rem;
}

.limit {
  background: var(--primary-background);
  margin-top: 0.25em;
  border: solid var(--accent-color) 0.2em;
  width: fit-content;
  border-radius: 0.6em;
  padding: 0.1em;
}

.yellow {
  border: solid var(--secondary-text) 0.22rem;
  border-radius: 0.6em;
  color: var(--secondary-text);
  margin-left: -0.3em;
  margin-right: -0.3em;
  background: var(--accent-color);
}

.limit-option {
  padding: 0.2em;
}

.text-display {
  color: var(--footer-text);
}

.correct {
  color: var(--secondary-text);
}

.wrong {
  color: var(--error-color);
}

.current {
  color: var(--primary-text);
}

.center {
  text-align: center;
}

.if {
  display: inline-flex;
}

.box {
  max-width: 70vw;
  padding: 0 0.5em;
}

.stats {
  margin: 0.1em auto 0.2em auto;
}

.details {
  font-size: 6rem;
}

.stat-block {
  padding: 0 0.3em;
  min-width: 18vw;
}

@media (max-width: 40vw) {
  .details {
    font-size: 5rem;
  }
  .stat-block {
    min-width: 0;
  }
}

.stat-name {
  font-size: 1rem;
  position: relative;
  top: 2em;
  right: 0.5em;
}

.text-display {
  margin: 0 0 1em 0;
  font-size: 1.5rem;
  text-align: left;
  min-height: 6em;
}

input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 0;
}

a:focus,
a:hover {
  color: var(--highlight-text);
  text-decoration: none;
}

footer {
  padding: 1em;
  font-size: 0.6rem;
  color: var(--footer-text) !important;
}

.restart-button {
  padding: 0.3em;
}

textarea {
  background: var(--primary-background);
  border: solid var(--secondary-text) 0.2em;
  border-radius: 0.4em;
  color: var(--secondary-text);
  padding: 0.3em;
  font-size: 1.2rem;
  resize: none;
  text-align: center;
  margin-bottom: 1em;
  width: 15em;
  max-width: 40vw;
}

/* Стили для бургер-меню */
.burger-menu {
  display: none;
}

.burger-icon {
  cursor: pointer;
  padding: 0 10px;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: #000;
  margin: 5px 0;
}

@media (max-width: 750px) {
  .burger-menu {
    display: block;
  }

  .nav__links {
    display: none;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.95);
    position: absolute;
    top: 60px;
    right: 0;
    z-index: 2;
    width: 100%;
  }

  .nav__links.active {
    display: flex;
    gap: 1rem;
    list-style: none;
    box-sizing: border-box;
    margin: 0 0 0 0;
    color: black;
  }

  .nav__links li {
    padding: 1em;
    margin-left: 4.5em;
  }

  .limits-box {
    margin: 9em 3em 0 0;
    font-size: 0.8rem;
  }

  .top {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 991px) {
  header,
  header.sticky {
    padding: 10px 20px;
  }

  header .navigation {
    display: none;
  }

  header .navigation.active {
    width: 100%;
    height: calc(100% - 68px);
    position: fixed;
    top: 40px;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: #fff;
    padding: 0;
  }

  header .navigation li {
    margin-left: 0;
    padding-top: 20px;
  }

  header .navigation li a {
    color: #111;
    font-size: 2.6em;
  }

  .menuToggle {
    position: relative;
    width: 40px;
    height: 40px;
    background: url(images/menu.png);
    background-size: 30px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
  }

  .menuToggle.active {
    background: url(images/close.png);
    background-size: 30px;
    background-repeat: no-repeat;
    background-position: center;
  }

  header.sticky .menuToggle {
    filter: invert(1);
  }

  .sticky .line {
    height: 1px;
    background: #111;
    width: 75%;
    margin: 0 auto;
    margin-top: 20px;
  }
}
