/* Mobile-only optimizations */
@media screen and (max-width: 768px) {
  /* Hide cursor follow on mobile */
  #cursor-follow {
    display: none !important;
  }

  /* Enable touch events */
  body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
  }

  /* Container - smaller for mobile */
  .container {
    width: 88%;
    margin: 10px auto;
    padding: 12px;
    border-width: 6px;
  }

  /* Text sizes - smaller for mobile */
  .logo {
    font-size: 28px;
    text-shadow: 2px 2px 0 white, 4px 4px 0 black;
  }

  .subtitle {
    font-size: 24px;
    text-shadow: 2px 2px 0 white, 4px 4px 0 black;
  }

  .slogan {
    font-size: 16px;
    padding: 12px;
    margin: 10px auto;
    border-width: 3px;
  }

  /* Character - smaller for mobile */
  .meme-character {
    width: 120px;
    height: 120px;
    border-width: 6px;
    margin: -15px auto 5px;
  }

  /* Buttons - smaller for mobile */
  .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
  }

  .link-button {
    width: 110px;
    height: 34px;
    font-size: 13px;
    border-width: 2px;
    touch-action: manipulation;
  }

  .social-icon {
    width: 18px;
    height: 18px;
  }

  /* Coins - smaller and optimized for mobile */
  .bubble {
    width: 45px;
    height: 45px;
    pointer-events: auto;
    animation: mobileFallDown 8s linear;
    will-change: transform;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    touch-action: manipulation;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  /* Separate mobile animation for better performance */
  @keyframes mobileFallDown {
    0% { 
      transform: translate3d(0, -50px, 0);
      opacity: 0;
    }
    10% {
      opacity: 1;
    }
    90% {
      opacity: 1;
    }
    100% { 
      transform: translate3d(0, calc(100vh + 50px), 0);
      opacity: 0;
    }
  }

  /* Reduce number of coins for mobile */
  #bubbles {
    opacity: 0.95;
  }

  /* Optimize ALL animations */
  * {
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000;
    -webkit-perspective: 1000;
  }

  /* Reduce animation stress */
  .container {
    animation: bounce 5s infinite ease-in-out;
    transform: translateZ(0);
  }

  /* Optimize collection text */
  .collect-text {
    will-change: transform, opacity;
    transform: translateZ(0);
  }

  @keyframes floatUp {
    0% {
      transform: translate3d(0, 0, 0);
      opacity: 1;
    }
    100% {
      transform: translate3d(0, -60px, 0);
      opacity: 0;
    }
  }

  /* Counter - smaller for mobile */
  .coin-pile {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 18px;
    border-width: 3px;
  }

  .coin-pile .disclaimer {
    font-size: 10px;
  }

  .collect-text {
    font-size: 18px;
    text-shadow: 
      2px 2px 0 #000,
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000;
  }

  /* Sound button - smaller for mobile */
  .sound-button {
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-width: 3px;
    bottom: 15px;
    right: 15px;
    touch-action: manipulation;
  }

  /* Contract address - smaller for mobile */
  .contract-address {
    font-size: 14px;
    padding: 10px;
    border-width: 2px;
  }

  .contract-address-label {
    font-size: 20px;
    margin-bottom: 6px;
  }

  /* Prevent zoom on double tap */
  /* Performance optimizations for mobile */
  * {
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000;
    -webkit-perspective: 1000;
  }

  /* Prevent zoom on double tap */
  meta[name="viewport"] {
    content: "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no";
  }

  .instruction-text {
    font-size: 16px;
    padding: 10px 20px;
    border-width: 2px;
    margin: 10px auto;
    border-radius: 12px;
    box-shadow: 
      0 3px 0 #000,
      inset -2px -2px 0 rgba(0,0,0,0.2),
      inset 2px 2px 0 rgba(255,255,255,0.3);
    animation: shake 3s infinite;
  }

  @keyframes shake {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
  }
}