@media (max-width: 1024px) {
  .header__container {
    padding: 5px 15px;
  }

  .main {
    padding: 75px 0 15px 0;
  }

  body {
    font-size: 16px;
    font-weight: 500;
    /* font-family: "DM Sans", sans-serif; */
    font-family: "Gilroy", -apple-system, blinkmacsystemfont, "Segoe UI", roboto,
      "Helvetica Neue", arial, "Noto Sans", "Liberation Sans", sans-serif,
      "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
      "Noto Color Emoji", sans-serif;
    margin: 0;
    line-height: 1.2;
    /* transition: background-color 0.3s ease, color 0.3s ease; */
    background-color: var(--main-color);
  }

  h1,
  h2 {
    font-size: 1.5em;
    margin: 10px 0;
    line-height: 1.3;
  }

  .main__container {
    display: flex;
    flex-direction: column;
  }

  .section {
    padding: 20px;
  }

  .gap-20 {
    gap: 10px;
  }

  .books {
    /* display: grid;
    grid-template-columns: 1fr 1fr;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px; */
  }

  .modal-content {
    background-color: var(--main-color);
    overflow: auto;
    margin: 0 auto;
    padding: 15px;
    width: 100%;
    height: 100%;
    max-width: inherit;
    border-radius: 0px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    max-height: inherit;
  }

  .kitty {
    position: absolute;
    width: 100px;
    bottom: 93%;
    left: 10px;
    filter: drop-shadow(-7px 15px 10px rgba(0, 0, 0, 0.4));
  }
  .young-cat {
    position: absolute;
    right: 0px;
    bottom: -46.5px;
    width: 150px;
    transform: rotate(3.5deg);
    filter: drop-shadow(-7px 15px 10px rgba(0, 0, 0, 0.4));
  }

  .crepeer {
    /* display: none; */
  }

  .minecraft-status__dropdown {
    right: -50px;
  }

  .minecraft-status__triangle-down {
    position: absolute;
    top: -5px;
    right: 24%;
  }

  .header__crepeer {
    width: 25px;
  }

  .cat-albom {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .work {
    flex-direction: column;
  }

  .work__section {
    width: 100%;
  }

  .project {
    flex-direction: column;
  }

  .project__section {
    width: 100%;
  }

  .blog__alco {
    position: inherit;
    right: 0;
  }

  .blog__card-text_noactive {
    display: none;
  }

  .footer_container {
    justify-content: center;
    gap: 2em;
  }

  .footer__left {
    align-items: center;
  }

  .footer__right {
    display: flex;
    flex-direction: column;
    gap: 3em;
  }

  .footer__social-links {
    align-items: center;
  }

  .music__links {
    align-items: inherit;
  }

  .music__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 15px;
  }

  .height__100 {
    min-height: 100%;
  }
  .margin__50 {
    margin: 50% auto 0 auto;
  }
  .stats-users {
    text-align: center;
  }

  .blog__card-title {
    font-size: 1.15em;
  }

  .blog__card-header {
    font-size: 1em;
  }

  .dot {
    width: 10px; /* Ширина кружка */
    height: 10px; /* Высота кружка */
  }

  /* vergill */
  .vergil {
    bottom: -25px;
    /* display: none; */
  }

  #meows {
    display: block;
    position: absolute;
    opacity: 0.05;
    right: 0px;
    top: 0;
    float: left;
    border-radius: 1.5rem;
    /* image-rendering: pixelated; */
    width: 100%;
    height: 100%;
  }

  .aboutme__section {
    background-image: none;
  }

  .aboutme_mobile__active {
    display: inherit;
  }

  .aboutme_pc__active {
    display: none;
  }

  /* калькулятор */
  .calc {
    padding: 20px 15px;
    max-width: 400px;
  }

  .close {
    color: var(--H-color);
    float: right;
    font-size: 36px;
    font-weight: bold;
    position: fixed;
    right: 5%;
  }

  .numbers {
    margin-top: 25px;
    gap: 10px;
  }

  /* BOOK */
  .book__list {
    flex-wrap: nowrap;
    overflow: auto;
    gap: 10px;
  }

  .book-btn {
    width: 8em;
    height: 12em;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s;
  }

  /* ------------ */
  .minecraft-btn {
    /* position: absolute; */
    width: 100%;
    color: var(--base-color-black);
    inset: 0;
    height: 100%;
    z-index: 1;
    background: var(--green2);
    /* box-shadow: 0 1px 5px var(--border-color); */
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    outline: 0px solid transparent;
    padding: 10px;
    border: 0px solid var(--base-color-black);
  }
  .minecraft-btn:hover {
    outline: none;
    opacity: 0.7;
  }

  .minecraft-imgs {
    display: grid;
    grid-template-columns: repeat(1, minmax(200px, 1fr));
    gap: 12px;
    margin: 0px;
    margin-top: 10px;
  }
  .minecraft-content img {
    height: auto;
  }

  .minecraft-content {
    background-color: var(--white-color);
    overflow: auto;
    margin: 0 auto;
    padding: 15px;
    width: 100%;
    height: 100%;
    max-width: inherit;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    max-height: inherit;
  }

  .music-btn {
    width: 100%;
    background: var(--head-footer--color);
    outline: none;
    border: none;
  }

  .music_section {
    /* grid-column: span 1; */
    display: block;
    /* flex-direction: row; */
    /* justify-content: space-around; */
    /* align-items: flex-start; */
  }

  .minecraft_check_status {
    min-width: 100%;
  }

  /* card blog */
  .main-blog__card {
    padding: 25px;
  }

  .main-blog__title {
    margin: 10px 0;
  }

  audio {
    width: 100%;
  }

  .music__name {
    animation: move 8s linear infinite;
    white-space: nowrap;
  }
  @keyframes move {
    0% {
      transform: translateX(30%);
    }
    100% {
      transform: translateX(-100%);
    }
  }

  /* CHAT */
  .chat__modal {
    display: none;
    /* Скрыто по умолчанию */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* затемнение */
  }

  .header__chat {
    width: 50px;
    height: 50px;
    cursor: pointer;
    position: fixed;
    bottom: 2%;
    right: 2.5%;
    z-index: 1;
    fill: var(--H-color); /* Применяем переменную к атрибуту fill */
  }

  .chat__modal-content {
    margin: 0;
    border-radius: 0;
    max-height: inherit;
    overflow-y: inherit;
  }
  .chat__close {
    top: 15px;
    right: 15px;
    font-size: 2em;
    cursor: pointer;
  }

  .chat__modal-content::-webkit-scrollbar {
    width: 0px;
  }

  #chatForm button {
    max-height: 38px;
  }

  .about-me__hero-content {
    flex-direction: column; /* Перестраиваем панели в колонку */
    border-radius: 0; /* Убираем закругления, чтобы секция занимала всю ширину */
  }

  .about-me__main-info {
    padding: 30px 15px; /* Уменьшаем внутренние отступы */
  }

  .about-me__main-info h1 {
    font-size: 2rem; /* Уменьшаем размер заголовка */
    line-height: 1.2;
  }

  .about-me__main-info::before {
    /* Меняем градиент для лучшей читаемости на маленьких экранах */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)),
      url(../img/panorama_0.jpg);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    transform: scale(1.03);
    filter: blur(3px); /* Чуть меньше размытие */
  }

  .about-me__skills-tags {
    margin-top: 15px;
    margin-bottom: 15px;
    justify-content: center; /* Центрируем теги */
  }

  .about-me__right-panel {
    transform: none; /* Убираем transform: scale, он не нужен на мобильных */
    padding: 25px 15px;
    gap: 10px;
  }

  .about-me__right-panel h3 {
    margin-bottom: 10px;
  }

  .about-me__interests-list li {
    margin-bottom: 5px;
  }

  .work__entry {
    flex-direction: row;
    gap: 0;
    position: relative;
    padding-left: 0px;
  }

  /* Линия на мобилке - по левому краю экрана */
  .work__timeline {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    min-width: 2px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 12px;
  }

  /* Точка на линии */
  .work__timeline-dot {
    position: absolute;
    left: -5px;
    top: 0;
    margin-bottom: 0;
    width: 12px;
    height: 12px;
    z-index: 2;
  }

  /* Вертикальная линия между элементами */
  .work__entry:not(:last-child) .work__timeline::after {
    display: block;
    position: absolute;
    top: 12px;
    left: 0;
    transform: none;
    width: 2px;
    height: calc(100% + 20px);
    background-color: var(--base-color);
    opacity: 0.3;
  }

  /* Скрываем дату внутри timeline (она показывается через ::after в header) */
  .work__timeline-date {
    display: none;
  }

  /* Контент с небольшим отступом от линии */
  .work__content {
    margin-left: 10px;
    width: calc(100% - 10px);
  }

  /* ВАРИАНТ 1: Дата внутри карточки, под заголовком */
  .work__header {
    position: relative;
    margin-bottom: 5px;
  }

  .work__header::after {
    content: attr(data-date);
    display: block;
    color: var(--H-color);
    font-size: 0.85em;
    font-weight: 500;
    background-color: rgba(30, 93, 51, 0.15);
    border: 1px solid var(--base-color);
    border-radius: 12px;
    padding: 4px 10px;
    margin-top: 0px;
    width: fit-content;
  }

  /* ВАРИАНТ 2: Дата справа от заголовка в одной строке (закомментирован) */

  .work__content::before {
    display: none;
  }

  .work__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .work__header::after {
    content: attr(data-date);
    font-size: 0.85em;
    font-weight: 500;
    color: var(--H-color);
    background-color: rgba(30, 93, 51, 0.15);
    border: 1px solid var(--base-color);
    border-radius: 12px;
    padding: 4px 10px;
    white-space: nowrap;
    margin-left: auto;
  }

  .work__container {
    gap: 15px;
  }

  .project__container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* VPN SLIDER - мобильная адаптация */
  .vpn-slider {
    margin: 15px 0;
  }

  .vpn-slider__image {
    max-height: 300px;
    border-radius: 10px;
  }

  .vpn-slider__arrow {
    width: 35px;
    height: 35px;
    padding: 8px;
  }

  .vpn-slider__arrow--left {
    left: 10px;
  }

  .vpn-slider__arrow--right {
    right: 10px;
  }

  .vpn-slider__arrow svg {
    width: 18px;
    height: 18px;
  }

  .vpn-slider__dots {
    bottom: 10px;
    gap: 8px;
  }

  .vpn-slider__dot {
    width: 10px;
    height: 10px;
  }
}

/* Дополнительная адаптация для очень маленьких экранов */
@media (max-width: 480px) {
  .vpn-slider__image {
    max-height: 300px;
  }

  .vpn-slider__arrow {
    width: 30px;
    height: 30px;
    padding: 6px;
  }

  .vpn-slider__arrow--left {
    left: 5px;
  }

  .vpn-slider__arrow--right {
    right: 5px;
  }

  .vpn-slider__arrow svg {
    width: 16px;
    height: 16px;
  }

  .vpn-slider__dots {
    bottom: 8px;
    gap: 6px;
  }

  .vpn-slider__dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 1919px) {
  .kitty {
    position: absolute;
    width: 100px;
    bottom: 93%;
    left: 10px;
    filter: drop-shadow(-7px 15px 10px rgba(0, 0, 0, 0.4));
  }
  .young-cat {
    position: absolute;
    right: 0px;
    bottom: -46.5px;
    width: 150px;
    transform: rotate(3.5deg);
    filter: drop-shadow(-7px 15px 10px rgba(0, 0, 0, 0.4));
  }
}
