/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* ---- MOBILE (<768px) ---- */
@media (max-width: 767px) {
  .scene {
    background: #030303;
  }

  /* Hide pixel art layers on mobile */
  .scene-background,
  .minitel-overlay {
    display: none;
  }

  /* Scene frame fills viewport */
  .scene-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  /* Screen fills viewport minus bottom nav */
  .minitel-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 50px);
    border-radius: 0;
    border: 2px solid #222;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
  }

  /* Function keys as bottom bar (re-enable from desktop display:none) */
  .function-keys {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 1 !important;
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    background: #1a1510;
    border-top: 1px solid #2a2520;
    z-index: 100;
    gap: 4px;
  }

  .fn-key {
    flex: 1;
    padding: 8px 4px;
    font-size: 11px;
    border-radius: 3px;
    background: rgba(30, 25, 18, 0.9);
    backdrop-filter: none;
  }

  .fn-key .key-hint {
    display: none;
  }

  .videotex-display {
    font-size: clamp(11px, 2.8vw, 15px);
    padding: 10px 8px;
    line-height: 1.25;
  }

  .double-height {
    font-size: 1.4em;
  }

  .vtx-company {
    font-size: 1.1em;
  }

  .vtx-spacer {
    height: 0.3em;
  }

  .vtx-rule,
  .vtx-rule-bright {
    margin: 1px 0;
  }

  .vtx-menu-item {
    padding: 2px 4px;
    margin: 1px 0;
  }

  .vtx-box {
    padding: 1px 4px;
  }

  .crt-scanlines {
    background: repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 2px,
      rgba(0, 0, 0, 0.06) 2px, rgba(0, 0, 0, 0.06) 4px
    );
  }

  .crt-vignette {
    background: radial-gradient(
      ellipse 90% 90% at 50% 50%,
      transparent 70%,
      rgba(0, 0, 0, 0.15) 100%
    );
  }

  .keyboard-hints {
    display: none !important;
  }
}

/* ---- VERY SMALL SCREENS (<400px) ---- */
@media (max-width: 400px) {
  .videotex-display {
    font-size: 10px;
    padding: 6px 5px;
  }
  .fn-key .key-label {
    font-size: 9px;
  }
  .double-height {
    font-size: 1.3em;
  }
  .vtx-banner {
    font-size: 0.5em;
  }
}

/* ---- LANDSCAPE MOBILE ---- */
@media (max-height: 500px) and (orientation: landscape) {
  .function-keys {
    padding: 3px 8px;
  }
  .fn-key {
    padding: 4px;
    font-size: 10px;
  }
}
