/* ===============================
   MOBILE LAYOUT (DESKTOP STYLE)
=============================== */

@media (max-width: 900px) {

  body {
    overflow: hidden !important;
    background: black;
  }

  /* Центр страницы */
  #main {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    max-width: 420px !important;
    text-align: center !important;
  }

  /* ЛОГО */
  .copy {
    font-size: 36px !important;
    margin-bottom: 8px !important;
    letter-spacing: 4px;
  }

  /* Подпись */
  #track-title {
    font-size: 14px !important;
    opacity: 0.9;
  }

  /* ИКОНКИ */
  header nav ul {
    display: flex !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 15px !important;
  }

  header nav ul li a {
    width: 48px !important;
    height: 48px !important;
    font-size: 22px !important;
    border-radius: 14px !important;
  }

  /* ПЛЕЕР */
  #video-controls {
    position: fixed !important;
    bottom: 90px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 80% !important;
  }

  #progress-container {
    height: 6px !important;
  }

  /* FPS / ONLINE */
  #fps-box {
    top: 12px !important;
    right: 12px !important;
    font-size: 12px !important;
  }

  #online-box {
    top: 60px !important;
    right: 12px !important;
    font-size: 12px !important;
  }

  /* TG */
  #tg-chat-btn {
    bottom: 20px !important;
    left: 20px !important;
  }

  /* RGB PANEL */
  #rgb-panel {
    bottom: 20px !important;
    right: 20px !important;
    width: 220px !important;
  }
}

/* МЕЛКИЕ ТЕЛЕФОНЫ */
@media (max-width: 420px) {
  .copy {
    font-size: 30px !important;
  }
}

/* ============================
   FINAL MOBILE FIX (IOS STYLE)
============================ */

@media (max-width: 900px) {

  /* SAFE AREA */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
  }

  /* ===== ЦЕНТР ===== */
  #main {
    position: absolute !important;
    top: 52% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100%;
    max-width: 420px;
    text-align: center;
  }

  /* ЛОГО */
  .copy {
    font-size: 34px !important;
    letter-spacing: 4px;
    margin-bottom: 6px;
  }

  #track-title {
    font-size: 14px;
    opacity: 0.85;
  }

  /* ===== ИКОНКИ ===== */
  header nav ul {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
  }

  header nav ul li a {
    width: 46px;
    height: 46px;
    font-size: 21px;
    border-radius: 14px;
  }

  /* ===== PLAYER ===== */
  #video-controls {
    position: fixed;
    bottom: calc(90px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: 78%;
  }

  #progress-container {
    height: 6px;
  }

  /* ===== FPS / ONLINE ===== */
  #fps-box {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    font-size: 12px;
  }

  #online-box {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
  
    /* 👇 главное */
    transform: translateX(calc(-100% - 10px));
  
    font-size: 12px;
  }




  /* ===== TG BUTTON ===== */
  #tg-chat-btn {
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 20px;
	top: 20px;
  }

  /* ===== RGB PANEL ===== */
  #rgb-panel {
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 20px;
    width: 220px;
  }
}

/* МАЛЕНЬКИЕ ЭКРАНЫ */
@media (max-width: 420px) {
  .copy {
    font-size: 30px;
  }
}

/* ===== FIX ONLINE BOX WIDTH ===== */
#online-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: auto !important;
  min-width: unset !important;
  max-width: none !important;

  padding: 8px 14px !important;
  white-space: nowrap !important;

  border-radius: 14px !important;
  gap: 6px !important;
}

/* Текст внутри */
#online-box span {
  white-space: nowrap !important;
}

#hud-top {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;

  display: flex;
  align-items: center; /* ВОТ ГЛАВНОЕ */
  gap: 12px;

  z-index: 9999;
}

/* Общий стиль */
#hud-top > div {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 6px 14px;
  font-size: 12px;

  background: rgba(0, 255, 200, 0.14);
  border: 1px solid rgba(0, 255, 200, 0.8);
  border-radius: 14px;

  box-shadow:
    0 0 12px rgba(0, 255, 200, 0.45),
    inset 0 0 8px rgba(0, 255, 200, 0.25);
}

