/* ==========================================================================
   MOVE 1 STICK - RESPONSIVE MOBILE MEDIA QUERIES
   ========================================================================== */

/* Strictly hide mobile graphics on desktop screens */
@media (min-width: 1025px) {
  .mobile-graphics-row { display: none !important; }
  .mobile-footer-card { display: none !important; }
  .mobile-only { display: none !important; }
}

@media (max-width: 1024px) {
  /* Visibility Toggle */
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .desktop-decor { display: none !important; }
  .desktop-mini-footer { display: none !important; }
  
  /* Mobile Header: Logo on Left, Search + Dark Mode + Menu on Right */
  .site-header {
    padding: 8px 0;
  }

  .nav-container {
    padding: 0 14px;
    gap: 8px;
  }

  .brand-logo-img { height: 32px; }

  .header-right-actions {
    gap: 6px;
  }

  .icon-btn-round { width: 36px; height: 36px; }

  /* Full-width Responsive Search Drawer on Mobile */
  .search-drawer-overlay {
    top: 54px;
    right: 12px;
    left: 12px;
    width: auto;
    box-sizing: border-box;
  }

  .search-drawer-overlay input {
    width: 100%;
    box-sizing: border-box;
  }

  .game-stage-outer {
    margin: 8px auto 0;
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Central Main Game Card on Mobile */
  .main-game-card {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 20px;
    padding: 12px 10px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    overflow: hidden;
  }

  /* HUD Responsive */
  .game-hud-wrapper {
    gap: 6px;
    margin-bottom: 10px;
  }

  .hud-row {
    grid-template-columns: 1.28fr 1fr 1fr;
    gap: 5px;
  }

  .hud-pill {
    padding: 5px 4px;
    font-size: 0.74rem;
    border-radius: 8px;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
  }

  .hud-icon {
    font-size: 0.88rem;
  }

  .hud-label {
    font-size: 0.72rem;
  }

  .desktop-diff-label {
    display: none !important;
  }

  .mobile-diff-label {
    display: inline !important;
  }

  .hud-sub {
    font-size: 0.65rem;
  }

  .hud-val-box {
    padding: 1px 4px;
    font-size: 0.74rem;
  }

  .hud-val-text {
    font-size: 0.82rem;
  }

  /* Fixed Puzzle Box on Mobile (Height: 188px) */
  .fixed-puzzle-card {
    height: 188px;
    border-radius: 18px;
    border-width: 3px;
    box-shadow: 0 0 0 2.5px #eab308, 0 6px 20px rgba(234, 179, 8, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.9);
    margin-bottom: 14px;
    padding: 8px 10px;
  }
  .puzzle-arrow { width: 14px; height: 20px; }
  .puzzle-arrow.left { left: -14px; }
  .puzzle-arrow.right { right: -14px; }

  /* Callout Banner */
  .callout-wrapper { margin-top: -26px; }
  .callout-brush-bg { padding: 6px 16px; }
  #callout-instruction { font-size: 0.98rem; }

  /* Timer Pill */
  .timer-section-row {
    margin: 10px 0 14px;
  }
  .timer-pill { padding: 4px 18px; box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.1); }
  #level-timer { font-size: 1.25rem; }

  /* 3D Action Buttons (Undo / Reset / Hint) */
  .controls-panel {
    gap: 8px;
    width: 100%;
    margin-top: 0;
  }
  .btn-3d {
    padding: 10px 4px;
    font-size: 0.9rem;
  }

  /* Mobile Graphics Below the Card */
  .mobile-graphics-row {
    display: flex !important;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    max-width: 440px;
    margin: 20px auto 0 !important;
    position: relative;
    box-sizing: border-box;
    padding: 0 4px;
  }
  
  .mobile-girl-container {
    width: 46%;
    max-width: 175px;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    flex-shrink: 0;
    line-height: 0;
  }
  
  .mobile-girl {
    width: 100%;
    height: auto;
    max-height: 190px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
  }
  
  .mobile-bubbles {
    width: 52%;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 12px;
  }
  
  .bubble-large {
    background: #fff;
    color: #1e3a8a;
    font-family: 'Comic Sans MS', 'Plus Jakarta Sans', cursive, sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    padding: 8px 14px;
    border-radius: 50% 50% 50% 10%;
    border: 3px solid #60a5fa;
    text-align: center;
    transform: rotate(-5deg);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
  }
  
  .bubble-text {
    font-family: 'Comic Sans MS', 'Plus Jakarta Sans', cursive, sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    color: #1e3a8a;
    text-align: center;
    margin-top: 10px;
    transform: rotate(5deg);
  }
  
  .bubble-brain {
    position: absolute;
    right: -4px;
    bottom: 0;
    font-size: 2.2rem;
  }
  
  .bubble-question {
    position: absolute;
    left: -12px;
    top: -8px;
    font-size: 2.5rem;
    color: #f59e0b;
    font-weight: 900;
    transform: rotate(-15deg);
  }

  /* Bottom Branding Pill */
  .mobile-footer-card {
    background: #ffffff;
    border-radius: 9999px;
    padding: 10px 18px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin: 12px auto 26px;
    width: 94%;
    max-width: 440px;
    border: 1px solid var(--border-color);
    display: block;
    box-sizing: border-box;
  }
  
  .footer-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: #1e293b;
    font-size: 0.9rem;
  }
  
  .footer-actions .arrow { color: #ef4444; }
  .footer-subtext { font-size: 0.78rem; color: #64748b; margin-top: 2px; font-weight: 700; }

  /* Author Card Mobile */
  .author-bio-section {
    padding: 0 14px;
    margin-top: 28px;
  }

  .author-card {
    padding: 18px 16px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  }

  .author-avatar-badge {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
  }

  .author-name-title {
    font-size: 1.45rem;
  }

  .author-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.78rem;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 0 20px;
  }

  .footer-inner {
    padding: 0 16px;
    grid-template-columns: 1fr !important;
    gap: 22px;
  }

  .footer-col-brand {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
  }

  .footer-desc {
    max-width: 100%;
  }

  .footer-col h5 {
    margin-bottom: 8px;
  }

  .footer-bottom {
    padding: 16px 16px 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  /* Modal */
  .modal-window { width: 95%; padding: 16px; border-radius: 20px; }
  .modal-stats-card-grid { gap: 4px; padding: 6px; }
}

@media (max-width: 360px) {
  .game-stage-outer { padding: 0 4px; }
  .main-game-card { padding: 10px 8px 14px; }
  .hud-row { gap: 4px; }
  .hud-pill { padding: 4px 2px; font-size: 0.7rem; }
  .hud-icon { font-size: 0.8rem; }
  .hud-label { font-size: 0.68rem; }
  .hud-val-box { font-size: 0.7rem; padding: 1px 3px; }
  .fixed-puzzle-card { height: 168px; }
  .btn-3d { font-size: 0.82rem; padding: 8px 2px; }
  .mobile-graphics-row { height: auto; }
}