
<style>
    @import url('https://fonts.googleapis.com/css2?family=Bungee&family=Orbitron:wght@400;700&family=Press+Start+2P&family=Rajdhani:wght@500;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syncopate:wght@400;700&family=VT323&display=swap');

    /* --- GLOBAL SETTINGS & THEMES --- */
  html {
      scroll-behavior: smooth; 
      overflow-y: auto; 
      overscroll-behavior-y: none; /* 🔥 Locks the page so our custom pull works perfectly */
      background-color: #0a0a0c; 
      height: 100%;
  }

/* DEFAULT (ORIGINAL) THEME */
  body {
    background: #0a0a0c; color: white; font-family: sans-serif;
    display: flex; flex-direction: column; align-items: center;
    min-height: 100vh; margin: 0; padding-bottom: 150px; 
    -webkit-overflow-scrolling: touch; 
    /* 👇 FIX: Shifted gradient so the line draws at the bottom of the 4px gap, removing the top line */
    background-image: linear-gradient(transparent 3px, rgba(255,255,255,0.05) 3px);
    background-size: 100% 4px; touch-action: pan-y; 
    transition: background 0.3s ease, color 0.3s ease;
  }
  /* --- 🎨 NEW THEME: PRO TECH (Modern/Dark) --- */
  body.theme-pro {
      background-color: #000000;
      background-image: 
          radial-gradient(circle at 50% 30%, rgba(20, 40, 60, 0.4) 0%, transparent 60%),
          linear-gradient(transparent 49px, rgba(0, 255, 255, 0.03) 49px), 
          linear-gradient(90deg, transparent 49px, rgba(0, 255, 255, 0.03) 49px);
      background-size: 100% 100%, 50px 50px, 50px 50px;
  }
  body.theme-pro .btn { border-color: #00f3ff; color: #00f3ff; box-shadow: 0 0 8px rgba(0, 243, 255, 0.15); background: rgba(0,0,0,0.6); }
  body.theme-pro .menu-toggle { border-color: #00f3ff; color: #fff; background: rgba(0, 50, 60, 0.8); }
  body.theme-pro h1 { text-shadow: 0 0 15px rgba(0, 243, 255, 0.6); color: #fff; }

  /* --- 🕹️ NEW THEME: CLASSIC ARCADE (Retro/Green) --- */
  body.theme-arcade {
      background-color: #111;
      background-image: radial-gradient(#1a1a1a 15%, transparent 16%), radial-gradient(#1a1a1a 15%, transparent 16%);
      background-size: 10px 10px;
      background-position: 0 0, 5px 5px;
  }
  body.theme-arcade .btn { border: 2px solid #00ff00; color: #00ff00; font-family: "Courier New", monospace; letter-spacing: 1px; }
  body.theme-arcade h1 { color: #00ff00; text-shadow: 4px 4px 0px #005500; }
  body.theme-arcade .menu-toggle { border: 2px solid #00ff00; color: #00ff00; }
  body.theme-arcade .studio-sec { border-left: 1px solid #003300; border-right: 1px solid #003300; padding: 10px; }
  
  /* --- 🌅 NEW THEME: RETRO WAVE (80s/Purple) --- */
  body.theme-retro {
    background-color: #1a0022; 
    background-image: linear-gradient(to bottom, #2b003b 0%, #1a0022 100%);
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
  }

  /* Retro Grid Floor Effect */
  body.theme-retro::before {
      content: ""; position: fixed; bottom: 0; left: 0; width: 100%; height: 40vh;
      background: linear-gradient(to top, rgba(255, 0, 255, 0.2) 1px, transparent 1px),
                  linear-gradient(90deg, rgba(255, 0, 255, 0.2) 1px, transparent 1px);
      background-size: 100% 20px, 40px 100%;
      transform: perspective(300px) rotateX(40deg);
      pointer-events: none; z-index: -1; opacity: 0.5;
  }
  body.theme-retro .btn { border-color: #ff00ff; color: #00ffff; background: rgba(20,0,20,0.6); }
  body.theme-retro h1 { 
      background: -webkit-linear-gradient(#00ffff, #ff00ff);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      text-shadow: 0 0 10px rgba(255,0,255,0.5);
  }
  html:has(body.theme-retro) { background-color: #1a0022 !important; }

  /* --- 🌸 NEW THEME: FANCY PINK (Girly/Glam) --- */
  body.theme-pink {
      background-color: #1f0010;
      background-image: 
          radial-gradient(circle at 50% 0%, rgba(255, 20, 147, 0.4) 0%, transparent 60%),
          linear-gradient(transparent 39px, rgba(255, 105, 180, 0.08) 39px), 
          linear-gradient(90deg, transparent 39px, rgba(255, 105, 180, 0.08) 39px);
      background-size: 100% 100%, 40px 40px, 40px 40px;
  }
  body.theme-pink .btn { border-color: #ff69b4; color: #ffb6c1; background: rgba(50, 0, 25, 0.6); box-shadow: 0 0 12px rgba(255, 105, 180, 0.3); border-radius: 20px; }
  body.theme-pink h1 { color: #fff; text-shadow: 0 0 15px #ff1493, 2px 2px 0px #c71585; font-family: "Georgia", serif; font-style: normal; letter-spacing: 2px; }
  body.theme-pink .sub { color: #ffb6c1; }
  body.theme-pink .menu-toggle { border-color: #ff69b4; background: rgba(255, 20, 147, 0.3); border-radius: 20px; }
  body.theme-pink .studio-sec { border-color: #ff69b4; }
  html:has(body.theme-pink) { background-color: #1f0010 !important; }

  /* --- 💎 NEW THEME: CYBER ARCADE PRO (Top Tier) --- */
  body.theme-cyber {
      background-color: #05050a;
      background-image:
          linear-gradient(transparent 29px, rgba(0, 240, 255, 0.03) 29px),
          linear-gradient(90deg, transparent 29px, rgba(0, 240, 255, 0.03) 29px),
          radial-gradient(circle at 50% 0%, #1a0b2e 0%, #05050a 70%);
      background-size: 30px 30px, 30px 30px, 100% 100%;
      color: #e0fbfc;
  }
  body.theme-cyber .btn {
      background: rgba(10, 10, 20, 0.6);
      border: 1px solid #00f0ff;
      color: #00f0ff;
      box-shadow: 0 0 10px rgba(0, 240, 255, 0.2), inset 0 0 5px rgba(0, 240, 255, 0.1);
      border-radius: 6px;
      backdrop-filter: blur(5px);
      text-transform: uppercase;
      letter-spacing: 1.5px;
      font-weight: bold;
  }
  body.theme-cyber .btn:active {
      box-shadow: 0 0 20px rgba(0, 240, 255, 0.7), inset 0 0 10px rgba(0, 240, 255, 0.5);
      background: rgba(0, 240, 255, 0.15);
  }
  body.theme-cyber h1 {
      color: #ffffff;
      text-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 3px 3px 0px #ff003c;
      font-weight: 900;
      letter-spacing: 4px;
      text-transform: uppercase;
  }
  body.theme-cyber .sub { 
      color: #ff003c; 
      text-shadow: 0 0 8px rgba(255, 0, 60, 0.8); 
      letter-spacing: 3px;
  }
  body.theme-cyber .menu-toggle {
      border-color: #ff003c;
      background: rgba(255, 0, 60, 0.1);
      box-shadow: 0 0 12px rgba(255, 0, 60, 0.4);
      color: #ff003c;
  }
  body.theme-cyber .studio-sec {
      border: 1px solid rgba(0, 240, 255, 0.2);
      background: linear-gradient(180deg, rgba(10,10,25,0.85) 0%, rgba(5,5,10,0.95) 100%);
      box-shadow: 0 8px 32px rgba(0, 240, 255, 0.15);
      border-radius: 12px;
      backdrop-filter: blur(10px);
  }
  html:has(body.theme-cyber) { background-color: #05050a !important; }
    /* --- ⚠️ BROWSER DETECTION OVERLAY (FIXED) --- */
  /* This hides by default and only shows if Plato/WebView is detected */
  #plato-overlay { 
      position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
      background: rgba(10, 10, 12, 0.98); 
      z-index: 2147483647; /* 🔒 MAX Z-INDEX: Ensures nothing sits on top */
      display: none; flex-direction: column; align-items: center; justify-content: center; 
      text-align: center; padding: 30px; box-sizing: border-box; 
      backdrop-filter: blur(8px);
      pointer-events: auto; /* 🔒 ANDROID FIX: Captures all clicks */
      touch-action: none;   /* 🔒 ANDROID FIX: Blocks scrolling/gestures */
  }

  /* 🔒 IPHONE FIX: Forces YouTube/Music to vanish completely when restricted */
  body.restricted iframe, 
  body.restricted #yt-player,
  body.restricted .music-section {
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      pointer-events: none !important;
  }
  
  .plato-icon { font-size: 50px; margin-bottom: 20px; animation: bounce 1s infinite; }
  .plato-msg { color: #ff0000; font-family: "Arial Black", sans-serif; font-size: 22px; text-transform: uppercase; margin-bottom: 15px; text-shadow: 0 0 15px rgba(255,0,0,0.6); }
  .plato-desc { color: #eee; font-size: 13px; max-width: 320px; margin-bottom: 30px; line-height: 1.6; font-weight: bold; background: #222; padding: 15px; border-radius: 8px; border: 1px solid #444; }

  /* FIXED BUTTON STYLE: Blue/Teal (Initial State) */
  .plato-btn { 
      background: #004d4d; /* Deep Teal */
      color: #ffffff; 
      padding: 15px 25px; 
      border-radius: 8px; 
      font-weight: 900; 
      border: 2px solid #00ffff; /* Neon Cyan Border */
      font-size: 12px; 
      cursor: pointer; 
      text-transform: uppercase; 
      box-shadow: 0 0 15px rgba(0, 255, 255, 0.15); /* Blue Glow */
      text-decoration: none; 
      display: inline-block; 
      transition: background 0.2s, transform 0.1s;
  }
  .plato-btn:hover { background: #006666; }
  .plato-btn:active { background: #006666; transform: scale(0.95); }

  @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

  /* --- CUSTOM SCROLLBAR --- */
  ::-webkit-scrollbar { width: 12px; }
  ::-webkit-scrollbar-track { background: #0a0a0c; border-left: 1px solid #333; }
  ::-webkit-scrollbar-thumb { background: #333; border-radius: 6px; border: 2px solid #0a0a0c; }
  ::-webkit-scrollbar-thumb:hover { background: #00ffff; }
    /* --- ✨ NEW FEATURE: MAGIC FILTERS MENU CSS --- */
  #filter-wrapper { display: none; flex-direction: column; width: 100%; margin-top: 5px; background: #111; border: 1px solid #333; border-radius: 8px; padding: 10px; box-sizing: border-box; }
  #filter-wrapper.active { display: flex; animation: slideDown 0.3s ease; }

  .filter-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filter-scroll::-webkit-scrollbar { display: none; }
  .filter-btn { 
    flex: 0 0 70px; display: flex; flex-direction: column; align-items: center; gap: 5px;
    background: transparent; border: none; cursor: pointer; opacity: 0.7; transition: 0.2s;
  }
  .filter-btn:hover, .filter-btn.active-filter { opacity: 1; transform: scale(1.05); }
  .filter-btn.active-filter .filter-preview { border-color: #00ffff; box-shadow: 0 0 8px #00ffff; }

  .filter-preview { width: 60px; height: 60px; border-radius: 6px; border: 2px solid #444; object-fit: cover; background: #000; }
  .filter-name { color: #fff; font-size: 9px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }

  @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
  /* --- NAVIGATION BUTTONS --- */
  .menu-toggle { 
    position: fixed; 
    top: 15px; left: 15px;
    height: 38px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 20, 20, 0.6); 
    color: rgba(255, 255, 255, 0.9); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(4px);
    padding: 0 12px; border-radius: 4px; font-weight: bold; cursor: pointer; 
    z-index: 100000; font-size: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); 
    transition: transform 0.1s ease, background 0.2s;
    text-shadow: 0 0 5px rgba(255,255,255,0.2);
  }
  .menu-toggle:active { transform: scale(0.90); background: rgba(255, 255, 255, 0.1); border-color: #fff; }
  /* --- SIDEBAR MENU --- */
  #menu-panel { 
    position: fixed; top: 0; left: -260px; width: 240px; height: 100dvh; 
    /* 🚀 LUXURY GLASS BLACK (Matches Arcade Radio perfectly) */
    background: rgba(5, 5, 8, 0.95); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    padding-top: 60px; 
    /* 🛑 LAG FIX 1: Only transition 'left', preventing the scrollbar from triggering animations! */
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: 99999; display: flex; flex-direction: column; gap: 10px; 
    padding-left: 12px; padding-right: 15px; 
    box-shadow: 2px 0 15px rgba(0,0,0,0.8); 
    box-sizing: border-box; padding-bottom: 80px; 
    overflow-y: auto;
    overscroll-behavior: contain;
    /* 🛑 LAG FIX 2: Hardware acceleration forces the GPU to render the blur, stopping repaint lag */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: left;
    /* 🛑 LAG FIX 3: Enables buttery smooth native momentum scrolling on iOS */
    -webkit-overflow-scrolling: touch;
  }
  #menu-panel.open { left: 0; }

  /* 🚀 THE FIX: Destroys the native iOS white dropdown & styles it black */
  #menu-panel select {
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    outline: none;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    /* Removes native white iOS styling */
    -webkit-appearance: none;
    appearance: none;
    /* Custom white dropdown arrow */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="%23ffffff" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
  }

  :root {
    --ui-accent: #ff0000;
    --ui-glow: rgba(255,0,0,0.5);
  }

 .switch-container { position: relative; width: 100%; }

  /* Shared style for Switch To, Theme, and Font buttons */
  #switch-btn, #theme-btn, #font-btn { 
    background: rgba(255,255,255,0.05); color: white; border: 2px solid var(--ui-accent); 
    padding: 10px; border-radius: 4px; font-weight: bold; cursor: pointer; 
    font-size: 11px; text-transform: uppercase; width: 100%; text-align: center;
    box-shadow: 0 0 10px var(--ui-glow); 
    transition: transform 0.1s ease;
  }
  #switch-btn:active, #theme-btn:active, #font-btn:active { transform: scale(0.95); background: var(--ui-glow); }

  /* Submenus (Switch To, Theme & Font) */
  #switch-menu, #theme-menu, #font-menu { 
    position: absolute; top: 45px; right: 0; 
    /* 🚀 MATCHING LUXURY GLASS BLACK */
    background: rgba(5, 5, 8, 0.95); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ui-accent); border-radius: 8px; width: 210px; 
    display: none; flex-direction: column; overflow: hidden; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.8); z-index: 100001;
  }
  #switch-menu button, #theme-menu button, #font-menu button { 
    background: transparent; color: #aaa; border: none; padding: 14px; 
    text-align: left; font-weight: bold; font-size: 11px; cursor: pointer; 
    border-bottom: 1px solid rgba(255,255,255,0.05); text-transform: uppercase;
    transition: background 0.2s;
  }
  #switch-menu button:active, #theme-menu button:active, #font-menu button:active { background: rgba(255,255,255,0.1); }
  /* Active Link Styles */
  #switch-menu button.active-link, #theme-menu button.active-link, #font-menu button.active-link { 
      color: #00ffff; background: rgba(0,255,255,0.1); border-left: 3px solid #00ffff; 
  }
  /* --- ✨ PREMIUM 2026 CREATOR BADGE --- */
  .designed-by { 
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px 0 20px 0; 
    text-align: center; font-size: 10px; font-weight: 900; color: #555; 
    background: linear-gradient(to top, rgba(0,0,0,1) 40%, rgba(0,0,0,0)); 
    border-top: none; letter-spacing: 2px; z-index: 10;
    pointer-events: none;
  }
  .designed-by b { 
    font-size: 13px; letter-spacing: 4px; margin-left: 4px;
    background: linear-gradient(90deg, #00f3ff, #bc13fe, #ff0055, #00f3ff);
    background-size: 300% auto;
    color: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: creatorGlow 4s linear infinite;
    filter: drop-shadow(0 0 6px rgba(188, 19, 254, 0.6));
  }
  @keyframes creatorGlow { 0% { background-position: 0% center; } 100% { background-position: 300% center; } }
  .music-section { border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }

  /* --- 🎧 2026 CUSTOM MUSIC PLAYER UI --- */
  #cmp-wrapper { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 5, 8, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 999999; flex-direction: column; padding: 20px; box-sizing: border-box; overflow-y: auto; touch-action: pan-y; }
  /* 🚀 THE FIX: Removed 'position: sticky' so it scrolls away naturally */
  .cmp-header { position: relative; z-index: 10; display: flex; justify-content: center; margin-bottom: 20px; padding-top: 10px; min-height: 50px; }
  .cmp-header-inner { background: rgba(0,0,0,0.8); border: 1px solid #333; padding: 10px 20px; border-radius: 30px; display: flex; align-items: center; justify-content: center; gap: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); backdrop-filter: blur(10px); white-space: nowrap; height: fit-content; max-height: 50px; }
  .cmp-title { color: #fff; font-family: 'Courier New', monospace; font-weight: 800; font-size: 16px; letter-spacing: 1px; margin: 0; white-space: nowrap; line-height: 1; }
  .cmp-close { background: transparent; border: 1px solid var(--ui-accent, #ff0055); color: var(--ui-accent, #ff0055); font-weight: bold; padding: 6px 14px; border-radius: 15px; font-size: 12px; cursor: pointer; transition: 0.2s; white-space: nowrap; line-height: 1; height: fit-content; display: flex; align-items: center; justify-content: center; }
  .cmp-close:active { transform: scale(0.9); }
  .cmp-grid { display: flex; flex-direction: column; gap: 12px; max-width: 600px; margin: 0 auto; width: 100%; padding-bottom: 100px; }
  /* 🎵 The Song Card */
  .song-card { position: relative; background: #111; border-radius: 12px; padding: 15px 20px; display: flex; align-items: center; gap: 15px; cursor: pointer; border: 1px solid #222; overflow: hidden; transition: transform 0.1s ease, background 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
  .song-card:active { transform: scale(0.97); }
  .song-card:hover { background: #1a1a1c; }

  /* ⚡ LED Border Magic (Hidden until active) */
  .song-card::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(transparent, transparent, transparent, var(--ui-accent, #00ffff), transparent); animation: rotateLed 2s linear infinite; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
  .song-card::after { content: ''; position: absolute; inset: 2px; background: #0a0a0c; border-radius: 10px; z-index: 1; pointer-events: none; }

  /* 🔥 2026 ULTRA-PREMIUM AMBIENT BEAT SYNC */
  .song-card.active { 
    border-color: transparent; 
    /* Soft, luxurious ambient glow */
    box-shadow: 0 0 calc(10px + (var(--beat-glow, 0) * 15px)) var(--ui-glow, rgba(0,255,255,0.3)); 
    /* Very subtle, professional pulse driven 100% by JS */
    transform: scale(var(--beat-scale, 1.01)); 
    transition: background 0.3s ease; 
  }
  .song-card.active::before { 
    opacity: 1; 
    /* Slow, elegant ambient rotation (No more dizzy spinning) */
    animation: rotateLed var(--beat-speed, 4s) linear infinite; 
  }
  .song-card.active .sc-icon { 
    color: var(--ui-accent, #00ffff); 
    text-shadow: 0 0 calc(8px + (var(--beat-glow, 0) * 12px)) var(--ui-glow, rgba(0,255,255,0.8)); 
    font-size: 18px; 
    transform: scale(var(--beat-scale, 1));
  }
  .song-card.active .sc-title { color: #fff; font-weight: 900; letter-spacing: 1px; }

  /* Content inside the card */
  .sc-content { position: relative; z-index: 2; display: flex; align-items: center; gap: 15px; width: 100%; }
  .sc-icon { font-size: 14px; color: #555; min-width: 24px; text-align: center; }
  .sc-info { display: flex; flex-direction: column; gap: 4px; flex-grow: 1; overflow: hidden; }
  .sc-title { color: #ccc; font-size: 14px; font-weight: bold; font-family: sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.5px; transition: 0.3s; }
  .sc-artist { color: #666; font-size: 10px; text-transform: uppercase; font-weight: 800; letter-spacing: 1px; }

  /* 🚀 LED Speed Keyframes */
  @keyframes rotateLed { 100% { transform: rotate(360deg); } }
  .lnk { 
    display: flex; align-items: center; gap: 10px; padding: 12px; 
    text-decoration: none; color: white; font-size: 13px; font-weight: bold; 
    border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); 
    background: rgba(255,255,255,0.05); 
    transition: transform 0.1s ease;
  }
  .lnk:active { transform: scale(0.96); background: rgba(255,255,255,0.1); }
  .lnk svg { width: 18px; height: 18px; fill: white; }

  /* HEADERS */
#main-logo {
    width: 80px; /* Change this number to make the logo bigger or smaller */
    height: auto;
    margin-top: 20px; /* Pushes it down below the menu button */
    margin-bottom: -50px; /* Pulls the ARCADE text up closer to the logo */
    position: relative;
    z-index: 10;
    animation: arcadeBounce 1.8s infinite ease-in-out; /* Gives it the same floating animation as the text! */
}
  h1 { color: #fff; margin: 60px 0 0 0; font-family: "Arial Black", sans-serif; font-style: italic; font-size: 36px; text-transform: uppercase; letter-spacing: -1px; text-shadow: 2px 2px 0px #ff0000, -1px -1px 10px rgba(255, 0, 0, 0.8); animation: arcadeBounce 1.8s infinite ease-in-out; }
  @keyframes arcadeBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  .sub { color: #fff; font-weight: bold; margin: 2px 0 15px 0; text-transform: uppercase; font-size: 11px; letter-spacing: 2px; text-align: center; }
  /* --- LAYOUT LOGIC --- */
  .studio-sec { display: none; width: 320px; flex-direction: column; align-items: center; }
  .active-sec { display: flex; }

  @media (min-width: 1024px) {
    body { justify-content: flex-start; padding-top: 40px; }
    .studio-sec { width: 90%; max-width: 1100px; flex-direction: row; align-items: flex-start; justify-content: center; gap: 60px; }
    #frame-studio, #gif-studio { align-items: center; }
    .ui, .ui-gif { width: 350px; margin-top: 0; }
    #font-studio { flex-direction: column; align-items: center; }
    #font-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; max-height: 70vh; overflow-y: scroll; padding-right: 10px; }
    .font-input { width: 50%; }
    #sym-studio { flex-direction: column; align-items: center; }
    .sym-box-container { width: 50%; }
    #sym-container { max-height: 70vh; overflow-y: scroll; padding-right: 10px; width: 100%; }
    .sym-btn { flex: 1 0 50px; }
  }
 /* --- 🖼️ FRAME STUDIO CSS --- */
  #box.full-photo { border-radius: 8px; border: none; box-shadow: 0 0 0 2px #555; background: #000; }
  #box { position: relative; width: 310px; height: 310px; border-radius: 50%; overflow: hidden; border: 3px solid var(--ui-accent); box-sizing: border-box; background: transparent; z-index: 10; flex-shrink: 0; }

  /* 🛠️ TOUCH FIX: 'touch-action: none' enables 1-finger dragging on the canvas */
  canvas#c { position: absolute; top: 50%; left: 50%; width: 310px; height: 310px; transform: translate(-50%, -50%); z-index: 15; touch-action: none; }

  #frame-btn-group { display: flex; flex-direction: column; gap: 6px; width: 100%; }
  #ui-toggle-btn { margin-bottom: 6px; }

  .ui { margin-top: 20px; width: 310px; display: flex; flex-direction: column; gap: 6px; background: transparent; }

  .btn { 
    background: #000; border: 2px solid #fff; color: white; padding: 12px; 
    text-align: center; border-radius: 8px; font-weight: 900; 
    display: block; font-size: 12px; cursor: pointer; 
    text-transform: uppercase; width: 100%; box-sizing: border-box; 
    transition: transform 0.1s ease, border-color 0.2s, background 0.2s, box-shadow 0.2s;
  }
  .btn:active { transform: scale(0.95); opacity: 0.8; }
  .btn:disabled { opacity: 0.3; cursor: not-allowed; border-color: #555; color: #555; transform: none; }
  .btn-r { border-color: #ff0000; }
  .lbl { font-size: 9px; color: #888; text-transform: uppercase; margin-top: 2px; display: flex; justify-content: space-between; align-items: center; width: 100%; }
  .val-tag { color: #ff0000; font-weight: bold; font-family: monospace; font-size: 10px; }

/* --- 🛑 SLIDER FIX (NO JUMP + SCROLL SAFETY + FIREFOX FIX) --- */
  input[type=range] { 
      -webkit-appearance: none;
      appearance: none; /* 🔥 Required for Firefox */
      width: 100%; 
      background: transparent; 
      margin: 10px 0; 
      cursor: pointer; 
      touch-action: pan-y; 
      pointer-events: none; 
  }
  /* CHROME / SAFARI / EDGE */
  input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; background: linear-gradient(to right, #ff0000 var(--v, 0%), #00ffff var(--v, 0%)); border-radius: 4px; }
  input[type=range]::-webkit-slider-thumb { 
      -webkit-appearance: none; 
      height: 20px; width: 20px; border-radius: 50%; background: #ff0000; margin-top: -6px; border: 2px solid #ffffff; box-shadow: 0 0 10px #ff0000; pointer-events: auto; 
  }
  /* 🔥 MOZILLA FIREFOX */
  input[type=range]::-moz-range-track { width: 100%; height: 8px; background: linear-gradient(to right, #ff0000 var(--v, 0%), #00ffff var(--v, 0%)); border-radius: 4px; }
  input[type=range]::-moz-range-thumb {
      appearance: none; height: 20px; width: 20px; border-radius: 50%; background: #ff0000; border: 2px solid #ffffff; box-shadow: 0 0 10px #ff0000; pointer-events: auto; border-color: #ffffff;
  }
  /* --- 🎨 PALETTE CSS --- */
  #palette-wrapper { display: none; flex-direction: column; width: 100%; margin-top: 5px; background: #000; border: 1px solid #333; border-radius: 8px; padding: 8px; box-sizing: border-box; }
  #palette-wrapper.active { display: flex; }

  .cat-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 5px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cat-scroll::-webkit-scrollbar { display: none; }

  .cat-btn { 
    flex: 0 0 auto; padding: 8px 12px; background: #1a1a1c; 
    border: 1px solid #444; border-radius: 20px; 
    font-size: 10px; font-weight: bold; cursor: pointer; color: #aaa; 
    transition: 0.2s ease; display: flex; align-items: center; gap: 5px;
  }
  .cat-btn:hover { background: #333; }
  .cat-btn.active-cat { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.3); }

  .color-grid-container { display: none; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 6px; max-height: 220px; overflow-y: auto; padding-top: 5px; }
  .color-grid-container.show { display: grid; animation: fadeIn 0.2s ease; }

  .c-sq { height: 32px; border-radius: 6px; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); position: relative; box-sizing: border-box; }
  .c-sq:active { transform: scale(0.9); border-color: #fff; }
  .c-sq.is-metal { border: 1px solid #fff; }

  @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

  /* --- ✍️ FONT STUDIO CSS --- */
  .font-input { width: 100%; background: #111; border: 2px solid #00ffff; color: #fff; padding: 15px; border-radius: 8px; font-weight: bold; text-align: center; margin-bottom: 15px; font-size: 16px; outline: none; box-sizing: border-box; }
  .font-scroll { width: 100%; max-height: 45vh; padding-bottom: 10px; overflow-y: auto; display: flex; flex-direction: column; border-radius: 8px; overflow-x: hidden; border: 1px solid rgba(255,255,255,0.1); box-sizing: border-box; touch-action: pan-y; }
  .font-item { background: #1a1a1c; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 16px; width: 100%; text-align: center; cursor: pointer; color: #eee; font-size: 16px; white-space: pre-wrap; transition: transform 0.05s ease; }
  .font-item:active { transform: scale(0.98); background: #333; color: #fff; }
  /* --- ✨ SYMBOLS STUDIO CSS --- */
  .sym-box-container { width: 100%; margin-bottom: 15px; }
  .sym-input { width: 100%; background: #000; border: 1px solid #00ffff; color: #00ffff; padding: 12px; font-size: 18px; border-radius: 6px; text-align: center; box-sizing: border-box; outline: none; }
  .sym-input:focus { border-color: #ff00ff; box-shadow: 0 0 10px rgba(255,0,255,0.5); }
  .cat-title { width: 100%; color: #ff0000; font-size: 12px; font-weight: bold; margin: 20px 0 5px 0; text-transform: uppercase; padding-left: 5px; border-bottom: 1px solid rgba(255,0,0,0.2); padding-bottom: 5px; }
  .sym-grid { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; padding: 5px; box-sizing: border-box; }
  .sym-btn { background: #1a1a1c; border: 1px solid #333; color: white; padding: 15px 0; font-size: 20px; border-radius: 6px; cursor: pointer; text-align: center; flex: 1 0 18%; min-width: 50px; transition: transform 0.05s ease; }
  .sym-btn:active { transform: scale(0.90); background: #ff0000; color: #000; }

  /* --- ⚡ GIF STUDIO CSS --- */
  @keyframes rotate { 100% { transform: rotate(360deg); } }

  /* 🛠️ TOUCH FIX: 'touch-action: none' enables dragging for the GIF studio */
  .stage { position: relative; width: 320px; height: 320px; display: flex; align-items: center; justify-content: center; margin-bottom: 30px; touch-action: none; flex-shrink: 0; }

/* 🛑 ANIMATION REMOVED: Saves massive GPU power */
  .led-ring { position: absolute; inset: -15px; border-radius: 50%; background: conic-gradient(from 0deg, #00f3ff, #bc13fe, #ff0055, #00f3ff); filter: blur(20px); z-index: 1; pointer-events: none; }
  /* 🛠️ TOUCH FIX applied here too */
  .viewport { position: relative; z-index: 5; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background-color: #000; display: flex; justify-content: center; align-items: center; box-shadow: inset 0 0 20px #000; touch-action: none; }

  #v { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; will-change: transform; }
  #o { width: 100%; height: 100%; object-fit: contain; display: none; }

  /* --- ⚡ GIF STUDIO CSS --- */
  .ui-gif { margin-top: 20px; width: 310px; display: flex; flex-direction: column; background: transparent; margin-bottom: 20px; z-index: 10; }
  .status { margin-top: 10px; margin-bottom: 10px; font-size: 14px; text-align: center; color: #00f3ff; font-weight: 600; opacity: 0; transition: 0.3s; height: 20px; }
  .status.active { opacity: 1; }

  /* --- ⚡ GIF STUDIO SLIDERS (100% MATCH ARCADE STUDIO) --- */
  .ui-gif input[type="range"], #trim-modal input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      background: transparent;
      margin: 10px 0 20px 0;
      cursor: pointer;
      touch-action: pan-y;
      pointer-events: none;
  }
  /* CHROME / SAFARI / EDGE */
  .ui-gif input[type="range"]::-webkit-slider-runnable-track, #trim-modal input[type="range"]::-webkit-slider-runnable-track { width: 100%; height: 8px; background: linear-gradient(to right, #00f3ff var(--v, 0%), #333 var(--v, 0%)); border-radius: 4px; }
  .ui-gif input[type="range"]::-webkit-slider-thumb, #trim-modal input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; background: #00f3ff; margin-top: -6px; border: 2px solid #ffffff; box-shadow: 0 0 10px #00f3ff; pointer-events: auto; }
  /* 🔥 MOZILLA FIREFOX */
  .ui-gif input[type="range"]::-moz-range-track, #trim-modal input[type="range"]::-moz-range-track { width: 100%; height: 8px; background: linear-gradient(to right, #00f3ff var(--v, 0%), #333 var(--v, 0%)); border-radius: 4px; }
  .ui-gif input[type="range"]::-moz-range-thumb, #trim-modal input[type="range"]::-moz-range-thumb { appearance: none; height: 20px; width: 20px; border-radius: 50%; background: #00f3ff; border: 2px solid #ffffff; box-shadow: 0 0 10px #00f3ff; pointer-events: auto; border-color: #ffffff; }
  .ui-gif input[type="range"]:disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

/* 🚀 RESTORED: Pure 2D Rotation (Fixes the mobile vanishing bug) */
@keyframes rotateNeonBtn { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

.neon-wrap { 
    position: relative; 
    width: 100%; 
    margin-top: 15px; 
    padding: 3px; 
    border-radius: 50px; 
    overflow: hidden; 
    box-sizing: border-box; 
    display: inline-block; 
    box-shadow: 0 0 15px rgba(0,0,0,0.5); 
    /* 🔒 HARDWARE LOCK FIX: Isolation and Mask Image forces mobile GPUs to keep the neon visible */
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}
 
.neon-wrap::before { 
    content: ''; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    width: 400px; 
    height: 400px; 
    margin-top: -200px; 
    margin-left: -200px; 
    z-index: -1; 
    pointer-events: none; 
    /* ✨ RESTORED: Smooth rotation */
    animation: rotateNeonBtn 4s linear infinite;
}
  .neon-wrap.blue::before { background: conic-gradient(transparent, transparent, #00f3ff, #bc13fe, #ff0055, #00f3ff, transparent, transparent); }
  .neon-wrap.red { margin-top: 20px; }
  .neon-wrap.red::before { background: conic-gradient(transparent, transparent, #ff0000, #ff5500, transparent, transparent); }

  .btn-inner { position: relative; z-index: 10; display: block; width: 100%; background: #000; color: white; padding: 15px 0; border-radius: 46px; font-weight: 900; font-size: 14px; text-align: center; text-decoration: none; border: none; cursor: pointer; box-sizing: border-box; pointer-events: auto; text-transform: uppercase; transition: transform 0.1s ease, background 0.1s; }
  .btn-inner:active { transform: scale(0.95); background: #111; }
  .btn-inner:disabled { opacity: 0.5; color: #555; cursor: not-allowed; transform: none; }

  input[type=file], #yt-player { display: none; }

#sym-container {
    max-height: 35vh !important; 
    padding-bottom: 10px !important; 
}
/* --- TMATRIX THEME --- */
body.theme-matrix {
    background-color: #0a0a0c !important; 
    background-image: none !important;
}

body.theme-matrix::before {
    content: "";
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; /* 🔒 Locks height so the address bar can't stretch it */
    z-index: -1; 
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    pointer-events: none;
    background-image: url('../bg-matrix.jpg') !important;
}
/* --- METAL, BLIZZARD, & NEW IMAGE THEMES --- */
body.theme-metal, body.theme-blizzard, body.theme-circuit, body.theme-ufo, body.theme-hexa, body.theme-prettypink {
    background-color: #0a0a0c !important; 
    background-image: none !important;
}

body.theme-metal::before, body.theme-blizzard::before, body.theme-circuit::before, body.theme-ufo::before, body.theme-hexa::before, body.theme-prettypink::before {
    content: "";
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; /* 🔒 Locks height against address bar jumping */
    z-index: -1; 
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    pointer-events: none;
}

body.theme-metal::before {
    background-image: url('../bg-metal.jpg') !important;
}

body.theme-blizzard::before {
    background-image: url('../bg-blizzard.jpg') !important;
}

body.theme-circuit::before {
    background-image: url('../bg-circuit.jpg') !important;
}

body.theme-ufo::before {
    background-image: url('../bg-ufo.jpg') !important;
}

body.theme-hexa::before {
    background-image: url('../bg-hexa.jpg') !important;
}

body.theme-prettypink::before {
    background-image: url('../bg-prettypink.jpg') !important;
}
/* =========================================
   RETRO OVERLAYS (VIGNETTE & SCANLINES)
   ========================================= */
.frame-container {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.cinematic-vignette::before {
  content: "";
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; 
  z-index: 20; /* 🔥 BUMPED THIS UP TO 20 */
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.8);
}

.retro-scanlines::after {
  content: "";
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; 
  z-index: 21; 
  /* 🚀 NEXT LEVEL CRT: RGB Phosphors + Sharp Scanlines */
  background: 
    linear-gradient(90deg, rgba(255, 0, 0, 0.08), rgba(0, 255, 0, 0.04), rgba(0, 0, 255, 0.08)),
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
  background-size: 3px 100%, 100% 4px;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.7); /* Curved tube shadow */
  animation: crt-flicker 0.15s infinite; /* Electric pulse */
}

@keyframes crt-flicker {
  0% { opacity: 0.85; }
  50% { opacity: 0.95; }
  100% { opacity: 0.9; }
}
/* 🚀 THE ULTIMATE NEON/VIDEO RENDERING FIX (NO UGLY SQUARE) */

/* Forces the phone to give the text its own permanent memory slot so it never vanishes */
.btn, button, h1, h2, h3, span, #studio-name, #studio-sub, .status {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Ensure the wrapper doesn't jump or glitch */
.neon-wrap {
     -webkit-transform: translateZ(0);
     transform: translateZ(0);
}

/* --- ✨ ARCADE CHATBOT STYLES ✨ --- */
#arcade-chat-fab {
    position: fixed; bottom: 20px; right: 20px; width: 55px; height: 55px;
    background: #000; border: 2px solid #00ffff; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: #00ffff; cursor: pointer; z-index: 99990;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
    transition: transform 0.2s ease, background 0.2s ease;
}
#arcade-chat-fab:active { transform: scale(0.9); }
#arcade-chat-fab:hover { background: rgba(0, 255, 255, 0.1); }

#arcade-chat-window {
    position: fixed; bottom: 85px; right: 20px; width: 320px; height: 450px;
    max-height: 70vh; background: rgba(10, 10, 12, 0.95);
    border: 1px solid #333; border-radius: 12px; z-index: 99990;
    display: none; flex-direction: column; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    font-family: sans-serif;
    animation: slideUpChat 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideUpChat { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.chat-header {
    background: #000; border-bottom: 1px solid #333; padding: 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.chat-close {
    background: transparent; color: #888; border: none; font-size: 16px; cursor: pointer; transition: 0.2s;
}
.chat-close:hover { color: #ff0055; }

#chat-messages {
    flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.chat-bubble {
    max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.4; word-wrap: break-word;
}
.bot-bubble {
    background: #1a1a1c; color: #eee; border: 1px solid #333; align-self: flex-start; border-bottom-left-radius: 2px;
}
.user-bubble {
    background: #004d4d; color: #fff; border: 1px solid #00ffff; align-self: flex-end; border-bottom-right-radius: 2px;
}

.chat-input-area {
    display: flex; padding: 10px; background: #000; border-top: 1px solid #333;
}
#chat-input {
    flex: 1; background: #111; border: 1px solid #444; color: #fff; padding: 10px; border-radius: 6px; outline: none; font-size: 13px;
}
#chat-input:focus { border-color: #00ffff; }
#chat-send-btn {
    background: #00ffff; color: #000; border: none; padding: 0 15px; margin-left: 8px; border-radius: 6px; font-weight: 900; cursor: pointer; font-size: 12px;
}
#chat-send-btn:active { transform: scale(0.95); }

/* Mobile Adjustments */
@media (max-width: 400px) {
    #arcade-chat-window {
        width: calc(100% - 40px); bottom: 85px; right: 20px;
    }
}
/* --- 📱 MOBILE FAKE BEAT-SYNC (Zero Battery Drain) --- */
body.is-mobile .song-card.active {
    /* Mimics a standard dance track heartbeat */
    animation: mobileHeartbeat 1s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
    border-color: transparent;
}

body.is-mobile .song-card.active::before {
    opacity: 1;
    animation: rotateLed 4s linear infinite; /* Keeps the smooth, elegant spin */
}

body.is-mobile .song-card.active .sc-icon {
    color: var(--ui-accent, #00ffff);
    text-shadow: 0 0 15px var(--ui-glow, rgba(0,255,255,0.8));
    animation: mobileIconPulse 1s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* The actual heartbeat keyframes */
@keyframes mobileHeartbeat {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px var(--ui-glow, rgba(0,255,255,0.3)); }
    15% { transform: scale(1.02); box-shadow: 0 0 25px var(--ui-glow, rgba(0,255,255,0.8)); }
    30% { transform: scale(1.01); box-shadow: 0 0 15px var(--ui-glow, rgba(0,255,255,0.5)); }
}

@keyframes mobileIconPulse {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
}

/* 🛑 SURGICAL SELECTION BLOCKER: Only targets the Main Menu & Buttons */
.ui, 
.ui-gif,
#menu-panel, 
.menu-toggle,
h1, 
.sub, 
#main-logo, 
.btn, 
.cat-btn, 
.filter-btn,
.switch-container,
.music-section,
.lbl,
.val-tag {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}
/* =========================================
   🏎️ NEW THEME: OUTRUN 198X (ULTRA PREMIUM)
   ========================================= */
body.theme-outrun {
  background-color: #0b0014;
  background-image: linear-gradient(0deg, #240036 0%, #0b0014 60%);
  color: #00ffff;
  overflow-x: hidden;
}

/* The Glowing Synthwave Sun */
body.theme-outrun::before {
  content: ""; position: fixed; top: 15%; left: 50%; transform: translateX(-50%);
  width: 280px; height: 280px;
  background: linear-gradient(180deg, #ff0055 0%, #ffea00 100%);
  border-radius: 50%; box-shadow: 0 0 80px rgba(255, 0, 85, 0.8);
  z-index: -2; pointer-events: none;
  -webkit-mask-image: repeating-linear-gradient(to bottom, black 0%, black 4%, transparent 4%, transparent 5%);
  mask-image: repeating-linear-gradient(to bottom, black 0%, black 4%, transparent 4%, transparent 5%);
}

/* The Moving 3D Neon Grid */
body.theme-outrun::after {
  content: ""; position: fixed; bottom: 0; left: -50%; width: 200%; height: 45vh;
  background-image: 
    linear-gradient(to top, rgba(0, 255, 255, 0.9) 2px, transparent 2px),
    linear-gradient(to right, rgba(0, 255, 255, 0.9) 2px, transparent 2px);
  background-size: 100% 40px, 40px 100%;
  -webkit-transform: perspective(400px) rotateX(60deg) translateY(100px);
  transform: perspective(400px) rotateX(60deg) translateY(100px);
  animation: outrunGrid 1.5s linear infinite; z-index: -1; pointer-events: none;
  box-shadow: inset 0 50px 100px #0b0014; 
}
@keyframes outrunGrid {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 40px, 0 0; }
}

/* Outrun Studio Elements */
body.theme-outrun h1 {
  background: -webkit-linear-gradient(#00ffff, #ff00ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0px 4px 15px rgba(255,0,255,0.6);
}
body.theme-outrun .studio-sec {
  background: rgba(10, 0, 20, 0.85); border: 2px solid #ff00ff;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.15); backdrop-filter: blur(12px); border-radius: 8px;
}
html:has(body.theme-outrun) { background-color: #0b0014 !important; }


/* =========================================
   📱 MASTER LAYOUT & STABILITY FIXES
   ========================================= */

/* 1. LOCK HORIZONTAL SCROLLING (Kills the screen wobble) */
html, body { overflow-x: hidden !important; width: 100%; max-width: 100vw; }

/* 2. DOWNLOAD BUTTON SPACING */
#save { margin-top: 30px !important; margin-bottom: 30px !important; }

/* 3. HARDWARE ACCELERATION FOR CONTAINERS ONLY */
#menu-panel, .studio-sec {
  -webkit-transform: translateZ(0); transform: translateZ(0);
}


/* =========================================
   🛑 ANTI-GHOSTING ENGINE (NO NESTED 3D)
   ========================================= */

/* Strip all 3D transforms from children to prevent Android Chrome rendering glitches */
.btn, button, .lnk, .music-player-container {
  -webkit-transform: none; transform: none;
  -webkit-backface-visibility: visible !important; backface-visibility: visible !important;
  -webkit-transform-style: flat !important; transform-style: flat !important;
  /* Force physical rendering priority */
  position: relative;
  z-index: 1; 
  transition: all 0.2s ease;
}

/* 2D Click Shrink (Safe) */
.btn:active, button:active, .lnk:active {
  -webkit-transform: scale(0.95); transform: scale(0.95);
}


/* =========================================
   🏎️ OUTRUN THEME BUTTON OVERRIDES
   ========================================= */

body.theme-outrun .btn, 
body.theme-outrun button,
body.theme-outrun .menu-toggle {
  background: rgba(20, 0, 40, 0.8); border: 2px solid #00ffff; color: #ff00ff;
  text-transform: uppercase; font-weight: 900; letter-spacing: 2px;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4), inset 0 0 10px rgba(255, 0, 255, 0.4);
  border-radius: 0px; 
  /* PURE 2D SKEW ONLY. NO translateZ() HERE. */
  -webkit-transform: skewX(-8deg) !important;
  transform: skewX(-8deg) !important;
}

body.theme-outrun .btn:active, 
body.theme-outrun button:active,
body.theme-outrun .menu-toggle:active {
  background: rgba(255, 0, 255, 0.2); box-shadow: 0 0 25px rgba(255, 0, 255, 0.8);
  -webkit-transform: skewX(-8deg) scale(0.95) !important;
  transform: skewX(-8deg) scale(0.95) !important;
}

body.theme-outrun .btn:disabled, 
body.theme-outrun button:disabled {
  opacity: 0.3 !important;
  -webkit-transform: skewX(-8deg) !important;
  transform: skewX(-8deg) !important;
}
/* --- OUTRUN MENU BUTTON SPACING FIX --- */
#th-outrun {
    margin-top: 12px !important;
}

/* =========================================
   🗑️ JS CLEANUP: GALLERY & DELETE MODAL
   ========================================= */

/* Gallery UI Classes */
.arcade-gallery-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 16, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 9999; flex-direction: column; padding: 20px; box-sizing: border-box;
    overflow-y: auto; transition: opacity 0.3s ease;
}
.gallery-header-sticky { display: flex; justify-content: center; align-items: center; margin-bottom: 25px; position: sticky; top: 0; z-index: 10; }
.gallery-header-inner {
    background: rgba(0,0,0,0.6); padding: 10px 20px; border-radius: 30px; border: 1px solid #333;
    backdrop-filter: blur(5px); display: flex; align-items: center; gap: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.gallery-title { color: #fff; font-family: 'Courier New', monospace; font-weight: 800; margin: 0; letter-spacing: 1px; font-size: 18px; }
.gallery-close-btn { background: none; border: 1px solid #ff0055; color: #ff0055; font-weight: bold; padding: 5px 12px; border-radius: 15px; font-size: 12px; cursor: pointer; transition: 0.2s; }
.gallery-grid-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding-bottom: 80px; max-width: 600px; margin: 0 auto; width: 100%; }
.gallery-empty-msg { color: #666; text-align: center; margin-top: 100px; display: none; font-family: monospace; letter-spacing: 1px; }
.gallery-empty-icon { font-size: 40px; margin-bottom: 10px; opacity: 0.5; }

/* Delete Modal UI Classes */
.arcade-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 100000; justify-content: center; align-items: center;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.arcade-modal-box {
    background: #0d0d0f; /* Slightly lighter so it is visible against the studio bg */
    border: 2px solid #ff0000; 
    padding: 30px 25px; 
    border-radius: 20px;
    width: 280px; 
    text-align: center; 
    box-shadow: 0 0 40px rgba(255,0,0,0.6);
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block; /* Fixes vertical stretching */
    box-sizing: border-box;
}
.arcade-modal-icon { font-size: 50px; margin-bottom: 15px; text-shadow: 0 0 20px rgba(255,0,0,0.5); line-height: 1; }
.arcade-modal-title { color: #fff; font-family: 'Courier New', monospace; margin: 0 0 10px 0; text-transform: uppercase; font-weight: 900; letter-spacing: 1px; font-size: 20px; white-space: nowrap; }
.arcade-modal-desc { color: #888; font-size: 12px; margin-bottom: 25px; font-weight: bold; font-family: sans-serif; line-height: 1.4; }
.arcade-modal-btn-group { display: flex; gap: 10px; justify-content: center; width: 100%; align-items: center; }
.arcade-btn-cancel { background: #222; color: #aaa; border: 1px solid #444; padding: 0; height: 45px; border-radius: 8px; font-weight: bold; cursor: pointer; flex: 1; font-size: 12px; display: flex; justify-content: center; align-items: center; }
.arcade-btn-delete { background: #ff0000; color: #fff; border: none; padding: 0; height: 45px; border-radius: 8px; font-weight: bold; cursor: pointer; box-shadow: 0 0 15px #ff0000; flex: 1; font-size: 12px; display: flex; justify-content: center; align-items: center; }

@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

</style>
