@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_18pt-Regular.ttf') format('ttf');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Reset */

* {
  padding: 0px;
  margin: 0px;
  border: none;
}

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

a,
a:link,
a:visited {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

aside,
nav,
footer,
header,
section,
main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  font-size: inherit;
  font-weight: inherit;
}

ul,
ul li {
  list-style: none;
}

img {
  vertical-align: top;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

address {
  font-style: normal;
}

input,
textarea,
button,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background-color: transparent;
}

input::-ms-clear {
  display: none;
}

textarea {
  resize: vertical;
}

button,
input[type='submit'] {
  display: inline-block;
  box-shadow: none;
  background-color: transparent;
  background: none;
  cursor: pointer;
}

button::-moz-focus-inner {
  padding: 0;
  border: 0;
}

label {
  cursor: pointer;
}

legend {
  display: block;
}

input[type='file'] {
  max-width: 100%;
}

p,
span,
label {
  font-size: 18px;
}

/* Common */

:root {
  --main-bg-color: #08090d;
  --main-title-color: white;
  --main-text-color: #7b899e;
  --main-color: #15c4d8;
  --second-color: #162b2d;
  --border-color: #2a4147;
  --warning-color: red;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--main-bg-color);
  color: var(--main-text-color);
  font-family: 'Inter', sans-serif;
}

.container {
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.subtitle {
  font-size: 25px;
  margin-bottom: 40px;
  color: var(--main-title-color);
}

.title {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--main-title-color);
}

.title-medium {
  color: var(--main-title-color);
  font-size: 20px;
  margin-bottom: 15px;
}

.button {
  background-color: var(--main-color);
  padding: 10px;
  border-radius: 10px;
  font-size: 18px;
  color: var(--main-bg-color);
}

.section {
  padding: 40px 0;
}

.section__subtitle {
  margin-bottom: 40px;
}

/* Header */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.header__logo {
  margin-right: 20px;
}

.logo > a {
  display: flex;
  align-items: center;
}

.logo > a > svg {
  margin-right: 5px;
}

.logo > a > span {
  font-size: 25px;
  color: var(--main-title-color);
}

.header__list,
.header__auth {
  display: flex;
  align-items: center;
}

.header__item:not(:last-child),
.header__auth-item:not(:last-child) {
  margin-right: 20px;
}

.link {
  font-size: 16px;
  color: var(--main-text-color);
  display: inline-block;
  transition: color 0.2s ease;
}

.link:hover {
  color: var(--main-color);
}

.input {
  padding: 10px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--border-color);
  font-size: 18px;
  background-color: var(--main-bg-color);
  transition: box-shadow 0.3s ease;
  outline: none;
  color: var(--main-title-color);
}

.input:focus {
  box-shadow: inset 0 0 0 1px var(--main-color);
}

.header__active {
  background-color: var(--main-color);
  padding: 8px;
  border-radius: 10px;
  color: var(--main-bg-color);
}

.header__active:hover {
  color: var(--main-bg-color);
}

.block:not(:last-child) {
  margin-bottom: 40px;
}

.table {
  width: 100%;
  background-color: var(--second-color);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--border-color);
  border-collapse: collapse;
}

.mb {
  margin-bottom: 40px;
}

.table th {
  text-align: left;
  color: var(--main-title-color);
}

.table td:first-child {
  white-space: nowrap;
}
.table th,
.table td {
  padding: 10px 20px;
}

.table th,
.table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-color);
}

.table__wrap {
  margin-bottom: 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Footer */

.footer {
  padding: 40px 20px;
}

.footer__list {
  display: flex;
  margin: -20px -20px 20 -20px;
  flex-wrap: wrap;
}

.footer__list-item {
  width: calc(100% / 4);
  padding: 20px;
}

.footer__logo {
  margin-bottom: 32px;
}

.footer__item:not(:last-child) {
  margin-bottom: 8px;
}

.footer__text {
  font-size: 16px;
}

.footer__copyright-text {
  text-align: center;
}

.footer__copyright {
  padding-top: 40px;
  border-top: 1px solid var(--second-color);
}

.footer__title {
  min-height: 46px;
}

/* Main */

.main {
  padding: 20px;
  flex: 1;
}

/* Downloader */

.downloader {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 70px 0;
}

.downloader__form {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.downloader__subtitle,
.downloader__title {
  text-align: center;
}

.downloader__input {
  max-width: 400px;
  width: 100%;
  margin-right: 5px;
}

/* Downloader / About */

.text > p:not(:last-child),
.text > ul:not(:last-child) {
  margin-bottom: 15px;
}

.text > p,
.text > ul {
  font-size: 18px;
}

.text > ul > li:not(:last-child) {
  margin-bottom: 8px;
}

.text > ul > li {
  list-style: disc;
}

.text > ul {
  padding-left: 20px;
}

/* Download Rutube */

.video {
  display: flex;
  margin: -10px;
  flex-wrap: wrap;
}

.video__thumbnail {
  width: 35%;
}

.video__meta,
.video__thumbnail {
  padding: 10px;
}

.video__thumbnail > img {
  width: 100%;
}

.video__meta {
  width: 65%;
}

.video__author {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.video__avatar {
  max-width: 50px;
  margin-right: 10px;
}

.video__info > li:not(:last-child) {
  margin-bottom: 8px;
}

/* Quality */

.quality__form {
  margin-bottom: 15px;
}

.quality__button {
  width: calc(55% / 2 - 10px);
}

.quality__list {
  display: flex;
  flex-wrap: wrap;
  width: 55%;
  margin: -5px;
}

.quality__block {
  display: block;
}

.quality__item,
.quality__item-active {
  padding: 5px;
  width: calc(100% / 2);
}

.quality__label {
  display: flex;
  align-items: center;
  background-color: var(--second-color);
  border-radius: 10px;
  padding: 15px;
  box-shadow: inset 0 0 0 1px var(--border-color);
  transition: box-shadow 0.3s ease;
}

.quality__label:hover,
.quality__label:has(.quality__radio:checked) {
  box-shadow: inset 0 0 0 1px var(--main-color);
}

.quality__text {
  padding-left: 5px;
  margin-right: 5px;
  color: var(--main-title-color);
}

.quality__resolution {
  font-size: 16px;
}

.quality__wrapper {
  margin-bottom: 20px;
}

.quality__server {
  padding-left: 5px;
  font-size: 12px;
  font-style: italic;
}

.quality__tips {
  font-style: italic;
  font-size: 16px;
}

.quality__meta,
.quality__info {
  display: flex;
  align-items: center;
}

/* Loader */

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader__text {
  color: var(--main-title-color);
}

.loader__wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
  max-width: 500px;
  width: 100%;
  padding: 20px;
}

.loader__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
}

.loader__progress {
  margin-bottom: 10px;
  border-radius: 10px;
  background-color: var(--second-color);
  width: 100%;
  height: 13px;
}

.loader__warning {
  text-align: center;
  font-size: 16px;
}

.loader__progress::-webkit-progress-bar,
.loader__progress::-webkit-progress-value {
  border-radius: 10px;
}

.loader__progress::-webkit-progress-bar {
  background-color: var(--second-color);
}

.loader__progress::-webkit-progress-value {
  background-color: var(--main-color);
}

.loader__percent {
  color: var(--main-color);
}

/* Auth */

.auth {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth__body {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  max-width: 450px;
  background-color: var(--second-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--border-color);
}

.auth__item {
  margin-bottom: 15px;
}

.auth__label {
  color: var(--main-title-color);
}

.auth__form {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 30px;
}

.auth__help {
  display: flex;
}

.auth__help-text,
.auth__help-link {
  font-size: 16px;
}

.auth__help-link {
  color: var(--main-color);
}

.auth__help-text {
  margin-right: 5px;
}

.auth__help-link:hover {
  text-decoration: underline;
}

.auth__subtitle {
  text-align: center;
}

/* platforms */

.platforms__list {
  display: flex;
  margin: -5px;
  flex-wrap: wrap;
  justify-content: center;
}

.platforms__item {
  width: calc(100% / 5);
  padding: 5px;
}

.platforms__link {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  background-color: var(--second-color);
  padding: 20px;
  color: var(--main-title-color);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--border-color);
  transition: transform 0.2s ease;
}

.platforms__link:hover {
  transform: translateY(-5px);
}

.platforms__link > svg {
  margin-bottom: 15px;
}

/* how */

.how__list {
  display: flex;
  margin: -20px;
  flex-wrap: wrap;
}

.how__item {
  width: calc(100% / 3);
  padding: 20px;
}

.how__list:has(.how__item:nth-child(4)) .how__item {
  width: calc(100% / 4);
}

.how__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.how__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  width: 50px;
  height: 50px;
  border: 2px solid var(--main-color);
  border-radius: 50%;
  color: var(--main-title-color);
}

.how__title {
  color: var(--main-title-color);
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
}

.how__text {
  text-align: center;
}

/* why */

.card__list {
  display: flex;
  margin: -10px;
  flex-wrap: wrap;
}

.card__item {
  width: calc(100% / 4);
  padding: 10px;
}

.card__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--second-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--border-color);
  height: 100%;
}

.card__wrapper > svg {
  margin-bottom: 15px;
}

.card__title {
  color: var(--main-title-color);
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
  min-height: 46px;
}

.card__text {
  text-align: center;
}

/* faq */

.faq__wrapper {
  background-color: var(--second-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--border-color);
}

.faq__item:not(:last-child) {
  margin-bottom: 20px;
}

/* profile */

.profile__body {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.profile__body > svg {
  margin-right: 10px;
}

.profile__item:not(:last-child) {
  margin-bottom: 8px;
}

.profile__link {
  color: var(--warning-color);
}

.profile__link:hover {
  color: var(--warning-color);
  text-decoration: underline;
}

.premium {
  background-color: var(--second-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--border-color);
}

/* contacts */

.contacts__title {
  color: var(--main-title-color);
}

.contacts__link {
  color: var(--main-color);
}

.contacts__link:hover {
  text-decoration: underline;
}

.contacts__item {
  display: flex;
  align-items: center;
}

.contacts__item:not(:last-child) {
  margin-bottom: 8px;
}

.contacts__item > svg,
.contacts__title {
  margin-right: 5px;
}

/* policy */

.policy__section > section:not(:last-child) {
  margin-bottom: 20px;
}

.policy__update {
  padding-top: 20px;
  border-top: 1px solid var(--second-color);
}

.policy__update > p {
  font-size: 16px;
}

/* adaptive */

@media (max-width: 1024px) {
  .header {
    flex-direction: column;
  }

  .header__item:not(:last-child) {
    margin-right: 0px;
  }

  .header__item > .link {
    padding: 10px;
  }

  .header__list {
    justify-content: center;
    flex-wrap: wrap;
  }

  .header__logo {
    margin-right: 0;
  }

  .header__nav,
  .header__logo {
    margin-bottom: 15px;
  }

  .platforms__item {
    width: calc(100% / 2);
  }

  .how__item,
  .card__item,
  .footer__list-item,
  .video__thumbnail,
  .video__meta,
  .quality__button,
  .quality__item-active,
  .how__list:has(.how__item:nth-child(4)) .how__item {
    width: 100%;
  }

  .quality__list {
    width: auto;
  }

  .quality__info {
    flex-direction: column;
    padding-left: 10px;
  }

  .quality__text {
    margin-bottom: 8px;
    margin-right: 0;
    padding: 0;
  }

  .table th,
  .table td {
    white-space: nowrap;
  }
}
