.button {
  background: var(--themes-background);
  border: 2px solid var(--themes-main-color);
  cursor: pointer;
  font-family: var(--font-accent);
  font-size: 14px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button:focus {
  outline: none;
  box-shadow: 2px 2px 0 var(--themes-accent-color);
}

.button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--themes-main-color);
  transition: width 0.5s ease-in-out;
}

.button:hover::before {
  width: 100%;
}

.button .button__text,
.button .save-icon {
  position: relative;
  z-index: 1;
  color: var(--themes-background);
  mix-blend-mode: difference;
  transition: color 0.5s ease-in-out;
}

.page {
  min-inline-size: 320px;
  min-block-size: 100dvb;
  font-family: var(--font-main);
  color: var(--themes-main-color);
  background-image: var(--page-background);
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  font-variation-settings: "wght" var(--font-weight-card-text);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content-wrapper {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.header.responsive-block,
.main.responsive-block {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  box-sizing: border-box;
}

.header__content {
  background: #ffffff;
  border: 2px solid #000000;
  padding: 130px 0;
  margin: 100px 0 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
}

.header__title {
  font-family: "PressStart2P", fantasy;
  font-size: 65px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  color: #000000;
  display: block;
  max-width: 455px;
  margin: 0 auto 20px;
}

.header__subtitle {
  font-family: "PressStart2P", fantasy;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  margin: 0;
  color: #000000;
  background: #ffffff;
  display: inline-block;
}

.main.responsive-block {
  padding: 45px 0;
  width: 100%;
}

.card {
  background: #ffffff;
  border: 2px solid #000000;
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.card__header {
  padding: 5px 10px;
  border-bottom: 2px solid #000000;
}

.card__title--content {
  font-family: "Inter", sans-serif;
  font-variation-settings: "wght" 715;
  font-size: 18px;
  line-height: 1.2;
  color: #000000;
  margin: 0;
  padding: 0;
}

.card__content {
  display: flex;
  flex-direction: column;
}

.card__image-wrapper {
  margin: 0;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-block-start: var(--primary-border);
  border-block-end: var(--primary-border);
}

.filter-nature {
  filter: hue-rotate(90deg) saturate(1.3) contrast(1.1);
}

.filter-mystic {
  filter: hue-rotate(220deg) brightness(0.8) contrast(1.2) blur(0.5px);
}

.filter-dreamy {
  filter: brightness(1.1) saturate(1.2) contrast(0.9) blur(0.3px);
}

.filter-warm {
  filter: sepia(0.3) hue-rotate(-20deg) saturate(1.4) brightness(1.05);
}

.filter-frost {
  filter: brightness(1.2) contrast(1.3) hue-rotate(180deg) saturate(0.8)
    blur(0.2px);
}

.filter-urban {
  filter: grayscale(0.7) contrast(1.4) brightness(0.95);
}

.filter-epic {
  filter: contrast(1.5) brightness(0.85) saturate(1.3) hue-rotate(-10deg);
}

.card__label {
  position: absolute;
  top: 23px;
  right: 23px;
  font-family: "PressStart2P", fantasy;
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0%;
  text-transform: uppercase;
  color: #000000;
  background: transparent;
  display: inline-block;
  padding: 0;
  mix-blend-mode: hard-light;
  opacity: 0.5;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff,
    1px 1px 0 #fff;
}

@supports (-webkit-text-stroke: 1px #ffffff) or (text-stroke: 1px #ffffff) {
  .card__label {
    -webkit-text-stroke: 1px #ffffff;
    text-stroke: 1px #ffffff;
    paint-order: stroke fill;
    text-shadow: none;
  }
}

.card__text {
  font-family: "Inter", sans-serif;
  font-variation-settings: "wght" 465;
  font-size: 18px;
  line-height: 21px;
  color: #000000;
  text-align: start;
  margin: 25px 25px auto 25px;
}

.card__text p + p {
  margin-top: 25px;
}

.card__actions {
  display: flex;
  align-items: center;
  padding: 25px 25px 25px;
  justify-content: flex-end;
  gap: 6px;
}

.card__icon-button {
  background: transparent;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 36px;
  transition: border-color 0.3s ease;
}

.card__icon-button:focus {
  outline: none;
}

.card__icon-button:focus-visible {
  border-color: var(--themes-accent-color);
}

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

.card__like-button {
  width: 130px;
  height: 38px;
}

.card__save-button {
  width: 335px;
  height: 55px;
  gap: 8px;
}

.modal__button {
  width: 293px;
  height: 38px;
}

.save-icon {
  width: 21px;
  height: 21px;
}

.card__save-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-block-end: 45px;
  width: 100%;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  background: transparent;
  padding: 0;
  max-width: 353px;
  width: calc(100% - 40px);
  z-index: 1000;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.modal[open] {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal__content {
  background: #ffffff;
  border: 2px solid #000000;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  box-sizing: border-box;
}

.modal__row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.modal__icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal__diskette {
  color: #000000;
  width: 39px;
  height: 39px;
}

.modal__text-content {
  flex: 1;
}

.modal__text {
  font-family: "PressStart2P", fantasy;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  text-transform: uppercase;
  color: #000000;
  margin: 0;
}

@media (max-width: 700px) {
  .content-wrapper,
  .header.responsive-block,
  .main.responsive-block {
    max-width: 100%;
    padding: 0 15px;
  }

  .header__title {
    font-size: clamp(3.0625rem, 2.7104rem + 1.5023vw, 4.0625rem);
    max-width: min(455px, 100% - 30px);
  }

  .header__subtitle {
    font-size: clamp(0.875rem, 0.6769rem + 0.8451vw, 1.4375rem);
  }

  .card__save-button {
    width: min(335px, 100% - 30px);
  }
}

@media (width <= 375px) {
  .content-wrapper {
    max-width: 375px;
    padding: 0px;
  }

  .header.responsive-block,
  .main.responsive-block,
  .card__save-container {
    max-width: 375px;
    padding: 0;
  }

  .header__content {
    padding: 120px 0;
    margin: 100px 0 50px;
  }

  .header__title {
    font-size: 49px;
    max-width: 100%;
    margin: 0 0 20px;
    padding: 0;
  }

  .header__subtitle {
    font-size: 14px;
  }

  .main.responsive-block {
    padding: 45px 0;
  }

  .card {
    margin-bottom: 50px;
  }

  .card__header {
    padding: 0;
  }

  .card__title--content {
    padding: 5px 10px;
    font-size: 18px;
  }

  .card__label {
    top: 25px;
    right: 25px;
    font-size: 14px;
  }

  .card__text {
    margin: 25px 25px auto 24px;
    font-size: 18px;
    line-height: 21px;
  }

  .card__text p + p {
    margin-top: 25px;
  }

  .card__actions {
    padding: 25px 25px 25px;
  }
  
  .card__save-button {
    flex-direction: column;
    width: 100%;
    max-width: 306px;
    height: 84px;
    gap: 8px;
  }

  .save-icon {
    width: 28px;
    height: 28px;
  }

  .modal {
    max-width: 341px;
    width: calc(100% - 34px);
  }

  .modal__content {
    padding: 30px;
    gap: 30px;
  }

  .modal__button {
    width: 100%;
    max-width: 257px;
  }
}