@media (max-width: 768px) {
  /* ===== СКРЫВАЕМ HEADER НА МОБИЛКЕ ===== */
  header {
    display: none;
  }

  /* ===== LAYOUT МОБИЛКИ ===== */
  body {
    display: flex;
    flex-direction: column;
    /* Fallback → современное значение (порядок важен!) */
    min-height: 100vh;
    min-height: 100svh;
    min-height: -webkit-fill-available;
    /* НЕ height, а min-height! */
    overflow-x: hidden;
    overflow-y: auto;
  }

  .top-section {
    flex-shrink: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top);
  }

  .main-content {
    flex: 1;
    overflow-y: auto;
    display: block;
    min-height: 0;
  }

  .left {
    overflow: visible;
    max-width: 100%;
  }

  .right {
    position: relative;
    max-width: 100%;
  }

  /* ===== BURGER MENU ===== */
  .burger-checkbox {
    display: none;
  }

  .burger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 99, 71, 0.5);
    transition: background 0.3s ease;
  }

  .burger-icon:hover {
    background: rgba(255, 99, 71, 0.8);
  }

  .burger-icon span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .burger-checkbox:checked + .burger-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .burger-checkbox:checked + .burger-icon span:nth-child(2) {
    opacity: 0;
  }

  .burger-checkbox:checked + .burger-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition:
      max-height 0.2s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.15s ease,
      transform 0.15s ease;
  }

  .burger-checkbox:checked ~ .nav-menu {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 0.5rem;
  }

  .nav-item {
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateX(-20px);
    transition:
      opacity 0.15s ease,
      transform 0.15s ease;
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .burger-checkbox:checked ~ .nav-menu .nav-item {
    opacity: 1;
    transform: translateX(0);
  }

  .burger-checkbox:checked ~ .nav-menu .nav-item:nth-child(1) {
    transition-delay: 0.02s;
  }

  .burger-checkbox:checked ~ .nav-menu .nav-item:nth-child(2) {
    transition-delay: 0.04s;
  }

  .burger-checkbox:checked ~ .nav-menu .nav-item:nth-child(3) {
    transition-delay: 0.06s;
  }

  .burger-checkbox:checked ~ .nav-menu .nav-item:nth-child(4) {
    transition-delay: 0.08s;
  }

  .nav-item.separator::after {
    display: none;
  }

  .nav-button {
    flex: 1;
    justify-content: flex-start;
  }

  .nav-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  /* ===== CONTAINER ===== */
  .container {
    flex-direction: column;
    padding: 1rem;
    min-height: auto;
    width: auto;
  }

  .left,
  .right {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .right {
    order: -1;
    margin-bottom: 1rem;
  }

  .left {
    order: 1;
  }

  /* ===== SERVER BUTTONS ===== */
  #server-buttons {
    padding: 1rem;
  }

  .server-button {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    gap: 0.4rem;
  }

  .server-button img {
    width: 32px;
    height: 32px;
  }

  /* ===== DETAILS ===== */
  .details {
    width: 100%;
    box-sizing: border-box;
    margin: 0.5rem 0;
    border-radius: 12px;
    overflow-x: auto;
  }

  .details .info {
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
  }

  .info-text {
    flex: 1;
    min-width: 0;
  }

  .game-image {
    flex-shrink: 0;
    margin-left: 0;
  }

  /* ===== PLAYER LIST ===== */
  .player-list-wrapper ul {
    grid-template-columns: 1fr;
    font-size: 0.85rem;
  }

  /* ===== SITE FOOTER (мобилка) ===== */
  .site-footer {
    flex-shrink: 0;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom));
  }

  .footer-content {
    padding: 0;
  }

  .footer-logo-link {
    font-size: 0.7rem;
    flex-direction: column;
    gap: 0.2rem;
  }

  .footer-logo-link img {
    height: 20px;
  }

  .footer-links {
    font-size: 0.65rem;
  }

  /* ===== СКРОЛЛБАР ===== */
  .main-content::-webkit-scrollbar {
    width: 4px;
  }

  .main-content::-webkit-scrollbar-thumb {
    background: rgba(255, 99, 71, 0.5);
    border-radius: 2px;
  }
}
