/* style.css — FEEDBREAKER NEON CYBER-RITUAL THEME */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;
  --font-asian: 'Noto Sans JP', 'Shippori Mincho', system-ui, sans-serif;
  --neon-h: 152;
  --neon-s: 85%;
  --neon-l: 48%;
  --neon: hsl(var(--neon-h), var(--neon-s), var(--neon-l));
  --neon-bright: hsl(152, 100%, 50%);
  --neon-dim: hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.12);
  --neon-glow: hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.25);
  --glass-bg: rgba(10, 10, 15, 0.85);
  --glass-bg-strong: rgba(10, 10, 15, 0.92);
  --glass-bg-intense: rgba(10, 10, 15, 0.96);
  --surface-raised: rgba(10, 10, 18, 0.7);
  --text-body: #c8c8d0;
  --text-dim: #8888a0;
  --text-muted: #666680;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

body {
  font-family: var(--font-primary);
  background: transparent;
  color: #e0e0e0;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background color layer between video and content */
#bg-layer {
  position: fixed; inset: 0; z-index: -2;
  background: color-mix(in srgb, var(--bg, #0a0a0f) 70%, transparent);
  transition: background 0.4s ease;
}

/* Theme-specific font overrides */
body.theme-classic-manga,
body.theme-watercolor   { --font-heading: 'Shippori Mincho', serif; --font-primary: var(--font-asian); }
body.theme-webtoon      { --font-heading: 'Noto Sans JP', sans-serif; --font-primary: var(--font-asian); }
body.theme-neon-cyber,
body.theme-fractalseed,
body.theme-cyberglitch  { --font-heading: 'Press Start 2P', monospace; }
body.theme-gothic       { --font-heading: 'Creepster', cursive; }
body.theme-cinematic    { --font-heading: 'Inter', sans-serif; font-weight: 700; }
body.theme-minimal      { --font-primary: system-ui, -apple-system, sans-serif; font-weight: 400; letter-spacing: -0.01em; }
body.theme-retro        { --font-heading: 'Bangers', cursive; }
body.theme-neon-noir    { --font-heading: 'Inter', sans-serif; font-weight: 700; letter-spacing: 0.02em; }

/* Global text polish */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 900; letter-spacing: -0.025em; }
button, .glass-btn, .ftool-label { font-family: var(--font-primary); font-weight: 600; letter-spacing: 0.4px; }

/* Glass morphism — layered depth */
.glass-section {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.08);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.15);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.06);
}

.glass-intense {
  background: var(--glass-bg-intense);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.04);
}

/* Phase 0 — Premium Consistent Glassmorphism */
/* Ultimate Premium Glassmorphism — Elon-Worthy */
/* Phase 0A — Premium Consistent Glassmorphism */
.glass-btn {
  background: rgba(10, 10, 15, 0.88);
  border: 1px solid rgba(0, 255, 159, 0.5);
  backdrop-filter: blur(24px);
  color: #00ff9f;
  border-radius: 16px;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 6px 24px rgba(0, 255, 159, 0.22),
              inset 0 1px 0 rgba(255,255,255,0.15);
}

.glass-btn:hover {
  background: rgba(0, 255, 159, 0.15);
  border-color: #00ff9f;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 255, 159, 0.4);
}

.glass-btn:active {
  transform: scale(0.95);
  filter: brightness(1.2);
}

.glass-panel {
  background: rgba(10, 10, 15, 0.92);
  border: 1px solid rgba(0, 255, 159, 0.4);
  backdrop-filter: blur(24px);
  box-shadow: 0 12px 48px rgba(0, 255, 159, 0.3);
}

.glass-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}

.glass-btn.active {
  background: hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.2);
  border-color: var(--neon-bright, #00FF9F);
  box-shadow: 0 0 16px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.3),
              inset 0 0 8px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.06);
}

.glass-btn:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 2px;
}

/* Size variants */
.glass-btn-sm { padding: 0.3rem 0.65rem; font-size: 0.7rem; border-radius: 8px; gap: 4px; }
.glass-btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; border-radius: 12px; gap: 8px; }
.glass-btn-icon { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 1rem; border-radius: 10px; flex-shrink: 0; }
.glass-btn-block { width: 100%; justify-content: center; }

/* Color variants */
.glass-btn-danger {
  border-color: hsla(336, 100%, 50%, 0.4) !important;
  color: #FF00AA !important;
}
.glass-btn-danger:hover {
  background: hsla(336, 100%, 50%, 0.15) !important;
  box-shadow: 0 6px 24px hsla(336, 100%, 50%, 0.3) !important;
  border-color: #FF00AA !important;
}

.glass-btn-warning {
  border-color: hsla(51, 100%, 50%, 0.4) !important;
  color: #FFD700 !important;
}
.glass-btn-warning:hover {
  background: hsla(51, 100%, 50%, 0.15) !important;
  box-shadow: 0 6px 24px hsla(51, 100%, 50%, 0.3) !important;
  border-color: #FFD700 !important;
}

.glass-btn-info {
  border-color: hsla(187, 100%, 50%, 0.4) !important;
  color: #00E5FF !important;
}
.glass-btn-info:hover {
  background: hsla(187, 100%, 50%, 0.15) !important;
  box-shadow: 0 6px 24px hsla(187, 100%, 50%, 0.3) !important;
  border-color: #00E5FF !important;
}

.glass-btn-brand {
  border-color: hsla(203, 89%, 53%, 0.4) !important;
  color: #1DA1F2 !important;
}
.glass-btn-brand:hover {
  background: hsla(203, 89%, 53%, 0.15) !important;
  box-shadow: 0 6px 24px hsla(203, 89%, 53%, 0.3) !important;
  border-color: #1DA1F2 !important;
}

.glass-input {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 255, 159, 0.3);
  color: #00FF9F;
  padding: 0.5rem;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
}

.glass-input:focus {
  outline: none;
  border-color: #00FF9F;
  box-shadow: 0 0 8px rgba(0, 255, 159, 0.3);
}

/* Navigation */
.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 255, 159, 0.3);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: #00FF9F;
  font-family: var(--font-heading);
}

.logo.glitch {
  animation: glitch-anim 3s infinite;
}

@keyframes glitch-anim {
  0%, 90%, 100% { text-shadow: 0 0 10px #00FF9F; }
  91% { text-shadow: -3px 0 #FF00AA, 3px 0 #00FF9F; }
  92% { text-shadow: 3px 0 #FF00AA, -3px 0 #00FF9F; }
  93% { text-shadow: 0 0 10px #00FF9F; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: #00FF9F;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  text-shadow: 0 0 12px var(--neon-bright);
}

.remix-card-btn:hover { background: hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.15); border-color: var(--neon-bright); box-shadow: 0 0 16px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.18); transform: translateY(-1px); }
.remix-card-btn:active { transform: scale(0.97); transition-duration: 0.05s; }

/* ── MOBILE RESPONSIVE NAV ── */
@media (max-width: 1024px) {
  .glass-nav { padding: 0.6rem 0.75rem; gap: 0.3rem; }
  .logo { font-size: 1.1rem; letter-spacing: 1px; }
  .nav-links { gap: 0.5rem; }
  .nav-links a { font-size: 0.78rem; }
  .nav-links .nav-hide-mobile { display: none; }
  .glass-nav > div:last-child { gap: 0.3rem !important; flex-wrap: wrap; justify-content: flex-end; }
  .glass-nav > div:last-child .glass-btn { padding-left: 0.5rem !important; padding-right: 0.5rem !important; font-size: 0.7rem !important; }
  .glass-nav .theme-label { display: none; }
  #current-theme-name { display: none; }
  #login-btn { flex-shrink: 0; min-width: 36px; justify-content: center; display: flex !important; }
  #login-btn svg { width: 18px; height: 18px; }
  #xaman-connect-btn span, #network-label { font-size: 0.65rem; }
  .hamburger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
    color: var(--neon-bright, #00FF9F);
    font-size: 1.3rem;
    border-radius: var(--radius-sm, 6px);
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  }
  .hamburger-btn:hover {
    background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
    border-color: var(--neon-bright, #00FF9F);
    transform: translateY(-2px);
  }
  .hamburger-btn:active {
    transform: scale(0.95);
  }
  #user-info { gap: 0.3rem; flex-shrink: 0; }
  #user-info img { width: 22px; height: 22px; }
  #user-info span { font-size: 0.65rem; }
}
  .hamburger-btn:hover {
    background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
    border-color: var(--neon-bright, #00FF9F);
    transform: translateY(-2px);
  }
  .hamburger-btn:active {
    transform: scale(0.95);
  }
  #user-info { gap: 0.3rem; flex-shrink: 0; }
  #user-info img { width: 22px; height: 22px; }
  #user-info span { font-size: 0.65rem; }
/* ── COMPACT DESKTOP NAV (avoid overcrowding on smaller screens) ── */
@media (max-width: 1300px) {
  .glass-nav { padding-left: 1rem; padding-right: 1rem; }
  .glass-nav > div:nth-child(2) { gap: 0.6rem; }
  .glass-nav > div:last-child { gap: 0.4rem; }
  .glass-nav > div:last-child .glass-btn { padding-left: 0.45rem; padding-right: 0.45rem; font-size: 0.75rem; }
  #current-theme-name { display: none; }
  #network-label { display: none; }
}

/* ── Login button always visible ── */
#login-btn { display: flex !important; flex-shrink: 0 !important; min-width: 36px; }
#user-info { gap: 0.5rem; flex-shrink: 0; }
#user-info img { width: 26px; height: 26px; }
#user-info span { font-size: 0.75rem; }

/* Hero */
.hero {
  margin-top: 80px;
  padding: 4rem 2rem;
  text-align: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  color: #00FF9F;
  letter-spacing: 4px;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(0, 255, 159, 0.7);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.cta-btn {
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  font-weight: 700;
}

/* Video background */
#cinematic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.15;
}

.video-fallback {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
  z-index: -3;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Sidebar */
.sidebar {
  background: rgba(10, 10, 15, 0.9) !important;
}

.sidebar-tabs {
  border-bottom: 1px solid rgba(0, 255, 159, 0.2);
}

.sidebar-tab {
  transition: all 0.2s ease;
}

.sidebar-tab.active {
  background: rgba(0, 255, 159, 0.15) !important;
  border-bottom: 2px solid #00FF9F !important;
}

.tab-content {
  animation: fadeIn 0.3s ease;
}

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

/* Phase 2 — Supergrok-level motion */
.layer-item {
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: grab;
}

.layer-item:hover {
  background: rgba(0, 255, 159, 0.1) !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 25px rgba(0, 255, 159, 0.4);
}

.layer-item:active {
  cursor: grabbing;
  transform: scale(0.98);
}

/* Enhanced layer selection feedback */
.layer-selected {
  box-shadow: 0 0 0 3px rgba(0, 255, 159, 0.6), 0 0 8px rgba(0, 255, 159, 0.3);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  transform: scale(1.01);
}

/* Layer pop-in animation */
.layer-item-added {
  animation: layerPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes layerPopIn {
  0% { transform: scale(0.8); opacity: 0.5; }
  60% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

/* Enhanced loading shimmer */
.loading-shimmer {
  background: linear-gradient(90deg, transparent 25%, rgba(0,255,159,0.08) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: 4px;
}

.ai-generation-preview {
  background: linear-gradient(90deg, transparent 25%, rgba(0,255,159,0.15) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Success pulse with confetti timing */
.success-pulse {
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% { box-shadow: 0 0 0 0 hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.4); }
  70% { box-shadow: 0 0 0 20px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Gentle entrance animations for panels */
@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-entrance {
  animation: panelSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.panel-fade-in {
  animation: panelFadeIn 0.2s ease;
}

/* Hover lift and press states for all interactive elements */
.glass-btn,
.tool-btn,
.sidebar-tab,
.dj-panel-tab,
.theme-thumb,
.palette-btn,
.ftool-btn,
.mob-tool,
.remix-card-btn,
.embed-remix-btn,
.tiktok-export-btn,
.share-api-copy-btn,
.ai-generate-btn,
.ai-add-btn,
.ai-cp-generate-btn,
.ai-cp-add-btn,
.neet-share-x-btn,
.share-launch-btn,
.empty-state-cta,
.close-x,
.palette-close,
.ai-panel-close,
.ai-cp-close,
.ftool-btn.active,
.palette-btn.active,
.mob-tool.active,
.sidebar-tab.active,
.dj-panel-tab.active,
.theme-thumb.active,
.ftool-btn:hover,
.palette-btn:hover,
.mob-tool:hover,
.sidebar-tab:hover,
.dj-panel-tab:hover,
.theme-thumb:hover {
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.glass-btn:hover,
.tool-btn:hover,
.sidebar-tab:hover,
.dj-panel-tab:hover,
.theme-thumb:hover,
.palette-btn:hover,
.ftool-btn:hover,
.mob-tool:hover,
.remix-card-btn:hover,
.embed-remix-btn:hover,
.tiktok-export-btn:hover,
.share-api-copy-btn:hover,
.ai-generate-btn:hover,
.ai-add-btn:hover,
.ai-cp-generate-btn:hover,
.ai-cp-add-btn:hover,
.neet-share-x-btn:hover,
.share-launch-btn:hover,
.empty-state-cta:hover,
.close-x:hover,
.palette-close:hover,
.ai-panel-close:hover,
.ai-cp-close:hover {
  transform: translateY(-2px) scale(1.02);
}

.glass-btn:active,
.tool-btn:active,
.sidebar-tab:active,
.dj-panel-tab:active,
.theme-thumb:active,
.palette-btn:active,
.ftool-btn:active,
.mob-tool:active,
.remix-card-btn:active,
.embed-remix-btn:active,
.tiktok-export-btn:active,
.share-api-copy-btn:active,
.ai-generate-btn:active,
.ai-add-btn:active,
.ai-cp-generate-btn:active,
.ai-cp-add-btn:active,
.neet-share-x-btn:active,
.share-launch-btn:active,
.empty-state-cta:active,
.close-x:active,
.palette-close:active,
.ai-panel-close:active,
.ai-cp-close:active {
  transform: scale(0.95);
}

/* Focus-visible states for accessibility */
.glass-btn:focus-visible,
.tool-btn:focus-visible,
.sidebar-tab:focus-visible,
.dj-panel-tab:focus-visible,
.theme-thumb:focus-visible,
.palette-btn:focus-visible,
.ftool-btn:focus-visible,
.mob-tool:focus-visible,
.remix-card-btn:focus-visible,
.embed-remix-btn:focus-visible,
.tiktok-export-btn:focus-visible,
.share-api-copy-btn:focus-visible,
.ai-generate-btn:focus-visible,
.ai-add-btn:focus-visible,
.ai-cp-generate-btn:focus-visible,
.ai-cp-add-btn:focus-visible,
.neet-share-x-btn:focus-visible,
.share-launch-btn:focus-visible,
.empty-state-cta:focus-visible,
.close-x:focus-visible,
.palette-close:focus-visible,
.ai-panel-close:focus-visible,
.ai-cp-close:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 255, 159, 0.25);
}

/* Confetti animation enhancements */
.launch-confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  z-index: 99999;
  pointer-events: none;
  animation: confetti-fall 3.5s ease-in forwards;
  animation-delay: var(--confetti-delay, 0s);
  filter: drop-shadow(0 0 1px currentColor);
  background: var(--confetti-color, #00FF9F);
}

@keyframes confetti-fall {
  0% { transform: translateY(-10vh) rotate(0deg) scale(1) skew(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(900deg) scale(0.3) skew(15deg); opacity: 0; }
}

/* Enhanced tooltip system */
.neet-tooltip {
  position: relative;
}

.neet-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.3);
  border-radius: var(--radius-sm);
  color: var(--neon-bright);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 99999;
  box-shadow: 0 0 8px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.15);
  backdrop-filter: blur(4px);
  font-family: 'Inter', sans-serif;
}

.neet-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Smooth transitions for floating panels */
#floating-properties.active,
#floating-tool-palette.active,
#ai-generate-panel.active,
#ai-copilot-panel.active {
  animation: panelSlideIn 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Enhanced tab transitions */
.sidebar-tab,
.dj-panel-tab,
.theme-thumb,
.portfolio-tab,
.gallery-tab {
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.sidebar-tab:hover,
.dj-panel-tab:hover,
.theme-thumb:hover,
.portfolio-tab:hover,
.gallery-tab:hover {
  transform: translateY(-1px);
}

.sidebar-tab.active,
.dj-panel-tab.active,
.theme-thumb.active,
.portfolio-tab.active,
.gallery-tab.active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 159, 0.2);
}

/* Cloud asset items */
.cloud-asset-item {
  border: 1px solid rgba(0, 255, 159, 0.2);
  border-radius: 4px;
  overflow: hidden;
  cursor: grab;
  transition: all 0.2s ease;
}

.cloud-asset-item:hover {
  border-color: #00FF9F;
  box-shadow: 0 0 10px rgba(0, 255, 159, 0.3);
}

.cloud-asset-item:active {
  cursor: grabbing;
}

.cloud-folder-btn {
  padding: 0.3rem 0.6rem !important;
  font-size: 0.7rem !important;
}

.cloud-folder-btn.active {
  background: rgba(0, 255, 159, 0.3) !important;
}

/* Timeline */
.timeline-container {
  border: 1px solid rgba(0, 255, 159, 0.3) !important;
}

.timeline-track {
  transition: background 0.2s ease;
}

.timeline-track:hover {
  background: rgba(0, 255, 159, 0.05) !important;
}

.timeline-ruler-label {
  background: rgba(0, 0, 0, 0.3);
}

/* Quick Animate Toolbar */
#quick-animate-toolbar {
  animation: slideIn 0.2s ease;
  pointer-events: auto;
}

@keyframes slideIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

#quick-animate-toolbar .glass-btn {
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  transition: all 0.2s ease;
}

#quick-animate-toolbar .glass-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
}

/* Transform handles glow */
.graphics-handle {
  filter: drop-shadow(0 0 3px #00FF9F);
}

/* Loading and disabled states */
.loading {
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-pulse {
  animation: loadingPulse 1.6s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

button:disabled {
  cursor: not-allowed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 159, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 159, 0.5);
}

/* Mobile Toolbar */
@media (max-width: 768px) {
  #mobile-toolbar {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .mobile-tool-btn.active {
    background: rgba(0,255,159,0.4) !important;
    border-color: #00FF9F !important;
  }
  .timeline-container { height: 150px !important; }
  .glass-section { margin: 0.5rem !important; }
  .sidebar { width: 100% !important; }
}

/* Phase 1 — Canvas Polish: grid pulse */
@keyframes gridPulse {
  0% { opacity: 0.65; }
  50% { opacity: 0.95; }
  100% { opacity: 0.65; }
}

/* DJ Swarm Companion */
#dj-swarm-companion {
  transition: all 0.3s ease;
}

#dj-swarm-companion.collapsed {
  height: 25px !important;
}

#dj-swarm-companion.closed {
  display: none !important;
}

#dj-body {
  transition: opacity 0.3s ease;
}

#dj-swarm-companion.collapsed #dj-body {
  opacity: 0;
  pointer-events: none;
}

/* Version Control */
.branch-commit {
  width: 10px;
  height: 10px;
  background: #00FF9F;
  border-radius: 50%;
  position: absolute;
  cursor: pointer;
  transition: all 0.2s ease;
}

.branch-commit:hover {
  transform: scale(1.5);
  box-shadow: 0 0 10px #00FF9F;
}

.version-item {
  padding: 0.5rem;
  border: 1px solid rgba(0, 255, 159, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.version-item:hover {
  background: rgba(0, 255, 159, 0.1) !important;
  border-color: #00FF9F;
}

/* Toast notification */
#editor-toast {
  animation: toastIn 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Tool button active state */
.tool-btn.active {
  background: rgba(0, 255, 159, 0.4) !important;
  box-shadow: 0 0 8px rgba(0, 255, 159, 0.6) !important;
}

/* Expression buttons */
.expr-btn {
  transition: all 0.2s ease;
}

.expr-btn:hover {
  background: rgba(0, 255, 159, 0.2) !important;
}

/* Story Graph */
#story-graph-canvas {
  background: rgba(0, 0, 0, 0.5);
}

/* Load modal */
.load-item {
  transition: all 0.2s ease;
}

.load-item:hover {
  background: rgba(0, 255, 159, 0.15) !important;
}

/* Glitch effect */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

/* Breathe animation */
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* === DJ MIXER PANEL === */
#dj-mixer-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,159,0.3) transparent;
}
#dj-mixer-panel::-webkit-scrollbar { width: 4px; }
#dj-mixer-panel::-webkit-scrollbar-thumb { background: rgba(0,255,159,0.3); border-radius: 2px; }

.dj-channel {
  transition: all 0.2s ease;
}
.dj-channel:hover {
  border-color: rgba(0,255,159,0.5) !important;
  box-shadow: 0 0 8px rgba(0,255,159,0.15);
}

.dj-channel input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0,255,159,0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.dj-channel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00FF9F;
  cursor: pointer;
}

.dj-lib-card, .dj-community-card {
  transition: all 0.2s ease;
}
.dj-lib-card:hover, .dj-community-card:hover {
  border-color: rgba(0,255,159,0.5) !important;
}

.dj-lib-btn, .dj-community-btn {
  transition: all 0.15s ease;
}
.dj-lib-btn:hover, .dj-community-btn:hover {
  background: rgba(0,255,159,0.3) !important;
}

.dj-panel-tab {
  transition: all 0.2s ease;
}
.dj-panel-tab:hover {
  background: rgba(0,255,159,0.1) !important;
}

#dj-waveform {
  transition: all 0.3s ease;
}

/* ── DAW Track Styles ── */
#dj-daw-tracks {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,159,0.2) transparent;
}
#dj-daw-tracks::-webkit-scrollbar { width: 3px; }
#dj-daw-tracks::-webkit-scrollbar-thumb { background: rgba(0,255,159,0.2); border-radius: 2px; }

.daw-track-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid rgba(0,255,159,0.08);
  cursor: ns-resize;
  transition: background 0.15s ease;
  user-select: none;
}
.daw-track-row:hover {
  background: rgba(0,255,159,0.05);
}
.daw-track-row:last-child {
  border-bottom: none;
}

.daw-track-label {
  min-width: 60px;
  max-width: 80px;
  font-size: 0.5rem;
  color: #00FF9F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  font-weight: bold;
}

.daw-track-waveform {
  flex: 1;
  min-width: 60px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,255,159,0.12);
}

.daw-track-fx {
  display: flex;
  gap: 0.15rem;
  flex-shrink: 0;
}

.daw-fx-btn {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(0,255,159,0.25);
  border-radius: 3px;
  background: none;
  color: #00FF9F;
  font-size: 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}
.daw-fx-btn:hover {
  border-color: #00FF9F;
  background: rgba(0,255,159,0.15);
}

/* ── Loop Pad Grid ── */
#dj-loop-pad-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,159,0.2) transparent;
}
#dj-loop-pad-grid::-webkit-scrollbar { width: 3px; }
#dj-loop-pad-grid::-webkit-scrollbar-thumb { background: rgba(0,255,159,0.2); border-radius: 2px; }

.loop-pad {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-height: 40px;
  font-size: 0.55rem;
}
.loop-pad:active {
  transform: scale(0.92);
}

/* ── Vibe Slider ── */
#dj-vibe-slider {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #00FF9F44, #00E5FF44, #FF00AA44, #AA00FF44);
  border-radius: 3px;
  height: 4px;
  outline: none;
  cursor: pointer;
}
#dj-vibe-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00FF9F;
  cursor: pointer;
  box-shadow: 0 0 6px #00FF9F;
}

/* ── Waveform Loader ── */
#dj-waveform-loader {
  transition: opacity 0.3s ease;
}

/* ── Smart Blend Panel ── */
#dj-smart-blend-panel {
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(170,0,255,0.3) transparent;
}
#dj-smart-blend-panel::-webkit-scrollbar { width: 3px; }
#dj-smart-blend-panel::-webkit-scrollbar-thumb { background: rgba(170,0,255,0.3); border-radius: 2px; }

/* ── DJ Search Input ── */
#dj-yt-url:focus {
  border-color: #00FF9F !important;
  box-shadow: 0 0 8px rgba(0,255,159,0.2);
  outline: none;
}

/* ── Export Status ── */
#dj-export-status a {
  color: #00FF9F !important;
  text-decoration: underline;
}

/* === PERMANENT RESIZABLE SIDEBAR + LIVE CANVAS (Grok Imagine Level) === */
#main-sidebar {
  position: relative !important;
  transition: width 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  min-width: 52px;
  flex-shrink: 0;
}

#sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  background: transparent;
  cursor: col-resize;
  z-index: 10010;
  user-select: none;
  opacity: 0.7;
}

#sidebar-resize-handle:hover,
#sidebar-resize-handle:active {
  opacity: 1;
  background: rgba(0, 255, 159, 0.2);
}

#sidebar-resize-handle::after {
  content: '';
  position: absolute;
  top: 30%;
  left: 3px;
  width: 2px;
  height: 40%;
  background: #00FF9F;
  border-radius: 9999px;
  box-shadow: 0 0 8px #00FF9F;
}

/* === FLOATING PROPERTIES INSPECTOR (Grok Imagine Style) === */
#floating-properties {
  position: fixed;
  background: rgba(10,10,15,0.96);
  backdrop-filter: blur(16px);
  border: 1px solid #00FF9F;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0,255,159,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  padding: 1rem;
  min-width: 260px;
  z-index: 10002;
  display: none;
  color: #ddd;
  font-size: 0.85rem;
  user-select: none;
}

#floating-properties.active {
  display: block;
  animation: inspectorPop 0.2s cubic-bezier(0.23,1,0.32,1);
}

@keyframes inspectorPop {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

#floating-properties .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(0,255,159,0.2);
  padding-bottom: 0.5rem;
}

#floating-properties .close-x {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #FF00AA;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

#floating-properties .close-x:hover {
  background: rgba(255,0,170,0.2);
  transform: rotate(90deg);
}

.prop-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.prop-row label {
  color: #00FF9F;
  font-size: 0.75rem;
  width: 48px;
  flex-shrink: 0;
}

.prop-row input[type="range"] {
  flex: 1;
  height: 4px;
  background: rgba(0,255,159,0.2);
  border-radius: 2px;
}

.prop-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #00FF9F;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 6px #00FF9F;
}

/* ── Drag-to-Reorder Feedback ── */
.daw-track-row.dragging {
  opacity: 0.4;
}
.daw-track-row.drag-over {
  border-top: 2px solid #00FF9F !important;
  background: rgba(0, 255, 159, 0.12) !important;
}
.timeline-track.dragging {
  opacity: 0.4;
}
.timeline-track.drag-over {
  border-top: 2px solid #00FF9F !important;
  background: rgba(0, 255, 159, 0.12) !important;
}

/* ── Theme Dropdown Thumbnails ── */
.theme-thumb {
  cursor: pointer;
  border-radius: 8px;
  padding: 0.4rem;
  transition: all 0.2s ease;
  text-align: center;
  border: 1px solid transparent;
}
.theme-thumb:hover {
  border-color: var(--neon);
  box-shadow: 0 0 10px var(--neon);
  background: rgba(0, 255, 159, 0.08);
}
.theme-thumb-preview {
  width: 100%;
  height: 48px;
  border-radius: 6px;
  border: 2px solid;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.theme-thumb-name {
  font-size: 0.6rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-thumb.active {
  border-color: var(--neon);
  box-shadow: 0 0 14px var(--neon);
}

/* Theme dropdown containment — prevents full-screen takeover */
#theme-dropdown {
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Nav theme links */
.nav-theme-link {
  position: relative;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.nav-theme-link:hover {
  background: rgba(0, 255, 159, 0.08);
}
.nav-theme-link.active {
  color: var(--neon) !important;
  font-weight: 700 !important;
}

@media (max-width: 640px) {
  #theme-dropdown {
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-height: 80vh !important;
    border-radius: 16px 16px 0 0 !important;
    margin-top: 0 !important;
    z-index: 10000 !important;
  }
}

/* ── Focus DJ Mode ── */
#focus-dj-overlay {
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
#focus-dj-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
#focus-dj-exit-btn {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 99999;
  padding: 0.5rem 1rem;
  background: rgba(255, 0, 170, 0.2);
  border: 1px solid #FF00AA;
  color: #FF00AA;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}
#focus-dj-exit-btn:hover {
  background: rgba(255, 0, 170, 0.35);
  box-shadow: 0 0 12px #FF00AA;
}
body.focus-dj-mode .sidebar,
body.focus-dj-mode #floating-tool-palette,
body.focus-dj-mode #floating-props,
body.focus-dj-mode .timeline-container,
body.focus-dj-mode #editor-section > div:first-child,
body.focus-dj-mode #editor-section > div:first-child {
  display: none !important;
}
body.focus-dj-mode #editor-section > div:first-child + div {
  display: none !important;
}

/* ── Audited Active / Hover States (consistent neon glow) ── */
.sidebar-tab.active {
  background: rgba(0, 255, 159, 0.18) !important;
  border-bottom: 2px solid #00FF9F !important;
  box-shadow: 0 2px 8px rgba(0, 255, 159, 0.25);
}
.sidebar-tab:hover {
  background: rgba(0, 255, 159, 0.1) !important;
  box-shadow: 0 2px 6px rgba(0, 255, 159, 0.15);
}
.dj-panel-tab.active {
  background: rgba(0, 255, 159, 0.2) !important;
  border-color: #00FF9F !important;
  box-shadow: 0 0 8px rgba(0, 255, 159, 0.3) !important;
}
.dj-panel-tab:hover {
  background: rgba(0, 255, 159, 0.12) !important;
  box-shadow: 0 0 6px rgba(0, 255, 159, 0.2) !important;
}

/* === FLOATING TOOL PALETTE (Grok Imagine Level) === */
#floating-tool-palette {
  position: fixed;
  background: rgba(10,10,15,0.96);
  backdrop-filter: blur(16px);
  border: 1px solid #00FF9F;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0,255,159,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 0.6rem;
  min-width: 280px;
  z-index: 10003;
  display: none;
  user-select: none;
  color: #ddd;
}

#floating-tool-palette.active {
  display: block;
  animation: palettePop 0.25s cubic-bezier(0.23,1,0.32,1);
}

@keyframes palettePop {
  from { opacity: 0; transform: scale(0.88) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0,255,159,0.25);
  cursor: move;
  font-size: 0.9rem;
  color: #00FF9F;
  font-weight: 600;
}

.palette-close {
  color: #FF00AA;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.palette-close:hover {
  background: rgba(255,0,170,0.2);
  transform: rotate(90deg);
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 0.4rem;
}

.palette-btn {
  background: rgba(0,255,159,0.08);
  border: 1px solid rgba(0,255,159,0.4);
  color: #00FF9F;
  padding: 0.5rem 0.3rem;
  border-radius: 6px;
  font-size: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.palette-btn:hover {
  background: rgba(0,255,159,0.25);
  box-shadow: 0 0 12px rgba(0,255,159,0.4);
  transform: translateY(-1px);
}

.palette-btn:active {
  transform: scale(0.95);
}

/* === IMPROVED TOOL PALETTE (between sidebar & canvas) === */
.ftool-palette {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 64px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 255, 159, 0.25);
  border-radius: 10px;
  padding: 6px 4px;
  gap: 2px;
  align-self: stretch;
  justify-content: center;
}

.ftool-palette-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.ftool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 54px;
  padding: 6px 2px;
  border: 1px solid transparent;
  background: transparent;
  color: #00FF9F;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.22s cubic-bezier(0.23, 1, 0.32, 1);
  font-family: 'Inter', sans-serif;
  will-change: transform;
}

.ftool-btn .ftool-icon {
  font-size: 1.1rem;
  line-height: 1.2;
}

.ftool-btn .ftool-label {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.ftool-btn:hover {
  background: rgba(0, 255, 159, 0.12);
  border-color: rgba(0, 255, 159, 0.3);
  box-shadow: 0 0 8px rgba(0, 255, 159, 0.15);
  transform: translateY(-1px);
}

.ftool-btn.active {
  background: rgba(0, 255, 159, 0.18);
  border-color: #00FF9F;
  box-shadow: 0 0 16px rgba(0, 255, 159, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.ftool-btn.active .ftool-label {
  opacity: 1;
  color: #00FF9F;
}

.ftool-btn:active {
  transform: scale(0.92);
}

/* Subtle tooltip via title attribute */
.ftool-btn:hover::after {
  display: none;
}

/* Toolbar button tooltips visible via title attribute (native) */

/* Toast styling for info/gold type */
#editor-toast[style*="color: #FFD700"] {
  border-color: #FFD700 !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

/* Collapsible sidebar retain flex shrink */
#main-sidebar {
  flex-shrink: 0;
  min-width: 52px;
}

/* Timeline container consistency */
.timeline-container {
  flex-shrink: 0;
}

/* Floating properties fixed position refinement */
#floating-props {
  animation: floatIn 0.2s ease;
}

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

/* === MICRO-GLITCH ON TOOL ACTIVATION === */
@keyframes microGlitch {
   0% { transform: translate(0); }
   20% { transform: translate(-2px, 1px) skewX(-2deg); }
   40% { transform: translate(2px, -1px) skewX(2deg); }
   60% { transform: translate(-1px, 0) skewX(-1deg); }
   80% { transform: translate(1px, 1px) skewX(1deg); }
   100% { transform: translate(0); }
}

.ftool-btn.micro-glitch {
   animation: microGlitch 0.25s ease;
}

/* === PHASE 1 - INSTANT SHARE FLYWHEEL === */
.neet-share-x-btn {
  background: linear-gradient(90deg, #1DA1F2, #00A2FF);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(29, 161, 242, 0.4);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.neet-share-x-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(29, 161, 242, 0.6);
}
.neet-embed-box {
  background: rgba(10, 10, 15, 0.92);
  border: 1px solid rgba(0, 255, 159, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
}
.neet-embed-box textarea {
  background: #0a0a0f;
  border: 1px solid rgba(0, 255, 159, 0.2);
  color: #00ff9f;
  font-family: monospace;
  font-size: 0.85rem;
  width: 100%;
  height: 68px;
  resize: none;
}

  /* === PHASE 3 — NETWORK EFFECT & MULTI-PLATFORM FLYWHEEL === */

  .viral-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00FF9F, #00E5FF, #FF00AA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    line-height: 1;
    animation: scorePulse 1.5s ease-in-out infinite;
  }

  @keyframes scorePulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
  }

  .viral-predictor-card {
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 159, 0.35);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 0 30px rgba(0, 255, 159, 0.15), 0 8px 32px rgba(0, 0, 0, 0.5);
    color: #ddd;
    font-size: 0.85rem;
    min-width: 240px;
    z-index: 10015;
    animation: predictorPop 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: fixed;
  }

  @keyframes predictorPop {
    from { opacity: 0; transform: scale(0.85) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }

  .viral-predictor-card .predictor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0, 255, 159, 0.2);
    padding-bottom: 0.5rem;
  }

  .viral-predictor-card .predictor-title {
    font-weight: 700;
    color: #00FF9F;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }

  .viral-predictor-card .predictor-close {
    color: #FF00AA;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
  }

  .viral-predictor-card .predictor-close:hover {
    background: rgba(255, 0, 170, 0.2);
    transform: rotate(90deg);
  }

  .viral-predictor-card .predictor-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
  }

  .viral-predictor-card .predictor-label {
    color: var(--text-dim, #8888a0);
    font-size: 0.78rem;
  }

  .viral-predictor-card .predictor-value {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
  }

  .viral-predictor-card .predictor-bar {
    height: 6px;
    background: rgba(0, 255, 159, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.3rem;
  }

  .viral-predictor-card .predictor-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #00FF9F, #00E5FF);
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .tiktok-export-btn {
    background: linear-gradient(135deg, rgba(0, 255, 159, 0.12), rgba(0, 229, 255, 0.08));
    border: 1px solid rgba(0, 255, 159, 0.3);
    color: #00FF9F;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: 'Inter', system-ui, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.3px;
  }

  .tiktok-export-btn:hover {
    background: rgba(0, 255, 159, 0.18);
    border-color: #00FF9F;
    box-shadow: 0 0 16px rgba(0, 255, 159, 0.25);
    transform: translateY(-1px);
  }

  .tiktok-export-btn:active {
    transform: scale(0.97);
    transition-duration: 0.06s;
  }

  .tiktok-export-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
  }

  .embed-remix-btn {
    background: rgba(0, 255, 159, 0.06);
    border: 2px dashed rgba(0, 255, 159, 0.4);
    color: #00FF9F;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', system-ui, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.08);
  }

  .embed-remix-btn:hover {
    background: rgba(0, 255, 159, 0.14);
    border-color: #00FF9F;
    box-shadow: 0 0 24px rgba(0, 255, 159, 0.2), 0 0 48px rgba(0, 255, 159, 0.08);
    transform: translateY(-2px) scale(1.02);
  }

  .embed-remix-btn:active {
    transform: scale(0.96);
    transition-duration: 0.06s;
  }

  .share-api-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
  }

  .share-api-modal-overlay.active {
    display: flex;
  }

  @keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .share-api-modal {
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 255, 159, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0, 255, 159, 0.15), 0 12px 48px rgba(0, 0, 0, 0.6);
    animation: modalSlideUp 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    color: #ddd;
    position: relative;
  }

  @keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  .share-api-modal h3 {
    color: #00FF9F;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
  }

  .share-api-modal .modal-subtitle {
    color: var(--text-dim, #8888a0);
    font-size: 0.78rem;
    margin-bottom: 1rem;
  }

  .share-api-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #FF00AA;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    background: none;
    border: none;
  }

  .share-api-modal .modal-close:hover {
    background: rgba(255, 0, 170, 0.2);
    transform: rotate(90deg);
  }

  .share-api-section {
    margin-bottom: 0.8rem;
  }

  .share-api-section label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dim, #8888a0);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.3rem;
  }

  .share-api-code {
    background: #0a0a0f;
    border: 1px solid rgba(0, 255, 159, 0.2);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #00FF9F;
    word-break: break-all;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.5;
    position: relative;
    cursor: text;
    user-select: all;
  }

  .share-api-code::-webkit-scrollbar { width: 4px; }
  .share-api-code::-webkit-scrollbar-thumb { background: rgba(0,255,159,0.2); border-radius: 2px; }

  .share-api-row {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
  }

  .share-api-row .share-api-code {
    flex: 1;
  }

  .share-api-copy-btn {
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid rgba(0, 255, 159, 0.25);
    color: #00FF9F;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', system-ui, sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.3px;
  }

  .share-api-copy-btn:hover {
    background: rgba(0, 255, 159, 0.2);
    border-color: #00FF9F;
    box-shadow: 0 0 8px rgba(0, 255, 159, 0.15);
  }

  .share-api-copy-btn.copied {
    background: rgba(0, 255, 159, 0.25);
    border-color: #00FF9F;
    color: #fff;
  }

  .share-api-canvas-preview {
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 159, 0.15);
    max-width: 100%;
    margin-bottom: 0.8rem;
    background: #000;
  }

  .share-api-button-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
  }

  .share-api-button-row .glass-btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
    font-size: 0.78rem;
  }

  /* ── Remix button sizes ── */
  .embed-remix-btn.size-sm { font-size: 0.7rem; padding: 0.3rem 0.7rem; }
  .embed-remix-btn.size-lg { font-size: 1rem; padding: 0.7rem 1.4rem; }

  /* === PHASE 4 — LAUNCH CELEBRATION & SUCCESS ANIMATIONS === */

  @keyframes confetti-fall {
    0% { transform: translateY(-10vh) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg) scale(0.3); opacity: 0; }
  }

  .launch-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    z-index: 99999;
    pointer-events: none;
    animation: confetti-fall 3s ease-in forwards;
    animation-delay: var(--confetti-delay, 0s);
    filter: drop-shadow(0 0 2px currentColor);
  }

  @keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 159, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(0, 255, 159, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 159, 0); }
  }

  .success-pulse {
    animation: successPulse 0.6s ease-out;
  }

  /* Share Launch button on homepage */
  .share-launch-btn {
    background: linear-gradient(135deg, #1DA1F2, #00A2FF);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(29, 161, 242, 0.4);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
  }

  .share-launch-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(29, 161, 242, 0.6);
  }

  .share-launch-btn:active { transform: scale(0.97); }

  /* Empty state CTA improvements */
  .empty-state-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(0,255,159,0.15), rgba(0,229,255,0.08));
    border: 1px solid rgba(0,255,159,0.35);
    border-radius: 10px;
    color: #00FF9F;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-top: 1rem;
  }

  .empty-state-cta:hover {
    background: rgba(0,255,159,0.2);
    border-color: #00FF9F;
    box-shadow: 0 0 20px rgba(0,255,159,0.2);
    transform: translateY(-1px);
  }

  /* === GLITCH FLASH OVERLAY (theme changes) === */
#glitch-flash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.05s;
}

#glitch-flash.active {
  opacity: 1;
  background: linear-gradient(90deg,
    rgba(0,255,159,0.08) 0%,
    rgba(255,0,170,0.08) 25%,
    rgba(0,255,159,0.08) 50%,
    rgba(255,0,170,0.05) 75%,
    transparent 100%
  );
  animation: glitchFlashAnim 0.35s ease forwards;
}

@keyframes glitchFlashAnim {
  0% { opacity: 0; transform: skewX(0deg); }
  10% { opacity: 1; transform: skewX(-3deg) scaleX(1.01); }
  30% { opacity: 0.7; transform: skewX(3deg) scaleX(0.99); }
  60% { opacity: 0.3; transform: skewX(-1deg); }
  100% { opacity: 0; transform: skewX(0deg); }
}

/* === ZOOM INDICATOR === */
#zoom-indicator {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  padding: 6px 12px;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(0,255,159,0.4);
  border-radius: 8px;
  color: #00FF9F;
  font-family: 'Inter', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 12px rgba(0,255,159,0.2);
}

#zoom-indicator.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === NEON PULSE ON FLOATING PANELS === */
@keyframes neonPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,255,159,0.3); }
  50% { box-shadow: 0 0 40px rgba(0,255,159,0.6); }
}

#floating-properties.active,
#floating-tool-palette.active {
  animation: neonPulse 2.8s ease-in-out infinite, floatIn 0.2s ease;
}

#floating-properties {
  position: fixed;
  background: rgba(10,10,15,0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0,255,159,0.3);
  border-radius: 10px;
  padding: 0.75rem;
  min-width: 220px;
  z-index: 10003;
  display: none;
  user-select: none;
  color: #ddd;
  box-shadow: 0 0 30px rgba(0,255,159,0.2);
}

#floating-properties.active {
  display: block;
}

#floating-properties .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(0,255,159,0.2);
}

#floating-properties .close-x {
  color: #FF00AA;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

#floating-properties .close-x:hover {
  background: rgba(255,0,170,0.2);
  transform: rotate(90deg);
}

#floating-properties .prop-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

#floating-properties .prop-row label {
  width: 40px;
  font-size: 0.7rem;
  color: #888;
}

#floating-properties .prop-row input[type="range"] {
  flex: 1;
  height: 4px;
  accent-color: #00FF9F;
}

/* === SUBTLE PALETTE GLOW === */
.ftool-palette {
  animation: paletteAmbient 4s ease-in-out infinite;
}

@keyframes paletteAmbient {
  0%, 100% { border-color: rgba(0,255,159,0.25); box-shadow: 0 0 10px rgba(0,255,159,0.05); }
  50% { border-color: rgba(0,255,159,0.35); box-shadow: 0 0 20px rgba(0,255,159,0.1); }
}

/* === SVG ICON SYSTEM === */
.ftool-svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s cubic-bezier(0.23,1,0.32,1);
  flex-shrink: 0;
}

.ftool-btn:hover .ftool-svg {
  transform: scale(1.15);
}

.ftool-btn.active .ftool-svg {
  filter: drop-shadow(0 0 6px #00FF9F);
}

.palette-btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.18s ease;
}

.palette-btn:hover svg {
  transform: scale(1.12);
}

/* ============================================================
   NEXT-GEN UI/UX OVERHAUL — Grok Imagine Beta + Polysights
   ============================================================ */

/* ── GLOBAL TOOLTIP SYSTEM ── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid rgba(0, 255, 159, 0.4);
  border-radius: 6px;
  color: #00FF9F;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 99999;
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.2);
  backdrop-filter: blur(6px);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── ENHANCED TOOL PALETTE — PROFESSIONAL VERTICAL ── */
.ftool-palette {
  width: 68px;
  padding: 8px 5px;
  gap: 3px;
  border-radius: 14px;
  background: rgba(8, 8, 14, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 255, 159, 0.2);
  box-shadow: 0 0 25px rgba(0, 255, 159, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ftool-btn {
  width: 56px;
  padding: 7px 2px;
  border-radius: 10px;
  gap: 2px;
  transition: all 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}

.ftool-btn .ftool-icon {
  font-size: 1.15rem;
  line-height: 1.2;
  transition: transform 0.18s ease;
}

.ftool-btn .ftool-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.18s ease;
}

.ftool-btn:hover {
  background: rgba(0, 255, 159, 0.12);
  border-color: #00ff9f;
  box-shadow: 0 4px 16px rgba(0, 255, 159, 0.25);
  transform: translateY(-1px);
}

.ftool-btn.active {
  background: rgba(0, 255, 159, 0.18);
  border-color: #00FF9F;
  box-shadow: 0 0 16px rgba(0, 255, 159, 0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}

.ftool-btn.active .ftool-label {
  opacity: 1;
  color: #00FF9F;
}

.ftool-btn:active {
  transform: scale(0.94);
  transition-duration: 0.04s;
}

.ftool-btn:hover .ftool-icon {
  transform: scale(1.12);
}

.ftool-btn:hover .ftool-label {
  opacity: 0.9;
}

.ftool-btn.active {
  background: rgba(0, 255, 159, 0.15);
  border-color: #00FF9F;
  box-shadow: 0 0 16px rgba(0, 255, 159, 0.25), inset 0 0 8px rgba(0, 255, 159, 0.08);
}

.ftool-btn.active .ftool-icon {
  filter: drop-shadow(0 0 4px #00FF9F);
}

.ftool-btn.active .ftool-label {
  opacity: 1;
  color: #00FF9F;
}

.ftool-btn:active {
  transform: scale(0.9);
  transition-duration: 0.06s;
}

/* ── SIDEBAR RESIZE HANDLE — ALWAYS VISIBLE NEON ── */
#sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  background: transparent;
  cursor: col-resize;
  z-index: 10010;
  user-select: none;
  opacity: 1;
}

#sidebar-resize-handle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 4px;
  width: 2px;
  height: 100%;
  background: rgba(0, 255, 159, 0.15);
  transition: background 0.2s ease;
}

#sidebar-resize-handle::after {
  content: '';
  position: absolute;
  top: 35%;
  left: 3px;
  width: 4px;
  height: 30%;
  background: #00FF9F;
  border-radius: 9999px;
  box-shadow: 0 0 10px #00FF9F, 0 0 20px rgba(0, 255, 159, 0.3);
  transition: all 0.2s ease;
  opacity: 0.7;
}

#sidebar-resize-handle:hover::before {
  background: rgba(0, 255, 159, 0.3);
}

#sidebar-resize-handle:hover::after {
  opacity: 1;
  box-shadow: 0 0 14px #00FF9F, 0 0 28px rgba(0, 255, 159, 0.4);
  left: 2px;
  width: 6px;
}

#sidebar-resize-handle:active::after {
  opacity: 1;
  box-shadow: 0 0 18px #00FF9F, 0 0 36px rgba(0, 255, 159, 0.5);
}

/* ── NFT MINT BUTTON — PROMINENT TOP-BAR ── */
.nft-mint-btn {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 170, 0, 0.08)) !important;
  border: 2px solid #FFD700 !important;
  color: #FFD700 !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.2rem !important;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.nft-mint-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: 0.6s;
  pointer-events: none;
}

.nft-mint-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 170, 0, 0.12)) !important;
  border-color: #FFD700 !important;
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.35), 0 0 48px rgba(255, 215, 0, 0.12) !important;
  transform: translateY(-1px) !important;
}

.nft-mint-btn:hover::after {
  left: 200%;
}

.nft-mint-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* ── FLOATING PANELS — CONTEXTUAL PLACEMENT ── */
#floating-props,
#floating-properties {
  backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 255, 159, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 255, 159, 0.15), 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.3s ease;
}

#floating-props:hover,
#floating-properties:hover {
  box-shadow: 0 0 40px rgba(0, 255, 159, 0.2), 0 8px 32px rgba(0, 0, 0, 0.5);
}

#floating-tool-palette {
  backdrop-filter: blur(18px);
  border-radius: 14px;
  box-shadow: 0 0 35px rgba(0, 255, 159, 0.2), 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── GLASS BUTTON — INNER GLOW OVERLAY (applied via main .glass-btn) ── */

/* ── THEME CHANGE GLITCH TRANSITION ── */
@keyframes themeGlitch {
  0% { clip-path: inset(0 0 0 0); }
  5% { clip-path: inset(10% 0 80% 0); transform: translateX(-3px); }
  10% { clip-path: inset(30% 0 50% 0); transform: translateX(3px); }
  15% { clip-path: inset(60% 0 20% 0); transform: translateX(-2px); }
  20% { clip-path: inset(0 0 0 0); transform: translateX(0); }
  100% { clip-path: inset(0 0 0 0); transform: translateX(0); }
}

body.theme-transitioning {
  animation: themeGlitch 0.4s ease;
}

/* ── SIDEBAR TABS — ENHANCED NEON ── */
.sidebar-tab {
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.sidebar-tab:hover {
  background: rgba(0, 255, 159, 0.08) !important;
}

.sidebar-tab.active {
  background: rgba(0, 255, 159, 0.14) !important;
  border-bottom: 2px solid #00FF9F !important;
  box-shadow: 0 2px 10px rgba(0, 255, 159, 0.2);
}

/* ── TOOLBAR BUTTONS — CONSISTENT NEON ── */
.tool-btn {
  transition: all 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}

.tool-btn.active {
  background: rgba(0, 255, 159, 0.25) !important;
  border-color: #00FF9F !important;
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.4) !important;
}

/* ── INPUT FIELDS — CONSISTENT NEON ── */
.glass-input, input[type="text"], input[type="range"], select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-input:focus, input[type="text"]:focus {
  border-color: #00FF9F !important;
  box-shadow: 0 0 10px rgba(0, 255, 159, 0.2) !important;
  outline: none;
}

/* ── RANGE SLIDER THUMB — NEON GLOW ── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0, 255, 159, 0.15);
  border-radius: 3px;
  height: 4px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00FF9F;
  cursor: pointer;
  box-shadow: 0 0 6px #00FF9F;
  transition: box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 12px #00FF9F, 0 0 20px rgba(0, 255, 159, 0.3);
}

input[type="range"]:active::-webkit-slider-thumb {
  box-shadow: 0 0 16px #00FF9F, 0 0 30px rgba(0, 255, 159, 0.4);
}

/* ── LAYER LIST — CLEAN INTERACTION ── */
.layer-item {
  border-radius: 6px;
  transition: all 0.18s ease;
}

.layer-item:hover {
  background: rgba(0, 255, 159, 0.08) !important;
  border-color: rgba(0, 255, 159, 0.4) !important;
}

/* ── ZOOM INDICATOR — REFINED ── */
#zoom-indicator {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* ── TOAST — POLISHED ── */
#editor-toast {
  backdrop-filter: blur(12px);
  box-shadow: 0 0 20px rgba(0, 255, 159, 0.15);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── SCROLLBAR — THIN NEON ── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 159, 0.2) transparent;
}

/* ── DJ PANEL — CONSISTENT NEON ── */
#dj-mixer-panel .glass-btn:hover {
  box-shadow: 0 0 10px rgba(0, 255, 159, 0.25);
}

/* ── RESPONSIVE — MOBILE REFINEMENTS ── */
@media (max-width: 768px) {
  .ftool-palette {
    width: 52px;
    padding: 4px 3px;
  }
  .ftool-btn {
    width: 44px;
    padding: 5px 1px;
  }
  .ftool-btn .ftool-label {
    display: none;
  }
  .ftool-btn .ftool-icon {
    font-size: 1rem;
  }
  #sidebar-resize-handle {
    display: none;
  }
}

/* ============================================================
   PHASE 2 - REFERRAL & COMMUNITY FLYWHEEL
   ============================================================ */
.referral-card {
  background: linear-gradient(135deg, rgba(0,255,159,0.08), rgba(0,170,255,0.08));
  border: 1px solid rgba(0,255,159,0.3);
}
.leaderboard-badge {
  background: #ff00aa;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 9999px;
}
.challenge-prize {
  color: #ffd700;
  text-shadow: 0 0 10px #ffd700;
}

/* Referral card within glass sections */
.referral-inner-card {
  background: rgba(0,255,159,0.04);
  border: 1px solid rgba(0,255,159,0.15);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.referral-link-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,159,0.2);
  border-radius: 8px;
  color: #00FF9F;
  font-family: monospace;
  font-size: 0.8rem;
  outline: none;
}
.referral-link-input:focus {
  border-color: #00FF9F;
  box-shadow: 0 0 8px rgba(0,255,159,0.2);
}
.referral-stats {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

/* Leaderboard card */
.leaderboard-card {
  background: rgba(10,10,18,0.7);
  border: 1px solid rgba(0,255,159,0.12);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.leaderboard-card:hover {
  border-color: rgba(0,255,159,0.4);
  box-shadow: 0 0 20px rgba(0,255,159,0.1);
  transform: translateY(-2px);
}
.leaderboard-rank {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #FF00AA, #AA00FF);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255,0,170,0.4);
}
.leaderboard-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 1.5rem;
}
.leaderboard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.leaderboard-title {
  color: #e0e0e0;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.leaderboard-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #888;
}

/* Challenge submission gallery */
.challenge-submission-card {
  background: rgba(10,10,18,0.5);
  border: 1px solid rgba(0,255,159,0.08);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.challenge-submission-card:hover {
  border-color: rgba(0,255,159,0.3);
  transform: translateY(-2px);
}
.challenge-submission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* Copied feedback animation */
@keyframes copiedFlash {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}
.copied-flash {
  animation: copiedFlash 0.4s ease;
}

/* ============================================================
   PREMIUM INTERACTION POLISH — FIGMA/GROK LEVEL
   ============================================================ */

/* ── BUTTON MICRO-INTERACTIONS ── */
.glass-btn {
  will-change: transform, box-shadow, filter;
  backface-visibility: hidden;
}

.glass-btn:active:not(:disabled) {
  transform: scale(0.95);
  filter: brightness(1.2);
  box-shadow: 0 0 6px rgba(0, 255, 159, 0.3);
  transition-duration: 0.04s;
}

/* ── TOOL PALETTE — PREMIUM FEEL ── */
.ftool-btn {
  will-change: transform;
  backface-visibility: hidden;
  position: relative;
}

.ftool-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(0, 255, 159, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.ftool-btn:hover::before {
  opacity: 1;
}

.ftool-btn.active::before {
  opacity: 1;
  background: radial-gradient(circle, rgba(0, 255, 159, 0.25), transparent 70%);
}

.ftool-btn:active {
  transform: scale(0.96);
  transition-duration: 0.04s;
}

/* ── LAYER ITEM — PREMIUM DRAG FEEDBACK ── */
.layer-item {
  will-change: transform, opacity;
  backface-visibility: hidden;
  transition: all 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}

.layer-item:hover {
  transform: translateX(2px);
}

.layer-item.dragging {
  opacity: 0.5;
  transform: scale(0.98);
  box-shadow: 0 0 20px rgba(0, 255, 159, 0.3);
}

.layer-item.drag-over-top {
  border-top: 2px solid #00FF9F !important;
  box-shadow: 0 -4px 12px rgba(0, 255, 159, 0.2);
}

.layer-item.drag-over-bottom {
  border-bottom: 2px solid #00FF9F !important;
  box-shadow: 0 4px 12px rgba(0, 255, 159, 0.2);
}

/* ── FLOATING PANELS — PREMIUM ANIMATION ── */
#floating-properties,
#floating-tool-palette,
#floating-props {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

#floating-properties.active {
  animation: panelAppear 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

#floating-tool-palette.active {
  animation: panelAppear 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes panelAppear {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ── TOOLTIP — PREMIUM FEEL ── */
[data-tooltip]::after {
  will-change: opacity, transform;
  backface-visibility: hidden;
}

/* ── TRANSFORM HANDLES — PREMIUM GLOW ── */
.graphics-handle {
  filter: drop-shadow(0 0 4px #00FF9F) drop-shadow(0 0 8px rgba(0, 255, 159, 0.3));
}

/* ── ZOOM INDICATOR — PREMIUM ── */
#zoom-indicator {
  will-change: opacity, transform;
  backface-visibility: hidden;
  font-variant-numeric: tabular-nums;
}

/* ── TOAST — PREMIUM ── */
#editor-toast {
  will-change: opacity, transform;
  backface-visibility: hidden;
}

/* ── SCROLLBAR — PREMIUM ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 159, 0.25);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 159, 0.4);
}

/* ── SIDEBAR TABS — PREMIUM ── */
.sidebar-tab {
  will-change: transform, background;
  backface-visibility: hidden;
}

.sidebar-tab:active {
  transform: scale(0.97);
}

/* ── PALETTE BUTTONS — PREMIUM ── */
.palette-btn {
  will-change: transform;
  backface-visibility: hidden;
}

.palette-btn:active {
  transform: scale(0.93) translateY(1px);
  transition-duration: 0.04s;
}

/* ── EXPRESSION BUTTONS — PREMIUM ── */
.expr-btn {
  will-change: transform;
  backface-visibility: hidden;
}

.expr-btn:active {
  transform: scale(0.93);
}

/* ── NFT BUTTON — PREMIUM ── */
.nft-mint-btn {
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}

/* ── THEME TRANSITION — PREMIUM GLITCH ── */
body.theme-transitioning * {
  will-change: transform;
}

/* ═══════════════════════════════════════════
   GLOBAL STEW — Cultural Visual Overlays
   Layer on top of any existing 11-theme system
   via --cultural-overlay variable & body classes
   ═══════════════════════════════════════════ */

:root {
  --cultural-overlay: none;
  --stew-accent: transparent;
}

/* Japan Overlay — subtle rain/glitch, soft pink, menhera/jirai */
body.overlay-japan {
  --cultural-overlay: japan;
  --stew-accent: #ff80ab;
}
body.overlay-japan #theme-bg-video {
  filter: url(#japan-glitch) saturate(1.05) contrast(1.02);
}
body.overlay-japan .glass-panel,
body.overlay-japan .glass-section,
body.overlay-japan .ai-cp-header,
body.overlay-japan .ai-panel-header {
  border-color: rgba(255, 128, 171, 0.25);
  box-shadow: inset 0 0 40px rgba(255, 128, 171, 0.04);
}
body.overlay-japan h1,
body.overlay-japan h2,
body.overlay-japan h3,
body.overlay-japan .hero-title,
body.overlay-japan .ai-cp-title {
  text-shadow: 0 0 12px rgba(255, 128, 171, 0.35), 0 2px 0 rgba(255, 128, 171, 0.1);
  letter-spacing: -0.02em;
}
body.overlay-japan .layer-item {
  border-left: 2px solid rgba(255, 128, 171, 0.4);
}

/* Korea Overlay — webtoon feel, film grain, purple accent */
body.overlay-korea {
  --cultural-overlay: korea;
  --stew-accent: #a29bfe;
}
body.overlay-korea #theme-bg-video {
  filter: contrast(1.06) brightness(0.98);
}
body.overlay-korea .glass-panel,
body.overlay-korea .glass-section,
body.overlay-korea .ai-cp-header,
body.overlay-korea .ai-panel-header {
  border-color: rgba(162, 155, 254, 0.25);
  box-shadow: inset 0 0 40px rgba(162, 155, 254, 0.04);
}
body.overlay-korea h1,
body.overlay-korea h2,
body.overlay-korea h3,
body.overlay-korea .hero-title,
body.overlay-korea .ai-cp-title {
  text-shadow: 0 0 10px rgba(162, 155, 254, 0.3);
  letter-spacing: -0.03em;
}
/* China Overlay — danmaku text, gacha glow, red accent */
body.overlay-china {
  --cultural-overlay: china;
  --stew-accent: #ff6b6b;
}
body.overlay-china #theme-bg-video {
  filter: saturate(1.1) contrast(1.04);
}
body.overlay-china .glass-panel,
body.overlay-china .glass-section,
body.overlay-china .ai-cp-header,
body.overlay-china .ai-panel-header {
  border-color: rgba(255, 107, 107, 0.25);
  box-shadow: inset 0 0 40px rgba(255, 107, 107, 0.04), 0 0 20px rgba(255, 107, 107, 0.08);
}
body.overlay-china h1,
body.overlay-china h2,
body.overlay-china h3,
body.overlay-china .hero-title,
body.overlay-china .ai-cp-title {
  text-shadow: 0 0 14px rgba(255, 107, 107, 0.35), 0 0 4px rgba(255, 215, 0, 0.15);
}
body.overlay-china .btn-neon,
body.overlay-china .ai-cp-generate-btn,
body.overlay-china .ai-generate-btn {
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.25);
}

/* Danmaku floating text layer (China) */
body.overlay-china .danmaku-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
body.overlay-china .danmaku-line {
  position: absolute;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 0 6px rgba(255, 107, 107, 0.6);
  animation: danmaku-slide 8s linear infinite;
}
@keyframes danmaku-slide {
  from { transform: translateX(110vw); }
  to   { transform: translateX(-110vw); }
}

/* Multi-overlay stacking: up to 2 overlays at once */
body.overlay-japan.overlay-korea {
  --stew-accent: #d48bc4;
}
body.overlay-japan.overlay-china {
  --stew-accent: #ff8a8a;
}
body.overlay-korea.overlay-china {
  --stew-accent: #d48a9e;
}

/* Global Stew toggle button styling */
.ai-stew-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.ai-stew-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.3rem 0.2rem;
  font-size: 0.6rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.ai-stew-btn:hover {
  border-color: var(--stew-accent, rgba(255, 255, 255, 0.2));
  background: rgba(255, 255, 255, 0.07);
}
.ai-stew-btn.active {
  border-color: var(--stew-accent, var(--neon));
  background: rgba(0, 255, 159, 0.08);
  color: var(--neon);
  box-shadow: 0 0 8px rgba(0, 255, 159, 0.1);
}
.ai-stew-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  color: var(--text-dim);
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.15s;
}
.ai-stew-toggle:hover {
  border-color: rgba(0, 255, 159, 0.2);
}
.ai-stew-toggle input[type="checkbox"] {
  accent-color: var(--neon);
  width: 12px;
  height: 12px;
}

/* ═══════════════════════════════════════════
   STORY VIEWER — GROK IMAGINE AGENT BETA
   Full-screen immersive glassmorphism modal
   ═══════════════════════════════════════════ */

#story-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  animation: svFadeIn 0.35s ease;
}

@keyframes svFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#sv-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(5, 5, 12, 0.96) 0%, rgba(2, 2, 6, 0.98) 100%);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}

/* Breathing neon glow ring behind container */
#sv-glow-ring {
  position: absolute;
  inset: 2rem;
  border-radius: 28px;
  border: 1px solid rgba(0, 255, 159, 0.08);
  box-shadow:
    0 0 80px rgba(0, 255, 159, 0.06),
    0 0 160px rgba(0, 255, 159, 0.03),
    inset 0 0 80px rgba(0, 255, 159, 0.02);
  animation: svBreathe 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes svBreathe {
  0%, 100% {
    box-shadow:
      0 0 60px rgba(0, 255, 159, 0.04),
      0 0 120px rgba(0, 255, 159, 0.02),
      inset 0 0 60px rgba(0, 255, 159, 0.015);
    border-color: rgba(0, 255, 159, 0.06);
  }
  50% {
    box-shadow:
      0 0 100px rgba(0, 255, 159, 0.10),
      0 0 200px rgba(0, 255, 159, 0.05),
      inset 0 0 100px rgba(0, 255, 159, 0.03);
    border-color: rgba(0, 255, 159, 0.14);
  }
}

#sv-container {
  position: relative;
  width: 96vw;
  max-width: 1400px;
  height: 94vh;
  max-height: 900px;
  background: rgba(8, 8, 16, 0.72);
  border: 1px solid rgba(0, 255, 159, 0.18);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 0 80px rgba(0, 255, 159, 0.06),
    0 0 160px rgba(0, 255, 159, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── Header ── */
#sv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(0, 255, 159, 0.08);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
}

#sv-title {
  color: #00FF9F;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 24px rgba(0, 255, 159, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

#sv-header-right {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.sv-icon-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #777;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.23,1,0.32,1);
}

.sv-icon-btn:hover {
  background: rgba(0, 255, 159, 0.1);
  border-color: rgba(0, 255, 159, 0.4);
  color: #00FF9F;
  box-shadow: 0 0 14px rgba(0, 255, 159, 0.15);
  transform: translateY(-1px);
}

.sv-close-x:hover {
  background: rgba(255, 0, 170, 0.12) !important;
  border-color: rgba(255, 0, 170, 0.4) !important;
  color: #FF00AA !important;
  box-shadow: 0 0 14px rgba(255, 0, 170, 0.15) !important;
}

/* ── Stage ── */
#sv-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, transparent 70%);
}

.sv-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.23,1,0.32,1);
  padding: 2rem;
}

.sv-slide.sv-slide-active {
  opacity: 1;
  z-index: 2;
}

.sv-slide img,
.sv-slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0, 255, 159, 0.06);
}

.sv-slide video {
  background: #000;
}

.sv-slide.sv-glitch img,
.sv-slide.sv-glitch video {
  animation: svImgGlitch 0.35s ease;
}

@keyframes svImgGlitch {
  0% { transform: translate(0); filter: brightness(1); }
  20% { transform: translate(-3px, 2px); filter: brightness(1.3) hue-rotate(10deg); }
  40% { transform: translate(3px, -2px); filter: brightness(0.8) hue-rotate(-10deg); }
  60% { transform: translate(-2px, 0); filter: brightness(1.2) hue-rotate(5deg); }
  80% { transform: translate(2px, 1px); filter: brightness(0.9) hue-rotate(-5deg); }
  100% { transform: translate(0); filter: brightness(1); }
}

#sv-loading {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #00FF9F;
  font-size: 0.9rem;
  opacity: 0.7;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.sv-spinner {
  width: 40px;
  height: 40px;
  border: 2.5px solid rgba(0, 255, 159, 0.12);
  border-top-color: #00FF9F;
  border-radius: 50%;
  animation: svSpin 0.9s linear infinite;
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.2);
}

@keyframes svSpin {
  to { transform: rotate(360deg); }
}

#sv-panel-label {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 159, 0.15);
  color: #00FF9F;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 5;
}

/* ── Controls ── */
#sv-controls {
  padding: 1rem 2rem 1.25rem;
  border-top: 1px solid rgba(0, 255, 159, 0.08);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
}

#sv-progress-wrap {
  margin-bottom: 0.85rem;
}

#sv-progress-track {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: height 0.2s ease, background 0.2s ease;
}

#sv-progress-track:hover {
  height: 7px;
  background: rgba(255,255,255,0.1);
}

#sv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00FF9F, #00E5FF);
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.23,1,0.32,1);
  box-shadow: 0 0 10px rgba(0, 255, 159, 0.35);
}

#sv-progress-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #00FF9F;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px rgba(0, 255, 159, 0.6), 0 0 28px rgba(0, 255, 159, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

#sv-progress-track:hover #sv-progress-thumb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

#sv-buttons {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: center;
}

.sv-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #aaa;
  width: 44px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.23,1,0.32,1);
  font-size: 0.9rem;
}

.sv-btn:hover:not(:disabled) {
  background: rgba(0, 255, 159, 0.1);
  border-color: rgba(0, 255, 159, 0.35);
  color: #00FF9F;
  box-shadow: 0 0 14px rgba(0, 255, 159, 0.12);
  transform: translateY(-1px);
}

.sv-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
  transition-duration: 0.06s;
}

.sv-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

.sv-btn-primary {
  width: 52px;
  height: 44px;
  background: rgba(0, 255, 159, 0.1);
  border-color: rgba(0, 255, 159, 0.25);
  color: #00FF9F;
}

.sv-btn-primary:hover {
  background: rgba(0, 255, 159, 0.22);
  border-color: #00FF9F;
  box-shadow: 0 0 20px rgba(0, 255, 159, 0.2);
}

#sv-speed-group {
  position: relative;
  margin-left: 0.6rem;
}

.sv-speed-label {
  width: auto;
  padding: 0 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

#sv-speed-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 20, 0.98);
  border: 1px solid rgba(0, 255, 159, 0.2);
  border-radius: 12px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 0 40px rgba(0, 255, 159, 0.08);
  z-index: 10;
  transition: opacity 0.18s ease, transform 0.18s ease;
  min-width: 80px;
}

#sv-speed-menu button {
  background: none;
  border: none;
  color: #888;
  padding: 0.45rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.15s ease;
  text-align: center;
}

#sv-speed-menu button:hover {
  background: rgba(0, 255, 159, 0.08);
  color: #00FF9F;
}

.sv-speed-active {
  color: #00FF9F !important;
  background: rgba(0, 255, 159, 0.1) !important;
}

.sv-speed-menu-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(6px) !important;
}

#sv-page-info {
  text-align: center;
  color: rgba(255,255,255,0.18);
  font-size: 0.72rem;
  padding: 0.5rem 0 0.1rem;
  letter-spacing: 0.8px;
  font-weight: 500;
  flex-shrink: 0;
}

#sv-page-num {
  color: #00FF9F;
  font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  #sv-container {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
  }
  #sv-glow-ring {
    display: none;
  }
  #sv-header {
    padding: 0.75rem 1rem;
  }
  #sv-title {
    font-size: 0.85rem;
    max-width: 50%;
  }
  .sv-slide {
    padding: 0.5rem;
  }
  #sv-controls {
    padding: 0.75rem 1rem 1rem;
  }
}

/* ── View Story Button ── */
.view-story-btn {
  background: rgba(0, 255, 159, 0.08);
  border: 1px solid rgba(0, 255, 159, 0.25);
  color: #00FF9F;
  padding: 0.45rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.23,1,0.32,1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.view-story-btn:hover {
  background: rgba(0, 255, 159, 0.18);
  border-color: #00FF9F;
  box-shadow: 0 0 16px rgba(0, 255, 159, 0.2);
  transform: translateY(-1px);
}

.view-story-btn svg {
  width: 14px;
  height: 14px;
}

/* ── View Story Button — hover overlay variant ── */
.trending-card .view-story-btn {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.trending-card .view-story-btn:hover {
  background: rgba(0, 255, 159, 0.18);
}

/* ── REMIX VIEWER — THUMBNAILS & ACTIONS ── */
#sv-remix-bar {
  animation: svRemixFadeIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes svRemixFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

#sv-thumbnails {
  scrollbar-width: thin;
  scrollbar-color: #00FF9F transparent;
}
#sv-thumbnails::-webkit-scrollbar {
  height: 4px;
}
#sv-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}
#sv-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 159, 0.3);
  border-radius: 2px;
}

.sv-thumb {
  flex: 0 0 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid rgba(0, 255, 159, 0.12);
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.sv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.sv-thumb:hover {
  border-color: rgba(0, 255, 159, 0.5);
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.15);
  transform: translateY(-2px);
}

.sv-thumb:hover img {
  transform: scale(1.08);
}

.sv-thumb-selected {
  border-color: #00FF9F !important;
  box-shadow: 0 0 18px rgba(0, 255, 159, 0.35), inset 0 0 12px rgba(0, 255, 159, 0.1);
}

.sv-thumb-selected::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: #00FF9F;
  color: #000;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0, 255, 159, 0.5);
}

.sv-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #00FF9F;
  font-size: 0.6rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(4px);
}

.sv-remix-btn {
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(0, 255, 159, 0.25);
  background: rgba(0, 255, 159, 0.08);
  color: #00FF9F;
  letter-spacing: 0.4px;
  backdrop-filter: blur(8px);
}

.sv-remix-btn:hover {
  background: rgba(0, 255, 159, 0.18);
  border-color: #00FF9F;
  box-shadow: 0 0 18px rgba(0, 255, 159, 0.2);
  transform: translateY(-1px);
}

.sv-remix-btn:active {
  transform: translateY(0) scale(0.98);
}

.sv-remix-btn-primary {
  background: rgba(0, 255, 159, 0.18);
  border-color: rgba(0, 255, 159, 0.5);
  color: #00FF9F;
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.1);
}

.sv-remix-btn-primary:hover {
  background: rgba(0, 255, 159, 0.3);
  border-color: #00FF9F;
  box-shadow: 0 0 24px rgba(0, 255, 159, 0.35);
}

/* ── COMIC TITLE INPUT ── */
#comic-title-input::placeholder {
  color: rgba(0, 255, 159, 0.4);
  font-weight: 400;
}

/* ── COLOR PICKER STYLING ── */
input[type="color"] {
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

/* ── FX TOGGLE CHECKBOXES ── */
.fx-toggle input[type="checkbox"] {
  accent-color: #00FF9F;
  cursor: pointer;
}

/* ── FONT DROPDOWN OPTGROUP ── */
select optgroup {
  font-weight: 700;
  color: #00FF9F;
  background: #0a0a0f;
  padding: 0.2rem 0;
}
select option {
  color: #00FF9F;
  background: #0a0a0f;
  padding: 0.15rem 0.4rem;
}

/* ── PREMIUM FONT SELECT ── */
select.font-select-premium {
  width: 100%;
  padding: 0.45rem;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #00FF9F;
  color: #00FF9F;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300FF9F' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 10px;
  box-shadow: 0 0 8px rgba(0, 255, 159, 0.15), inset 0 0 12px rgba(0, 255, 159, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}
select.font-select-premium:focus {
  outline: none;
  border-color: #00FF9F;
  box-shadow: 0 0 16px rgba(0, 255, 159, 0.35), inset 0 0 12px rgba(0, 255, 159, 0.08);
}
select.font-select-premium optgroup {
  font-weight: 700;
  color: #00FF9F;
  background: #0d0d14;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.4rem;
}
select.font-select-premium option {
  color: #e0e0e0;
  background: #0d0d14;
  padding: 0.3rem 0.5rem;
  font-weight: 400;
  font-size: 0.85rem;
}
select.font-select-premium option:checked {
  color: #00FF9F;
  background: rgba(0, 255, 159, 0.12);
}
select.font-select-premium option:hover {
  background: rgba(0, 255, 159, 0.08);
}
select.font-select-premium::-webkit-scrollbar {
  width: 6px;
}
select.font-select-premium::-webkit-scrollbar-track {
  background: #0d0d14;
}
select.font-select-premium::-webkit-scrollbar-thumb {
  background: #00FF9F;
  border-radius: 3px;
}

/* ── PANEL EFFECTS GLITCH ANIMATION ── */
@keyframes panelGlitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 0); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

/* ── PROFILE MODAL ── */
.profile-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(2,2,6,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  animation: msFadeIn 0.25s ease;
}
.profile-modal-box {
  background: rgba(10,10,18,0.92);
  border: 1px solid rgba(0,255,159,0.25);
  border-radius: 20px;
  padding: 2rem;
  max-width: 420px;
  width: 90vw;
  box-shadow: 0 0 60px rgba(0,255,159,0.06);
}
.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.profile-modal-title {
  color: #00FF9F;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.3px;
}
.profile-modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.profile-avatar-section {
  text-align: center;
  margin-bottom: 1.5rem;
}
.profile-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #00FF9F;
  margin: 0 auto 0.75rem;
  background: rgba(0,0,0,0.4);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,255,159,0.15);
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-upload-btn {
  background: rgba(0,255,159,0.1);
  border: 1px solid rgba(0,255,159,0.3);
  color: #00FF9F;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
}
.profile-field {
  margin-bottom: 1rem;
}
.profile-label {
  color: #00FF9F;
  font-size: 0.7rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}
.profile-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,159,0.3);
  color: #00FF9F;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.profile-input:focus {
  border-color: #00FF9F;
}
.profile-input-readonly {
  flex: 1;
  padding: 0.65rem 0.75rem;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  color: #888;
  border-radius: 8px;
  font-size: 0.78rem;
  font-family: 'SF Mono', monospace;
  box-sizing: border-box;
}
.profile-btn-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.profile-btn {
  background: rgba(0,255,159,0.1);
  border: 1px solid rgba(0,255,159,0.3);
  color: #00FF9F;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.7rem;
  font-family: inherit;
  white-space: nowrap;
}
.profile-btn-disconnect {
  background: rgba(255,0,100,0.1);
  border-color: rgba(255,0,100,0.3);
  color: #FF0064;
}
.profile-addr-connected {
  color: #00FF9F !important;
}
.is-hidden {
  display: none !important;
}
.profile-save-btn {
  width: 100%;
  padding: 0.7rem;
  background: linear-gradient(135deg, rgba(0,255,159,0.2), rgba(0,229,255,0.1));
  border: 1px solid #00FF9F;
  color: #00FF9F;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.2s;
}
.profile-save-btn:hover {
  box-shadow: 0 0 20px rgba(0,255,159,0.2);
}

/* ── PORTFOLIO MODAL ── */
.portfolio-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10003;
  background: rgba(2,2,6,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  animation: msFadeIn 0.3s ease;
}
.portfolio-modal-box {
  background: rgba(10,10,18,0.94);
  border: 1px solid rgba(0,255,159,0.2);
  border-radius: 24px;
  padding: 1.5rem;
  max-width: 900px;
  width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 80px rgba(0,255,159,0.05);
}
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.portfolio-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.portfolio-title {
  color: #00FF9F;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.3px;
}
.portfolio-close {
  background: none;
  border: none;
  color: #666;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.portfolio-wallet-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,255,159,0.1);
  border-radius: 10px;
  margin-bottom: 1rem;
  flex-shrink: 0;
  font-size: 0.72rem;
}
.portfolio-wallet-label {
  color: #888;
}
.portfolio-wallet-addr {
  color: #ccc;
  font-family: 'SF Mono', monospace;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portfolio-network-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  border: 1px solid;
  display: none;
}
.portfolio-wallet-copy {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
}
.portfolio-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}
.pf-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #666;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.pf-tab.active {
  background: rgba(0,255,159,0.12);
  border-color: #00FF9F;
  color: #00FF9F;
}
.portfolio-content {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.85rem;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.portfolio-empty {
  text-align: center;
  padding: 2rem;
  color: #666;
}
.portfolio-empty-icon {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.portfolio-empty-sub {
  font-size: 0.75rem;
  margin-top: 0.3rem;
  color: #666;
}
.portfolio-connect-btn {
  margin-top: 1rem;
  background: rgba(0,255,159,0.12);
  border: 1px solid #00FF9F;
  color: #00FF9F;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

/* ── PORTFOLIO NFT CARDS ── */
.pf-card {
  background: rgba(10,10,18,0.6);
  border: 1px solid rgba(0,255,159,0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pf-card:hover {
  border-color: rgba(0,255,159,0.3);
  box-shadow: 0 0 24px rgba(0,255,159,0.06);
}
.pf-card-thumb {
  background: linear-gradient(135deg, rgba(0,255,159,0.08), rgba(0,229,255,0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.pf-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pf-card-body {
  padding: 0.65rem;
}
.pf-card-title {
  color: #e0e0e0;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-card-tid {
  font-size: 0.6rem;
  color: #555;
  word-break: break-all;
  font-family: 'SF Mono', monospace;
}
.pf-card-links {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.pf-card-link {
  color: #00FF9F;
  font-size: 0.65rem;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.pf-card-link:hover {
  opacity: 1;
  text-decoration: underline;
}
.pf-card-row {
  flex-direction: row;
  padding: 0.75rem 1rem;
}
.pf-card-row .pf-card-body {
  flex: 1;
}
.pf-card-explorer {
  color: #666;
  font-size: 0.65rem;
  text-decoration: none;
  white-space: nowrap;
}

/* ── PORTFOLIO STATS ── */
.pf-stat {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,255,159,0.08);
  border-radius: 12px;
  padding: 1rem 0.75rem;
  text-align: center;
}
.pf-stat-num {
  display: block;
  color: #00FF9F;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -1px;
}
.pf-stat-label {
  display: block;
  color: #666;
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

/* ── PORTFOLIO ROYALTIES ── */
.portfolio-royalties {
  text-align: center;
  padding: 2rem;
}
.portfolio-xrp-earned {
  font-size: 2.5rem;
  color: #FFD700;
  font-weight: 900;
  letter-spacing: -1px;
}
.portfolio-xrp-label {
  color: #00FF9F;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.portfolio-lifetime {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(0,255,159,0.08);
}
.portfolio-lifetime-num {
  font-size: 3rem;
  color: #FFD700;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  text-shadow: 0 0 30px rgba(255,215,0,0.15);
  position: relative;
  display: inline-block;
}
.portfolio-lifetime-num::after {
  content: '✦';
  position: absolute;
  top: -0.3rem;
  right: -1.5rem;
  font-size: 0.8rem;
  color: #00FF9F;
  opacity: 0.5;
  animation: sparkle 2s ease-in-out infinite;
}
.portfolio-lifetime-label {
  color: #00FF9F;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-top: 0.3rem;
  opacity: 0.7;
  text-transform: uppercase;
}
.portfolio-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ── ONBOARDING STARTER MODAL ── */
.onboarding-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100004;
  background: rgba(2,2,6,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  animation: msFadeIn 0.35s ease;
}
.onboarding-modal-box {
  background: rgba(10,10,18,0.95);
  border: 1px solid rgba(0,255,159,0.2);
  border-radius: 24px;
  padding: 2rem;
  max-width: 720px;
  width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 0 80px rgba(0,255,159,0.06);
}
.onboarding-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.onboarding-modal-title {
  color: #00FF9F;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}
.onboarding-modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.onboarding-modal-sub {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.onboarding-card {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,255,159,0.08);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}
.onboarding-card:hover {
  border-color: rgba(0,255,159,0.4);
  box-shadow: 0 0 30px rgba(0,255,159,0.08);
  transform: translateY(-2px);
  background: rgba(0,0,0,0.6);
}
.onboarding-card-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.onboarding-card-title {
  color: #00FF9F;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.onboarding-card-desc {
  color: #888;
  font-size: 0.68rem;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}
.onboarding-card-pages {
  color: #555;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.onboarding-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.onboarding-magic-btn {
  background: linear-gradient(135deg, rgba(0,255,159,0.2), rgba(0,229,255,0.1));
  border: 1px solid #00FF9F;
  color: #00FF9F;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.2s;
}
.onboarding-magic-btn:hover {
  box-shadow: 0 0 24px rgba(0,255,159,0.25);
  transform: translateY(-1px);
}

/* ── MAGIC SEED MODAL ── */
.magic-seed-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100005;
  background: rgba(2,2,6,0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  animation: msFadeIn 0.35s ease;
}
.magic-seed-modal-box {
  background: rgba(10,10,18,0.96);
  border: 1px solid rgba(0,255,159,0.2);
  border-radius: 24px;
  padding: 2rem;
  max-width: 520px;
  width: 90vw;
  box-shadow: 0 0 80px rgba(0,255,159,0.06);
}
.magic-seed-sub {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.magic-seed-input {
  width: 100%;
  padding: 0.85rem;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(0,255,159,0.25);
  color: #00FF9F;
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.magic-seed-input:focus {
  border-color: #00FF9F;
  box-shadow: 0 0 16px rgba(0,255,159,0.1);
}
.magic-seed-input::placeholder {
  color: #555;
}
.magic-seed-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: flex-end;
}
.magic-seed-generate-btn {
  background: linear-gradient(135deg, rgba(0,255,159,0.2), rgba(0,229,255,0.1));
  border: 1px solid #00FF9F;
  color: #00FF9F;
  padding: 0.6rem 1.3rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.2s;
}
.magic-seed-generate-btn:hover {
  box-shadow: 0 0 24px rgba(0,255,159,0.25);
}
.magic-seed-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  color: #00FF9F;
  font-size: 0.8rem;
  justify-content: center;
}

/* ── HOT REMIXES ── */
#hot-remixes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.hot-remix-card {
  background: rgba(10,10,18,0.8);
  border: 1px solid rgba(0,255,159,0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.hot-remix-card:hover {
  border-color: rgba(0,255,159,0.25);
  box-shadow: 0 0 30px rgba(0,255,159,0.06);
  transform: translateY(-2px);
}
.hot-remix-imgwrap {
  position: relative;
  overflow: hidden;
}
.hot-remix-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.hot-remix-card:hover .hot-remix-img {
  transform: scale(1.05);
}
.hot-remix-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hot-remix-card:hover .hot-remix-overlay {
  opacity: 1;
}
.hot-remix-body {
  padding: 0.65rem;
}
.hot-remix-title {
  color: #e0e0e0;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.hot-remix-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hot-remix-count {
  color: #FF6B35;
  font-size: 0.7rem;
  font-weight: 700;
}
.hot-remix-creator {
  color: #555;
  font-size: 0.65rem;
}

/* ── INSPIRED BY CHAIN ── */
.inspired-by-chain {
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(0,0,0,0.3);
  border-radius: 16px;
  border: 1px solid rgba(0,255,159,0.06);
}
.inspired-by-label {
  color: #00FF9F;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}
.inspired-by-avatars {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.inspired-by-avatars::-webkit-scrollbar {
  height: 3px;
}
.inspired-by-avatars::-webkit-scrollbar-thumb {
  background: #00FF9F;
  border-radius: 2px;
}

/* ── CONTEXTUAL SUGGESTIONS ── */
.contextual-suggestions {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9995;
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(10,10,18,0.92);
  border: 1px solid rgba(0,255,159,0.2);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 30px rgba(0,255,159,0.06);
  align-items: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.contextual-suggestions:active {
  cursor: grabbing;
}

.contextual-suggestion-btn {
  white-space: nowrap;
}

/* ── STREAK TOAST ── */
.streak-toast {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 100006;
  animation: msFadeIn 0.4s ease;
}
.streak-toast-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(10,10,18,0.94);
  border: 1px solid rgba(0,255,159,0.25);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 40px rgba(0,255,159,0.08);
}
.streak-toast-icon {
  font-size: 1.5rem;
}
.streak-toast-text {
  color: #00FF9F;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ── REMIX CHAIN IN VIEWER ── */
.sv-remix-chain {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: #00FF9F transparent;
  align-items: center;
}
.sv-remix-chain::-webkit-scrollbar {
  height: 3px;
}
.sv-remix-chain::-webkit-scrollbar-thumb {
  background: #00FF9F;
  border-radius: 2px;
}
.sv-remix-chain-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.sv-remix-chain-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #00FF9F;
  object-fit: cover;
  flex-shrink: 0;
}
.sv-remix-chain-arrow {
  color: #00FF9F;
  font-size: 1.2rem;
  opacity: 0.5;
  flex-shrink: 0;
}
.sv-remix-chain-label {
  color: #888;
  font-size: 0.6rem;
  white-space: nowrap;
}
.sv-remix-chain-name {
  color: #00FF9F;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── SHARE CARD GENERATION ── */
@keyframes msFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* ── ACHIEVEMENT BADGES ── */
.achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  background: rgba(0,255,159,0.08);
  border: 1px solid rgba(0,255,159,0.2);
  border-radius: 999px;
  font-size: 0.6rem;
  color: #00FF9F;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── STREAK NEON FLAME ANIMATION ── */
.streak-toast-inner {
  animation: streakPulse 1.6s ease-in-out infinite;
}
@keyframes streakPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0,255,159,0.2), 0 0 20px rgba(0,255,159,0.1); }
  50% { box-shadow: 0 0 30px rgba(0,255,159,0.5), 0 0 60px rgba(0,255,159,0.25), 0 0 100px rgba(0,255,159,0.1); }
}
.streak-toast-icon {
  display: inline-block;
  animation: flameDance 0.9s ease-in-out infinite;
}
@keyframes flameDance {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  15% { transform: scale(1.2) rotate(-6deg); opacity: 0.85; }
  30% { transform: scale(0.95) rotate(4deg); opacity: 1; }
  45% { transform: scale(1.15) rotate(-3deg); opacity: 0.9; }
  60% { transform: scale(1.0) rotate(2deg); opacity: 1; }
  75% { transform: scale(1.1) rotate(-4deg); opacity: 0.95; }
}

/* ── REMIX THIS PANEL BUTTON ── */
.sv-remix-panel-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(0,255,159,0.12);
  border: 1px solid #00FF9F;
  color: #00FF9F;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.7rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  opacity: 0.7;
}
.sv-remix-panel-btn:hover {
  opacity: 1;
  background: rgba(0,255,159,0.2);
  box-shadow: 0 0 20px rgba(0,255,159,0.15);
}

/* ── ROYALTY TIMELINE CHART ── */
#royalty-timeline-chart {
  width: 100%;
  height: 120px;
  margin-top: 1rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
}

/* ── SPINNER OVERRIDE FOR MAGIC SEED ── */
.magic-seed-progress .sv-spinner {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

/* ── ENHANCED ONBOARDING CARD HOVER ── */
.onboarding-card {
  position: relative;
  overflow: hidden;
}
.onboarding-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(0,255,159,0.03) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.onboarding-card:hover::after {
  opacity: 1;
}

/* ── ENHANCED MAGIC SEED ── */
.magic-seed-input {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.magic-seed-input:focus {
  border-color: #00FF9F;
  box-shadow: 0 0 20px rgba(0,255,159,0.12), inset 0 0 20px rgba(0,255,159,0.03);
}

/* ── POST TO X BUTTON ── */
.btn-x {
  background: rgba(0,255,159,0.12);
  border-color: #00FF9F;
  position: relative;
  overflow: hidden;
}
.btn-x::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(0,255,159,0.05), transparent, rgba(0,255,159,0.05), transparent);
  animation: xSpin 3s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-x:hover::before {
  opacity: 1;
}
@keyframes xSpin {
  to { transform: rotate(360deg); }
}

/* ── PORTFOLIO ENHANCEMENTS ── */
.portfolio-xrp-earned {
  position: relative;
  display: inline-block;
}
.portfolio-xrp-earned::after {
  content: '✦';
  position: absolute;
  top: -0.5rem;
  right: -1.5rem;
  font-size: 0.8rem;
  color: #00FF9F;
  opacity: 0.5;
  animation: sparkle 2s ease-in-out infinite;
}
@keyframes sparkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ── CANVAS BOUNDS & EXPORT SYSTEM ── */
.export-preview-wrap {
  background: rgba(6,6,14,0.96);
  border: 1px solid rgba(0,255,159,0.2);
  border-radius: 20px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0,255,159,0.08), 0 0 0 1px rgba(0,255,159,0.06);
}

.export-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0,255,159,0.12);
}

.export-preview-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  min-height: 200px;
  background: repeating-conic-gradient(rgba(0,255,159,0.02) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
}

.export-preview-img {
  max-width: 100%;
  max-height: 55vh;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,255,159,0.06);
  image-rendering: auto;
}

.export-preview-badge {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(0,255,159,0.12);
  backdrop-filter: blur(8px);
  color: #00FF9F;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(0,255,159,0.2);
}

.export-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0,255,159,0.12);
}

/* Export mode select hover glow */
#export-mode-select:hover {
  border-color: rgba(0,255,159,0.6);
  box-shadow: 0 0 12px rgba(0,255,159,0.1);
}

#export-mode-select option {
  background: #0a0a0f;
  color: #00FF9F;
}

/* Page Bounds button active state */
#page-bounds-btn.active,
#snap-to-page-btn.active {
  background: rgba(0,255,159,0.25);
  box-shadow: inset 0 0 12px rgba(0,255,159,0.1);
}

/* Auto-Fit button pulse */
#auto-fit-btn {
  animation: autoFitPulse 1.2s ease-in-out infinite;
}
@keyframes autoFitPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(255,68,0,0.3); }
  50% { box-shadow: 0 0 16px rgba(255,68,0,0.6); }
}

/* ── EMBEDDABLE REMIX BUTTON (for xrp.cafe, marketplaces) ── */
.neet-remix-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  background: rgba(0, 255, 159, 0.12);
  border: 1px solid #00FF9F;
  color: #00FF9F;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.15);
}
.neet-remix-btn:hover {
  background: rgba(0, 255, 159, 0.22);
  box-shadow: 0 0 24px rgba(0, 255, 159, 0.3), 0 0 48px rgba(0, 255, 159, 0.1);
  transform: translateY(-1px);
}
.neet-remix-btn:active { transform: scale(0.96); transition-duration: 0.06s; }
.neet-remix-btn:focus-visible { outline: 2px solid #00FF9F; outline-offset: 3px; }
.neet-remix-btn.sm { font-size: 0.7rem; padding: 0.3rem 0.7rem; }
.neet-remix-btn.lg { font-size: 1rem; padding: 0.6rem 1.4rem; }

/* ── GALLERY PAGE STYLES ── */
.gallery-hero { position: relative; overflow: hidden; }
.gallery-hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,255,159,0.05) 0%, rgba(255,0,170,0.03) 50%, rgba(0,229,255,0.03) 100%); }
.gallery-hero-glow { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(0,255,159,0.08) 0%, transparent 70%); filter: blur(60px); pointer-events: none; }

.gallery-tabs {
  display: flex; gap: 0.5rem; padding: 0.5rem;
  background: rgba(0,0,0,0.3); border-radius: 12px;
  border: 1px solid rgba(0,255,159,0.1); flex-wrap: wrap;
}
.gallery-tab {
  padding: 0.5rem 1rem; border-radius: 10px; font-size: 0.8rem;
  font-weight: 600; font-family: 'Inter', sans-serif;
  background: transparent; border: 1px solid transparent;
  color: #888; cursor: pointer; transition: all 0.22s cubic-bezier(0.23, 1, 0.32, 1);
  letter-spacing: 0.3px; user-select: none;
}
.gallery-tab:hover { color: #00FF9F; background: rgba(0,255,159,0.08); backdrop-filter: blur(4px); }
.gallery-tab.active {
  background: rgba(0,255,159,0.12); border-color: rgba(0,255,159,0.35);
  color: #00FF9F; box-shadow: 0 0 16px rgba(0,255,159,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}

.gallery-sort {
  appearance: none; -webkit-appearance: none;
  background: rgba(0,0,0,0.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300FF9F' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
  border: 1px solid rgba(0,255,159,0.25); color: #00FF9F;
  padding: 0.4rem 1.5rem 0.4rem 0.8rem; border-radius: 10px;
  font-size: 0.78rem; font-family: 'Inter', sans-serif;
  cursor: pointer; outline: none; transition: all 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}
.gallery-sort:hover { border-color: rgba(0,255,159,0.5); box-shadow: 0 0 12px rgba(0,255,159,0.15); }
.gallery-sort option { background: #0a0a0f; color: #ddd; }

.gallery-stats {
  display: flex; gap: 1.5rem; padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.25); border-radius: 10px;
  border: 1px solid rgba(0,255,159,0.08); flex-wrap: wrap;
}
.gallery-stat { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: #888; }
.gallery-stat-val { color: #00FF9F; font-weight: 700; }

.comic-card {
  background: var(--surface-raised);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease,
              border-color 0.25s ease;
  cursor: pointer;
  will-change: transform;
}
.comic-card:hover {
  border-color: hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.3);
  box-shadow: 0 0 24px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.12), 0 8px 32px rgba(0,0,0,0.5);
  transform: translateY(-4px) scale(1.01);
}
.comic-card:active {
  transform: translateY(-2px) scale(0.99);
  transition-duration: 0.05s;
}
.comic-card .thumb-wrap { position: relative; overflow: hidden; aspect-ratio: 3/4; background: rgba(0,0,0,0.3); }
.comic-card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.comic-card:hover .thumb-wrap img { transform: scale(1.06); }
.comic-card .thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s ease;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem;
}
.comic-card:hover .thumb-overlay { opacity: 1; }
.comic-card .card-body { padding: 0.85rem 1rem; }
.comic-card .card-title {
  color: #e0e0e0; font-size: 0.9rem; font-weight: 700;
  line-height: 1.3; margin-bottom: 0.25rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.comic-card .card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; color: #666; }
.comic-card .card-meta .stat { display: flex; align-items: center; gap: 0.25rem; color: #888; }
.comic-card .card-meta .stat .val { color: var(--neon-bright); font-weight: 600; }

.remix-card-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.35rem 0.8rem; border-radius: 8px; font-size: 0.72rem;
  font-weight: 700; font-family: 'Inter', sans-serif;
  background: hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.08);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.25);
  color: var(--neon-bright); cursor: pointer; text-decoration: none;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              border-color 0.2s ease,
              background 0.2s ease;
  backdrop-filter: blur(8px);
  will-change: transform;
}
.remix-card-btn:hover { background: hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.15); border-color: var(--neon-bright); box-shadow: 0 0 16px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.18); transform: translateY(-1px); }
.remix-card-btn:active { transform: scale(0.97); transition-duration: 0.05s; }

.load-more-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 1rem; border-radius: 12px;
  background: rgba(0,255,159,0.05); border: 1px dashed rgba(0,255,159,0.25);
  color: #00FF9F; font-family: 'Inter', sans-serif; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; transition: all 0.2s ease; letter-spacing: 0.5px;
}
.load-more-btn:hover { background: rgba(0,255,159,0.1); border-style: solid; box-shadow: 0 0 20px rgba(0,255,159,0.1); }
.load-more-btn:active { transform: scale(0.98); }
.load-more-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.gallery-empty { text-align: center; padding: 4rem 2rem; color: #555; }
.gallery-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }

/* ── SCARCITY BADGE ── */
.scarcity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid;
}

.scarcity-unique {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.4);
  color: #FFD700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
}

.scarcity-rare {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.3);
  color: #FF6B6B;
}

.scarcity-limited {
  background: rgba(0, 255, 159, 0.1);
  border-color: rgba(0, 255, 159, 0.3);
  color: #00FF9F;
}

.scarcity-common {
  background: rgba(136, 136, 136, 0.1);
  border-color: rgba(136, 136, 136, 0.2);
  color: #888;
}

/* ── PREMIUM BADGE ── */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 170, 0, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #FFD700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.premium-badge-glow {
  animation: premiumGlow 2s ease-in-out infinite;
}

@keyframes premiumGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.15); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
}

/* ── EDITION NUMBER DISPLAY ── */
.edition-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'SF Mono', monospace;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 159, 0.2);
  color: #00FF9F;
}

.edition-number.rare-edition { border-color: rgba(255, 107, 107, 0.4); color: #FF6B6B; }
.edition-number.unique-edition { border-color: rgba(255, 215, 0, 0.5); color: #FFD700; }

/* ── ROYALTY BREAKDOWN ── */
.royalty-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 159, 0.06);
}

.royalty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.royalty-row .royalty-label { color: #888; }
.royalty-row .royalty-value { color: #00FF9F; font-weight: 600; font-family: 'SF Mono', monospace; }
.royalty-row .royalty-value.gold { color: #FFD700; }

.royalty-divider { border-top: 1px solid rgba(255,255,255,0.05); margin: 0.3rem 0; }

/* ── CARD SCARCITY OVERLAY ── */
.card-scarcity-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 5;
  font-size: 0.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.3px;
  backdrop-filter: blur(6px);
}

.card-scarcity-unique { background: rgba(255,215,0,0.2); border: 1px solid rgba(255,215,0,0.5); color: #FFD700; }
.card-scarcity-rare { background: rgba(255,107,107,0.15); border: 1px solid rgba(255,107,107,0.3); color: #FF6B6B; }
.card-scarcity-limited { background: rgba(0,255,159,0.12); border: 1px solid rgba(0,255,159,0.3); color: #00FF9F; }
.card-scarcity-common { background: rgba(136,136,136,0.12); border: 1px solid rgba(136,136,136,0.2); color: #999; }

.card-edition-label {
  position: absolute;
  bottom: 0.6rem;
  left: 0.6rem;
  z-index: 5;
  font-size: 0.58rem;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  font-family: 'SF Mono', monospace;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(0,255,159,0.2);
  color: #00FF9F;
  backdrop-filter: blur(4px);
}

/* ── MINT FEE SELECTOR ── */
.mint-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.mint-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(0,255,159,0.2);
  background: rgba(0,255,159,0.05);
  color: var(--text-dim);
}

.mint-option:hover {
  border-color: rgba(0,255,159,0.4);
  background: rgba(0,255,159,0.1);
  color: #00FF9F;
}

.mint-option.active {
  border-color: #00FF9F;
  background: rgba(0,255,159,0.15);
  color: #00FF9F;
  box-shadow: 0 0 10px rgba(0,255,159,0.15);
}

.mint-option .fee-amount { color: #FFD700; font-weight: 700; }

/* ── EDITION SIZE SELECTOR ── */
.edition-size-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(0,255,159,0.1);
  border-radius: 10px;
  margin: 0.75rem 0;
}

.edition-size-selector label {
  color: #888;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.edition-size-input {
  width: 80px;
  padding: 0.4rem 0.5rem;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,159,0.2);
  border-radius: 6px;
  color: #00FF9F;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'SF Mono', monospace;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

.edition-size-input:focus { border-color: #00FF9F; box-shadow: 0 0 8px rgba(0,255,159,0.15); }
.edition-size-input::-moz-focus-inner { border: 0; }

.edition-size-hint {
  color: #555;
  font-size: 0.65rem;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   EMBED VIEWER STYLES (Phase 3 — Embeddable NEETstuff Viewer)
   ═══════════════════════════════════════════════════════════ */

.neet-embed-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,255,159,0.06);
  border: 1px solid rgba(0,255,159,0.1);
  background: #06060c;
  position: relative;
}

.neet-embed-container iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: none;
  display: block;
  background: #06060c;
}

.neet-embed-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 16;
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  font-family: 'Inter', system-ui, sans-serif;
  background: #06060c;
}

.neet-embed-loader::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,255,159,0.15);
  border-top-color: #00FF9F;
  border-radius: 50%;
  animation: neetEmbedSpin 0.7s linear infinite;
  margin-right: 0.5rem;
}

@keyframes neetEmbedSpin {
  to { transform: rotate(360deg); }
}

.neet-embed-error {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 16;
  color: #FF4400;
  font-size: 0.8rem;
  font-family: 'Inter', system-ui, sans-serif;
  text-align: center;
  padding: 1rem;
}

.embed-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  background: rgba(0,255,159,0.1);
  border: 1px solid rgba(0,255,159,0.25);
  color: #00FF9F;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.embed-copy-btn:hover {
  background: rgba(0,255,159,0.2);
  border-color: rgba(0,255,159,0.4);
  box-shadow: 0 0 14px rgba(0,255,159,0.15);
}

@media (max-width: 768px) {
  .neet-embed-container { max-width: 100%; border-radius: 0; }
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; gap: 0.75rem !important; }
  .gallery-tabs { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   EDITOR COMPONENT STYLES — Theme-Aware
   ═══════════════════════════════════════════════════════════ */

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: var(--panel);
  border-bottom: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  overflow-x: auto;
  flex-shrink: 0;
  min-height: 44px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.4rem;
  border-right: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
}

.toolbar-group:last-child {
  border-right: none;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text, #ddd);
  cursor: pointer;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              border-color 0.15s ease,
              background 0.15s ease,
              color 0.15s ease;
  white-space: nowrap;
  will-change: transform;
}

.tool-btn:hover {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
  border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  color: var(--neon-bright, #00FF9F);
}

.tool-btn.active {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.4);
  color: var(--neon-bright, #00FF9F);
  box-shadow: 0 0 12px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
}

.tool-btn:active {
  transform: scale(0.94);
  transition-duration: 0.04s;
}

.tool-btn:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 1px;
}

/* ── Toolbar Dropdowns ── */
.toolbar-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.toolbar-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 255, 159, 0.28);
  border-radius: 10px;
  padding: 0.4rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 255, 159, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 9999;
  transform-origin: top left;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.toolbar-dropdown.hidden {
  opacity: 0;
  transform: translateY(-4px) scale(0.97);
  pointer-events: none;
  visibility: hidden;
}

.toolbar-dropdown:not(.hidden) {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.toolbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #ddd;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease, transform 0.08s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.toolbar-dropdown-item:hover {
  background: rgba(0, 255, 159, 0.09);
  color: #00FF9F;
  transform: translateX(2px);
}

.toolbar-dropdown-item:active {
  transform: translateX(2px) scale(0.98);
}

.toolbar-dropdown-item:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.toolbar-dropdown-item:disabled:hover {
  background: transparent;
  color: #888;
  transform: none;
}

.toolbar-dropdown-sep {
  height: 1px;
  margin: 0.35rem 0.5rem;
  background: rgba(0, 255, 159, 0.12);
}

.toolbar-dropdown-label {
  padding: 0.3rem 0.7rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(0, 255, 159, 0.5);
  pointer-events: none;
}

/* AI dropdown accent glow */
#ai-dropdown {
  border-color: rgba(0, 255, 159, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 255, 159, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Export dropdown cyan accent */
#export-dropdown {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 229, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Toolbar responsive */
@media (max-width: 1024px) {
  .toolbar-dropdown {
    min-width: 170px;
  }
  .toolbar-dropdown-item {
    font-size: 0.75rem;
    padding: 0.45rem 0.6rem;
  }
}

@media (max-width: 768px) {
  .toolbar-group {
    padding: 0 0.25rem;
    gap: 0.15rem;
  }
  .toolbar-dropdown {
    left: auto;
    right: 0;
    min-width: 160px;
    top: calc(100% + 4px);
  }
  .toolbar-dropdown-item {
    font-size: 0.72rem;
    padding: 0.4rem 0.55rem;
  }
}

.tool-btn .tool-icon {
  font-size: 1rem;
  line-height: 1;
}

.tool-btn .tool-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0.7;
}

.tool-btn.active .tool-label {
  opacity: 1;
}

/* ── Toolbar separator ── */
.toolbar-sep {
  width: 1px;
  height: 24px;
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  flex-shrink: 0;
}

/* ── Floating Properties Panel ── */
.floating-props {
  position: fixed;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  border-radius: var(--radius-lg, 16px);
  padding: 0.85rem;
  min-width: 240px;
  z-index: 10002;
  display: none;
  color: var(--text-body, #c8c8d0);
  font-size: 0.8rem;
  user-select: none;
  box-shadow: 0 0 40px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06), 0 8px 32px rgba(0,0,0,0.5);
}

.floating-props.active {
  display: block;
  animation: propsSlideIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes propsSlideIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.floating-props .fp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
  cursor: move;
}

.floating-props .fp-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-bright, #00FF9F);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.floating-props .fp-close {
  color: var(--text-muted, #666680);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  border-radius: 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.floating-props .fp-close:hover {
  color: var(--accent, #FF00AA);
  transform: rotate(90deg);
}

/* ── Properties Panel Rows ── */
.prop-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.prop-row label {
  color: var(--text-dim, #8888a0);
  font-size: 0.68rem;
  font-weight: 600;
  min-width: 44px;
  flex-shrink: 0;
}

.prop-row input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.prop-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--neon-bright, #00FF9F);
  cursor: pointer;
  box-shadow: 0 0 8px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.4);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.prop-row input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 14px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.6);
  transform: scale(1.1);
}

.prop-row input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(0.95);
}

.prop-row input[type="color"] {
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  border: 2px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.prop-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.prop-row input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.prop-value {
  font-size: 0.7rem;
  color: var(--neon-bright, #00FF9F);
  font-weight: 600;
  font-family: var(--font-mono);
  min-width: 28px;
  text-align: right;
}

/* ── Timeline ── */
.timeline-container {
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12) !important;
  background: var(--panel);
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
}

.timeline-track {
  transition: background 0.15s ease;
}

.timeline-track:hover {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.04) !important;
}

.timeline-ruler-label {
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.6rem;
  color: var(--text-dim, #8888a0);
}

.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--neon-bright, #00FF9F);
  box-shadow: 0 0 10px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.5);
  z-index: 5;
  pointer-events: none;
  transition: left 0.05s linear;
}

.timeline-playhead::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 10px;
  height: 10px;
  background: var(--neon-bright, #00FF9F);
  border-radius: 50%;
  box-shadow: 0 0 8px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.5);
}

/* ── Layer Panel Items ── */
.layer-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm, 6px);
  color: var(--text, #ddd);
  font-size: 0.75rem;
  cursor: pointer;
  transition: transform 0.12s ease,
              box-shadow 0.2s ease,
              border-color 0.15s ease,
              background 0.15s ease;
  will-change: transform;
  border: 1px solid transparent;
  user-select: none;
}

.layer-item:hover {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06);
  border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
}

.layer-item.active {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.25);
  box-shadow: 0 0 12px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
}

.layer-item:active {
  transform: scale(0.98);
  transition-duration: 0.04s;
}

.layer-item .layer-icon {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.layer-item .layer-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}

.layer-item .layer-vis-toggle,
.layer-item .layer-lock-toggle {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.6rem;
  color: var(--text-muted, #666680);
  transition: color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0;
}

.layer-item .layer-vis-toggle:hover,
.layer-item .layer-lock-toggle:hover {
  color: var(--text, #ddd);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
}

/* ── Sidebar Tabs ── */
.sidebar-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm, 6px);
  margin-bottom: 0.5rem;
}

.sidebar-tab {
  flex: 1;
  padding: 0.4rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-dim, #8888a0);
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 4px;
  transition: color 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              background 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.25s ease;
  letter-spacing: 0.3px;
  text-align: center;
}

.sidebar-tab:hover {
  color: var(--text, #ddd);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.04);
}

.sidebar-tab.active {
  color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  box-shadow: 0 0 8px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
}

/* ── Canvas Area ── */
.canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg, #0a0a0f);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06);
  border-radius: var(--radius-md, 10px);
}

.zoom-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10;
  padding: 4px 10px;
  background: rgba(0,0,0,0.75);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.25);
  border-radius: var(--radius-sm, 6px);
  color: var(--neon-bright, #00FF9F);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 10px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
}

.zoom-indicator.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sidebar ── */
.sidebar {
  background: var(--panel) !important;
  border-right: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
  transition: width 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  overflow-y: auto;
  flex-shrink: 0;
}

/* ── Empty Canvas State ── */
.canvas-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
  z-index: 5;
}

.canvas-empty > div:first-child {
  animation: breathe 3s ease-in-out infinite;
  filter: drop-shadow(0 0 12px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2));
}

.canvas-empty .drop-zone {
  border: 2px dashed hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  border-radius: var(--radius-lg, 16px);
  padding: 2rem;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
}

.canvas-empty .drop-zone:hover {
  border-color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.04);
  box-shadow: 0 0 30px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
}

/* ── TIMELINE ZOOM CONTROLS ── */
.timeline-zoom {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0 0.5rem;
}

.timeline-zoom-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm, 6px);
  background: var(--glass-bg, rgba(10,10,15,0.85));
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  color: var(--neon-bright, #00FF9F);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

.timeline-zoom-btn:hover {
  background: var(--glass-bg-strong, rgba(10,10,15,0.92));
  border-color: var(--neon-bright, #00FF9F);
}

.timeline-zoom-btn:active {
  transform: scale(0.92);
}

.timeline-zoom-label {
  font-size: 0.6rem;
  color: var(--text-dim, #8888a0);
  font-family: var(--font-mono);
  min-width: 32px;
  text-align: center;
}

/* ── KEYBOARD SHORTCUT OVERLAY ── */
.shortcut-overlay {
  position: fixed;
  inset: 0;
  z-index: 100010;
  background: rgba(2,2,6,0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalOverlayIn 0.2s ease;
}

.shortcut-modal {
  background: var(--glass-bg-intense, rgba(10,10,15,0.96));
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  border-radius: var(--radius-xl, 20px);
  padding: 1.5rem;
  max-width: 500px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shortcut-modal h3 {
  color: var(--neon-bright, #00FF9F);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.shortcut-row:nth-child(odd) {
  background: rgba(0,0,0,0.15);
}

.shortcut-key {
  font-family: var(--font-mono);
  color: var(--neon-bright, #00FF9F);
  background: rgba(0,0,0,0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
}

.shortcut-desc {
  color: var(--text-dim, #8888a0);
  font-size: 0.7rem;
}

.shortcut-close-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm, 6px);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.25);
  color: var(--neon-bright, #00FF9F);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: background 0.15s ease;
}

.shortcut-close-btn:hover {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.18);
}

/* ── PANEL ENTRANCE ANIMATIONS ── */
@keyframes panelSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes panelSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar,
#dj-mixer-panel,
.timeline-container {
  animation: panelSlideIn 0.3s ease both;
}

.floating-props {
  animation: panelSlideUp 0.35s ease both;
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION — Accessibility
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .logo.glitch { animation: none !important; }
  .comic-card:hover { transform: none !important; }
  .comic-card:hover .thumb-wrap img { transform: none !important; }
  .glass-btn:hover { transform: none !important; }
  .remix-card-btn:hover { transform: none !important; }
  .glitch, [class*="glitch"] { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   SKELETON LOADING SHIMMER
   ═══════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    110deg,
    rgba(10,10,18,0.4) 30%,
    rgba(20,20,30,0.5) 50%,
    rgba(10,10,18,0.4) 70%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: rgba(10,10,18,0.3);
  border-radius: 12px;
  overflow: hidden;
}
.skeleton-card .sk-image {
  aspect-ratio: 3/4;
  background: linear-gradient(110deg, rgba(10,10,18,0.4) 30%, rgba(20,20,30,0.5) 50%, rgba(10,10,18,0.4) 70%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
}
.skeleton-card .sk-line {
  height: 14px;
  margin: 0.75rem 1rem 0.5rem;
  border-radius: 4px;
  background: linear-gradient(110deg, rgba(10,10,18,0.4) 30%, rgba(20,20,30,0.5) 50%, rgba(10,10,18,0.4) 70%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
}
.skeleton-card .sk-line-short {
  width: 60%;
  height: 10px;
  margin: 0 1rem 0.75rem;
  border-radius: 4px;
  background: linear-gradient(110deg, rgba(10,10,18,0.4) 30%, rgba(20,20,30,0.5) 50%, rgba(10,10,18,0.4) 70%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   UNIFIED NEETSTUFF TOAST SYSTEM
   ═══════════════════════════════════════════════════════════ */
.neet-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 99999;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.2);
  color: var(--neon-bright);
  background: hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.08);
  animation: neetToastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 0 24px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.08);
}

.neet-toast.error {
  border-color: rgba(255,68,0,0.3);
  color: #FF4400;
  background: rgba(255,68,0,0.08);
  box-shadow: 0 0 24px rgba(255,68,0,0.08);
}

@keyframes neetToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   CHROMATIC ABERRATION — Premium Glitch Effects
   ═══════════════════════════════════════════════════════════ */
.chromatic-text {
  position: relative;
  color: var(--neon-bright);
}

.chromatic-text::before,
.chromatic-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.chromatic-text::before {
  color: #FF00AA;
  z-index: -1;
  transform: translate(-1.5px, 0);
  opacity: 0.6;
}

.chromatic-text::after {
  color: #00E5FF;
  z-index: -1;
  transform: translate(1.5px, 0);
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   UNIFIED MODAL SYSTEM
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(2, 2, 6, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalOverlayIn 0.2s ease;
}

.modal-box {
  background: var(--glass-bg-intense);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.15);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  max-width: 420px;
  width: 90vw;
  box-shadow: 0 0 80px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.04);
  animation: modalSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   TOOLTIP SYSTEM
   ═══════════════════════════════════════════════════════════ */
.neet-tooltip {
  position: relative;
}

.neet-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.3);
  border-radius: var(--radius-sm);
  color: var(--neon-bright);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 99999;
  box-shadow: 0 0 12px hsla(var(--neon-h), var(--neon-s), var(--neon-l), 0.15);
  backdrop-filter: blur(6px);
  font-family: 'Inter', sans-serif;
}

.neet-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE EXPERIENCE — Touch-optimized, Responsive Layer
   ═══════════════════════════════════════════════════════════
   This entire section is wrapped in @media (max-width: 1024px).
   Desktop styles are UNCHANGED — only mobile overrides here.
   Uses existing CSS variable system (--neon-h, --neon-s, etc.)
   for full theme compatibility across all 11 themes.
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* ── Base adjustments ── */
  body { font-size: 14px; -webkit-tap-highlight-color: transparent; }

  /* ── Navigation: Hamburger ── */
  .glass-nav { padding: 0.5rem 0.75rem; }
  .glass-nav .nav-links { display: none; }

  .hamburger-btn {
    display: flex !important;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
    color: var(--neon-bright, #00FF9F);
    font-size: 1.3rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.2s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.12s ease;
    flex-shrink: 0;
    will-change: transform;
  }
  .hamburger-btn:hover { background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08); border-color: var(--neon-bright, #00FF9F); }
  .hamburger-btn:active { transform: scale(0.94); }

  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: var(--glass-bg-intense, rgba(10,10,15,0.96));
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    display: none;
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.75rem;
  }
  .mobile-menu-overlay.active { display: flex; animation: modalOverlayIn 0.2s ease; }

  .mobile-menu-overlay .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
  }
  .mobile-menu-overlay .menu-logo {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--neon-bright, #00FF9F);
    letter-spacing: 2px;
    font-family: var(--font-heading);
  }
  .mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    border: none;
    color: var(--text-dim, #8888a0);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-sm, 6px);
    color: var(--text, #ddd);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .mobile-menu-link:hover { background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06); color: var(--neon-bright, #00FF9F); }
  .mobile-menu-link.active { color: var(--neon-bright, #00FF9F); }

  /* Hide desktop-only Xaman/network buttons in nav, show in menu */
  .glass-nav > .flex.items-center.gap-3 { gap: 0.3rem; }

  /* ── Touch targets min 44px ── */
  .glass-btn, .remix-card-btn, .tool-btn, .gallery-tab, .gallery-sort, .load-more-btn,
  .portfolio-tab, .stat-card, .challenge-card, .product-card, .profile-save-btn,
  .order-btn, .qty-btn, .entry-row, .layer-item, .sidebar-tab {
    min-height: 44px;
  }

  /* ── Editor mobile toolbar ── */
  .ftool-palette { width: 48px !important; padding: 4px 2px !important; }
  .ftool-btn { width: 40px !important; padding: 5px 1px !important; }
  .ftool-btn .ftool-label { display: none !important; }
  .ftool-btn .ftool-icon { font-size: 0.85rem !important; }

/* Bottom toolbar for editor on mobile */
#mobile-editor-bar {
  display: flex !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9995;
  background: var(--glass-bg-strong, rgba(10,10,15,0.92));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
  padding: 0.4rem 0.5rem;
  gap: 0.2rem;
  overflow-x: auto;
  justify-content: space-around;
  -webkit-overflow-scrolling: touch;
}
#mobile-editor-bar .mob-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0.35rem 0.4rem;
  border-radius: var(--radius-sm, 6px);
  border: none;
  background: transparent;
  color: var(--text-dim, #8888a0);
  font-size: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  min-width: 44px;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}
#mobile-editor-bar .mob-tool .mob-icon { font-size: 1.1rem; line-height: 1; }
#mobile-editor-bar .mob-tool:hover {
  color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06);
  transform: translateY(-2px);
}
#mobile-editor-bar .mob-tool:active {
  transform: scale(0.95);
}
#mobile-editor-bar .mob-tool.active {
  color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
}

  /* ── Editor: Stack sidebar ── */
  #main-sidebar {
    position: fixed !important;
    top: 60px;
    left: 0;
    bottom: 60px;
    width: 85vw !important;
    max-width: 320px;
    z-index: 9998;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.23,1,0.32,1);
    border-right: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
    overflow-y: auto;
  }
  #main-sidebar.open { transform: translateX(0); }
  #sidebar-resize-handle { display: none !important; }

  /* ── Sidebar overlay backdrop ── */
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: rgba(2,2,6,0.7);
    display: none;
  }
  .sidebar-backdrop.active { display: block; animation: modalOverlayIn 0.2s ease; }

  /* ── Timeline ── */
  .timeline-container { height: 120px !important; }
  .timeline-track-row { font-size: 0.6rem !important; }

  /* ── Gallery: 2 columns ── */
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.6rem !important; }
  .gallery-tabs { justify-content: center; gap: 0.3rem; flex-wrap: wrap; }
  .gallery-tab { font-size: 0.72rem; padding: 0.4rem 0.65rem; }
  .gallery-stats { gap: 0.75rem; padding: 0.5rem 0.75rem; flex-wrap: wrap; }
  .gallery-stat { font-size: 0.7rem; }
  .comic-card { border-radius: 10px; }
  .comic-card .card-body { padding: 0.5rem 0.65rem; }
  .comic-card .card-title { font-size: 0.78rem; }
  .comic-card .card-meta { font-size: 0.65rem; }
  .remix-card-btn { font-size: 0.65rem; padding: 0.3rem 0.6rem; min-height: 36px; }

  /* ── Portfolio: stacked ── */
  .portfolio-tabs { gap: 0.3rem; flex-wrap: wrap; }
  .portfolio-tab { font-size: 0.72rem; padding: 0.4rem 0.65rem; }
  .stat-card { padding: 0.75rem; }
  .stat-card .stat-value { font-size: 1.3rem; }
  .sparkline-container { height: 40px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem !important; }

  /* ── Viewer: Full-screen media ── */
  .nft-title { font-size: 1.1rem !important; }
  .attr-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.35rem; }
  .tab-bar { gap: 2px; padding: 3px; overflow-x: auto; }
  .tab-btn { padding: 0.45rem 0.5rem; font-size: 0.65rem; min-width: 56px; }
  .tab-btn .tab-icon { display: none; }
  .sharing-section { gap: 0.3rem; flex-wrap: wrap; }
  .share-btn { padding: 0.35rem 0.55rem; font-size: 0.65rem; }
  .media-card { border-radius: 10px; }
  .waveform-canvas { height: 55px; }
  .link-cards { gap: 0.3rem; }
  .link-card { padding: 0.3rem 0.5rem; font-size: 0.6rem; }

  /* ── Batch mint ── */
  .batch-mint .drop-zone { padding: 1.5rem 1rem; }
  .entry-row { font-size: 0.7rem; padding: 0.4rem 0.5rem; }
  .entry-title { font-size: 0.7rem; }

  /* ── Challenges ── */
  .challenge-card { padding: 1rem; }
  .challenge-card .prize-badge { font-size: 0.6rem; }

  /* ── Store ── */
  .store .product-card { padding: 0.75rem; }
  .store .product-mockup { height: 70px; }
  .store .price-tag { font-size: 1rem; }
  .store .order-btn { padding: 0.6rem; }
  .store .qty-btn { width: 28px; height: 28px; }

  /* ── Creator ── */
  .creator-header { padding: 2rem 1rem; }
  .creator-avatar, .creator-avatar-placeholder { width: 72px; height: 72px; font-size: 1.8rem; }
  .creator-name { font-size: 1.3rem; }
  .stat-chip { font-size: 0.65rem; padding: 0.2rem 0.5rem; }
  .creator-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem !important; }

  /* ── Validator ── */
  .val-glass { padding: 1rem; }
  .score-ring { width: 80px; height: 80px; font-size: 1.6rem; }

  /* ── Modals on mobile ── */
  .modal-box, [class*="modal"] > div:not(.modal-overlay) {
    max-width: 94vw !important;
    padding: 1.25rem !important;
    border-radius: var(--radius-lg, 16px) !important;
  }

  /* ── Prevent pull-to-refresh / overscroll in editor ── */
body.mobile-layout {
  overflow-x: hidden;
  /* Prevent pull-to-refresh and overscroll */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

/* Reduce motion on mobile for better performance and accessibility */
@media (max-width: 1024px) {
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.001s !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001s !important;
      scroll-behavior: auto !important;
    }
  }
}

  /* ── Reduced glow on mobile for OLED safety ── */
  .glass-btn { box-shadow: none !important; }
  .comic-card { box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important; }
  .comic-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.4) !important; transform: translateY(-2px); }
  .glass-section { box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important; }
  .stat-card { box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important; }

  /* ── Toast adjusts for mobile ── */
  .neet-toast, #batch-toast, #editor-toast {
    bottom: 5rem !important;
    font-size: 0.75rem !important;
    padding: 0.5rem 1rem !important;
    max-width: 90vw;
    white-space: normal;
  }

  /* ── Mobile bottom nav bar (editor) micro-animations ── */
  #mobile-editor-bar .mob-tool:active {
    transform: scale(0.9);
    transition-duration: 0.04s;
  }

  /* Mobile toolbar auto-hide (toggled via JS) */
  #mobile-editor-bar.toolbar-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }
  #mobile-editor-bar {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  }

  /* ── Touch feedback ripple (subtle) ── */
  .glass-btn, .remix-card-btn, .mob-tool, .hamburger-btn, .gallery-tab, .portfolio-tab {
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  .glass-btn::after, .remix-card-btn::after, .mob-tool::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--tx, 50%) var(--ty, 50%), hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .glass-btn:active::after, .remix-card-btn:active::after, .mob-tool:active::after {
    opacity: 1;
  }

  /* ── Bottom navigation for editor (Tools / Layers / Timeline tabs) ── */
  #mobile-editor-tabs {
    display: flex !important;
    background: var(--glass-bg, rgba(10,10,15,0.85));
    border-top: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
    padding: 0.25rem 0.5rem;
    gap: 0.25rem;
    justify-content: center;
  }

  #mobile-editor-tabs .met-tab {
    flex: 1;
    padding: 0.35rem 0.25rem;
    border: none;
    background: transparent;
    color: var(--text-dim, #8888a0);
    font-size: 0.6rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    min-height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
  }

  #mobile-editor-tabs .met-tab .met-icon { font-size: 1rem; line-height: 1; }

  #mobile-editor-tabs .met-tab:hover {
    color: var(--neon-bright, #00FF9F);
    background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06);
  }

  #mobile-editor-tabs .met-tab.active {
    color: var(--neon-bright, #00FF9F);
    background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
  }

  /* ── Viewer: vertical swipe reading mode ── */
  .sv-swipe-container {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    height: calc(100vh - 120px);
  }

  .sv-swipe-container .sv-slide {
    scroll-snap-align: start;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }

  /* ── Empty state illustration improvements ── */
  .gallery-empty { padding: 3rem 1.5rem; }
  .gallery-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
  .gallery-empty p { font-size: 0.85rem; }

  .portfolio-empty { padding: 3rem 1.5rem; }
  .portfolio-empty-icon { font-size: 2.5rem; }

  .wallet-empty-state, .creator-empty { padding: 2rem 1rem; }
  .wallet-empty-state .empty-icon, .creator-empty-icon { font-size: 2rem; }

  /* ── PWA: Install prompt bar ── */
  #pwa-install-bar {
    display: flex !important;
    position: fixed;
    bottom: 70px;
    left: 0.5rem;
    right: 0.5rem;
    z-index: 9998;
    background: var(--glass-bg-strong, rgba(10,10,15,0.94));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
    border-radius: var(--radius-lg, 16px);
    padding: 0.7rem 1rem;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 0 30px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06);
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  #pwa-install-bar .pwa-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm, 6px);
    background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
  }

  #pwa-install-bar .pwa-text {
    flex: 1;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text, #ddd);
    line-height: 1.3;
  }

  #pwa-install-bar .pwa-text small {
    display: block;
    font-weight: 400;
    color: var(--text-dim, #8888a0);
    font-size: 0.65rem;
    margin-top: 0.1rem;
  }

  #pwa-install-bar .pwa-install-btn {
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm, 6px);
    background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
    border: 1px solid var(--neon-bright, #00FF9F);
    color: var(--neon-bright, #00FF9F);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    transition: background 0.15s ease;
    flex-shrink: 0;
  }

  #pwa-install-bar .pwa-install-btn:hover {
    background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.25);
  }

  #pwa-install-bar .pwa-dismiss {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted, #666680);
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
  }

/* ── Haptic-like micro-pulse on success actions ── */
@keyframes successPulse {
  0% { box-shadow: 0 0 0 0 hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.4); }
  70% { box-shadow: 0 0 0 20px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.success-pulse {
  animation: successPulse 0.6s ease-out;
}

  /* ── Full-height modals on mobile ── */
  .modal-box, [class*="modal"] > div:not(.modal-overlay) {
    max-height: 85vh !important;
    overflow-y: auto;
  }

  .neet-toast:not(.error) {
    animation: neetToastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), successPulse 0.6s ease 0.2s;
  }

  /* ── Viewer swipe indicators ── */
  .sv-swipe-chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg, rgba(10,10,15,0.85));
    border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
    color: var(--neon-bright, #00FF9F);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
  }
  .sv-swipe-chevron.prev { left: 0.5rem; }
  .sv-swipe-chevron.next { right: 0.5rem; }
  .sv-swipe-container:hover .sv-swipe-chevron { opacity: 0.7; }

  .sv-swipe-dots {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    padding: 0.5rem 0;
  }
  .sv-swipe-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
    transition: background 0.3s ease, transform 0.3s ease;
  }
  .sv-swipe-dots .dot.active {
    background: var(--neon-bright, #00FF9F);
    transform: scale(1.3);
  }

  /* ── Mobile floating undo/redo ── */
  .mob-undo-bar {
    position: fixed;
    left: 0.5rem;
    bottom: 70px;
    z-index: 9996;
    display: flex;
    gap: 0.3rem;
  }
  .mob-undo-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm, 6px);
    background: var(--glass-bg-strong, rgba(10,10,15,0.92));
    border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
    color: var(--text-dim, #8888a0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  }
  .mob-undo-btn:active { transform: scale(0.9); }
  .mob-undo-btn:hover { color: var(--neon-bright, #00FF9F); border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.3); }

  /* ── Empty state polish ── */
  .gallery-empty { padding: 2rem 1rem; }
  .gallery-empty-icon { font-size: 2.8rem; opacity: 0.5; }
  .gallery-empty p { font-size: 0.85rem; line-height: 1.5; }
  .gallery-empty .gallery-empty-cta { margin-top: 1rem; display: inline-flex; }

  .portfolio-empty { padding: 2rem 1rem; }
  .portfolio-empty-icon { font-size: 2.8rem; opacity: 0.5; }
  .portfolio-empty p { font-size: 0.85rem; line-height: 1.5; }

  .creator-empty { padding: 2rem 1rem; }
  .creator-empty-icon { font-size: 2.8rem; opacity: 0.5; }

  /* ── PWA bar: delay appearance via JS (handled in script) ── */
  #pwa-install-bar { transition: opacity 0.4s ease, transform 0.4s ease; }
}

/* ── Small phones ── */
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.4rem !important; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.4rem !important; }
  .creator-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.4rem !important; }
  .hero-title { font-size: 2rem !important; }
  .hero-subtitle { font-size: 0.9rem !important; }
  .cta-btn { font-size: 0.95rem; padding: 0.65rem 1.5rem; min-height: 48px; }
  .nft-title { font-size: 1rem !important; }
  #pwa-install-bar { flex-wrap: wrap; padding: 0.5rem 0.75rem; bottom: 60px; }
  #pwa-install-bar .pwa-text { font-size: 0.7rem; }
  #pwa-install-bar .pwa-install-btn { font-size: 0.65rem; padding: 0.35rem 0.7rem; }
  body.mobile-layout .timeline-container { height: 60px !important; }
  body.mobile-layout #mobile-editor-bar { padding: 0.25rem 0.3rem; }
  body.mobile-layout #mobile-editor-bar .mob-tool { padding: 0.2rem 0.3rem; min-width: 36px; }
  body.mobile-layout #mobile-editor-bar .mob-tool .mob-icon { font-size: 0.9rem; }
}

/* ── Tablet ── */
@media (min-width: 768px) and (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 0.75rem !important; }
  .portfolio-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 0.75rem !important; }
  .creator-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 0.75rem !important; }
  .comic-card { border-radius: 12px; }
  #pwa-install-bar { max-width: 400px; left: 50%; transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════
   PHASE 1 — Instant Share Flywheel
   ═══════════════════════════════════════════════════════════ */
.neet-share-x-btn {
  background: linear-gradient(90deg, #1DA1F2, #00A2FF);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(29, 161, 242, 0.4);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.neet-share-x-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(29, 161, 242, 0.6);
}
.neet-embed-box {
  background: rgba(10, 10, 15, 0.92);
  border: 1px solid rgba(0, 255, 159, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
}
.neet-embed-box textarea {
  background: #0a0a0f;
  border: 1px solid rgba(0, 255, 159, 0.2);
  color: #00ff9f;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  width: 100%;
  height: 68px;
  resize: none;
  padding: 8px;
  border-radius: 6px;
  outline: none;
}
.neet-embed-box textarea:focus {
  border-color: #00FF9F;
  box-shadow: 0 0 8px rgba(0,255,159,0.2);
}

/* ── RhythmForge AI DJ Styles ── */
.dj-waveform { background: rgba(0,255,159,0.08); border: 1px solid rgba(0,255,159,0.4); border-radius: 8px; height: 60px; position: relative; overflow: hidden; display: flex; align-items: flex-end; gap: 2px; padding: 4px 8px; }
.dj-waveform .bar { display: inline-block; width: 3px; background: var(--neon); border-radius: 2px; animation: dj-waveform 0.8s ease-in-out infinite alternate; }
@keyframes dj-waveform { 0% { height: 10px; } 100% { height: 40px; } }
.stem-card { transition: all 0.2s; cursor: pointer; }
.stem-card.active { box-shadow: 0 0 30px rgba(0,255,159,0.6); border-color: var(--neon); }
.stem-card.muted { opacity: 0.4; }
.stem-card.solo { box-shadow: 0 0 20px rgba(0,229,255,0.5); border-color: #00E5FF; }
.stem-color-vocals { border-left: 3px solid #FF00AA; }
.stem-color-drums { border-left: 3px solid #FFD700; }
.stem-color-bass { border-left: 3px solid #00E5FF; }
.stem-color-guitar { border-left: 3px solid #FF8800; }
.stem-color-piano { border-left: 3px solid #AA00FF; }
.stem-color-other { border-left: 3px solid #8888a0; }
.dj-glass-panel { background: rgba(10,10,18,0.75); backdrop-filter: blur(32px); border: 1px solid rgba(0,255,159,0.2); border-radius: 16px; padding: 1.5rem; box-shadow: 0 20px 60px rgba(0,255,159,0.15), inset 0 1px 0 rgba(255,255,255,0.06); }
.dj-glass-panel:hover { border-color: rgba(0,255,159,0.35); box-shadow: 0 20px 60px rgba(0,255,159,0.25), inset 0 1px 0 rgba(255,255,255,0.08); }
.dj-btn-neon { background: linear-gradient(135deg, rgba(0,255,159,0.2), rgba(0,229,255,0.1)); border: 1px solid var(--neon); color: var(--neon); padding: 0.75rem 2rem; border-radius: 12px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; font-family: 'Inter', sans-serif; }
.dj-btn-neon:hover { box-shadow: 0 0 20px rgba(0,255,159,0.25); transform: translateY(-1px); }
.dj-btn-neon:active { transform: scale(0.98); }
.dj-btn-neon:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.dj-btn-accent { background: linear-gradient(135deg, rgba(255,0,170,0.2), rgba(0,229,255,0.1)); border: 1px solid var(--accent); color: var(--accent); padding: 0.75rem 2rem; border-radius: 12px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; }
.dj-btn-accent:hover { box-shadow: 0 0 20px rgba(255,0,170,0.25); transform: translateY(-1px); }
.dj-mood-input { background: rgba(0,0,0,0.3); border: 1px solid rgba(0,255,159,0.15); color: var(--text); padding: 0.75rem; border-radius: 10px; width: 100%; font-family: 'Inter', sans-serif; }
.dj-mood-input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 10px rgba(0,255,159,0.15); }
.dj-tempo-slider { width: 100%; accent-color: var(--neon); }

/* === ITERATION 13 — MOBILE-FIRST: COLLAPSIBLE SIDEBAR, FULL-WIDTH CANVAS === */
body.mobile-layout { overflow-x: hidden; }

body.mobile-layout #main-sidebar {
  position: fixed !important;
  left: auto !important;
  top: 60px !important;
  bottom: 0 !important;
  width: 280px !important;
  height: calc(100vh - 60px) !important;
  z-index: 10000 !important;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1) !important;
  border-radius: 0 14px 14px 0 !important;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.6) !important;
  border-right: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1) !important;
}

body.mobile-layout #main-sidebar.open {
  transform: translateX(0) !important;
}

body.mobile-layout #ftool-palette { display: none !important; }

body.mobile-layout .timeline-container { height: 80px !important; }

body.mobile-layout #editor-section > div[style*="display: flex"] {
  gap: 0.25rem !important;
}

body.mobile-layout .hamburger-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  color: var(--neon-bright, #00FF9F);
  font-size: 1.3rem;
  border-radius: var(--radius-sm, 6px);
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}
body.mobile-layout .hamburger-btn:hover {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
  border-color: var(--neon-bright, #00FF9F);
  transform: translateY(-2px);
}
body.mobile-layout .hamburger-btn:active {
  transform: scale(0.95);
}

body.mobile-layout .hamburger-btn:hover {
  border-color: #00FF9F;
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.2);
}

body.mobile-layout .hamburger-btn:active {
  transform: scale(0.94);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  animation: modalOverlayIn 0.3s ease;
}

body.mobile-layout #editor-toast {
  top: 70px !important;
  font-size: 0.75rem !important;
  padding: 0.5rem 0.75rem !important;
}

body.mobile-layout #floating-properties {
  min-width: 180px !important;
  max-width: 220px !important;
  font-size: 0.75rem !important;
}

body.mobile-layout #floating-tool-palette { display: none !important; }

/* ── Sidebar close button ── */
.sidebar-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0,0,0,0.4);
  color: #00FF9F;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: rgba(0,255,159,0.15);
  box-shadow: 0 0 8px rgba(0,255,159,0.2);
}

/* ── AI Generate Panel ── */
#ai-generate-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 380px;
  max-width: 90vw;
  z-index: 9999;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 255, 159, 0.4);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0, 255, 159, 0.3);
  padding: 1rem;
  display: none;
  color: #ddd;
  animation: aiPanelIn 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}
#ai-generate-panel.active { display: block; }
@keyframes aiPanelIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  cursor: move;
  user-select: none;
}
.ai-panel-header h3 { color: #00FF9F; font-size: 0.95rem; font-weight: 700; margin: 0; }
.ai-panel-close {
  background: none; border: none; color: #666; font-size: 1.2rem;
  cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 4px; line-height: 1;
}
.ai-panel-close:hover { color: #FF00AA; background: rgba(255,0,170,0.1); }
.ai-label {
  color: #00FF9F; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.5px; margin-bottom: 0.3rem; display: block;
}
.ai-prompt-input {
  width: 100%; height: 80px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 255, 159, 0.3);
  border-radius: 8px; color: #ddd; padding: 0.6rem;
  font-size: 0.8rem; font-family: 'Inter', sans-serif;
  resize: vertical; box-sizing: border-box; margin-bottom: 0.6rem;
}
.ai-prompt-input:focus {
  outline: none; border-color: #00FF9F; box-shadow: 0 0 8px rgba(0,255,159,0.2);
}
.ai-model-select, .ai-ratio-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 255, 159, 0.3);
  border-radius: 6px; color: #00FF9F; padding: 0.4rem 0.5rem;
  font-size: 0.78rem; outline: none; cursor: pointer; margin-bottom: 0.5rem;
}
.ai-style-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem; margin-bottom: 0.6rem;
}
.ai-style-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 159, 0.15);
  border-radius: 6px; color: #888; padding: 0.35rem 0.3rem;
  font-size: 0.65rem; cursor: pointer; transition: all 0.15s ease; text-align: center;
}
.ai-style-btn:hover { border-color: rgba(0,255,159,0.4); color: #00FF9F; }
.ai-style-btn.active { background: rgba(0,255,159,0.12); border-color: #00FF9F; color: #00FF9F; }
.ai-generate-btn {
  width: 100%; padding: 0.6rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(0,255,159,0.12); border: 1px solid #00FF9F; color: #00FF9F;
  margin-bottom: 0.5rem;
}
.ai-generate-btn:hover { background: rgba(0,255,159,0.22); box-shadow: 0 0 20px rgba(0,255,159,0.3); }
.ai-generate-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ai-preview-area {
  display: none; margin-top: 0.5rem;
  background: rgba(0,0,0,0.5); border-radius: 8px;
  border: 1px solid rgba(0,255,159,0.15); padding: 0.5rem; text-align: center;
}
.ai-preview-area.show { display: block; }
.ai-preview-area img { max-width: 100%; max-height: 256px; border-radius: 6px; margin-bottom: 0.5rem; }
.ai-add-btn {
  width: 100%; padding: 0.5rem; border-radius: 6px; cursor: pointer;
  background: rgba(0,255,159,0.15); border: 1px solid #00FF9F;
  color: #00FF9F; font-size: 0.8rem; font-weight: 600; transition: all 0.2s ease;
}
.ai-add-btn:hover { background: rgba(0,255,159,0.25); }
.ai-loading { text-align: center; padding: 1.5rem; color: #00FF9F; font-size: 0.8rem; }
.ai-spinner {
  display: inline-block; width: 24px; height: 24px;
  border: 2px solid rgba(0,255,159,0.2); border-top-color: #00FF9F;
  border-radius: 50%; animation: aiSpin 0.7s linear infinite; margin-bottom: 0.5rem;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }

/* ── AI Co-Pilot Panel ── */
#ai-copilot-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 360px;
  max-width: 90vw;
  z-index: 10000;
  background: var(--glass-bg-intense, rgba(10,10,15,0.96));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.25);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 0 50px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08),
              0 8px 32px rgba(0,0,0,0.5);
  padding: 1rem;
  display: none;
  color: var(--text-body, #c8c8d0);
  animation: aiCpIn 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  font-size: 0.8rem;
}
#ai-copilot-panel.active { display: block; }
@keyframes aiCpIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-cp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  cursor: move;
  user-select: none;
}
.ai-cp-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-bright, #00FF9F);
  letter-spacing: 0.3px;
}
.ai-cp-close {
  background: none;
  border: none;
  color: var(--text-muted, #666680);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}
.ai-cp-close:hover { color: var(--accent, #FF00AA); background: rgba(255,0,170,0.08); }
.ai-cp-prompt {
  width: 100%;
  background: rgba(0,0,0,0.6);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  border-radius: var(--radius-sm, 6px);
  color: var(--text-body, #c8c8d0);
  padding: 0.55rem;
  font-size: 0.78rem;
  font-family: var(--font-primary, 'Inter', sans-serif);
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 0.6rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-cp-prompt:focus {
  border-color: var(--neon-bright, #00FF9F);
  box-shadow: 0 0 8px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
}
.ai-cp-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.ai-cp-label {
  color: var(--neon-bright, #00FF9F);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 42px;
}
.ai-cp-select {
  flex: 1;
  background: rgba(0,0,0,0.6);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  border-radius: var(--radius-sm, 6px);
  color: var(--neon-bright, #00FF9F);
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  outline: none;
  cursor: pointer;
  font-family: var(--font-primary, 'Inter', sans-serif);
}
.ai-cp-select:focus {
  border-color: var(--neon-bright, #00FF9F);
}
.ai-cp-select:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 1px;
}
.ai-cp-conn-dot:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 2px;
}
.ai-cp-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.6rem;
}
.ai-cp-style-btn {
  background: rgba(0,0,0,0.45);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  border-radius: var(--radius-sm, 6px);
  color: var(--text-dim, #8888a0);
  padding: 0.3rem 0.2rem;
  font-size: 0.62rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  font-family: var(--font-primary, 'Inter', sans-serif);
}
.ai-cp-style-btn:hover { border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.35); color: var(--neon-bright, #00FF9F); }
.ai-cp-style-btn.active {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  border-color: var(--neon-bright, #00FF9F);
  color: var(--neon-bright, #00FF9F);
}
.ai-cp-generate-btn {
  width: 100%;
  padding: 0.55rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
  border: 1px solid var(--neon-bright, #00FF9F);
  color: var(--neon-bright, #00FF9F);
  margin-bottom: 0.5rem;
  font-family: var(--font-primary, 'Inter', sans-serif);
}
.ai-cp-generate-btn:hover { background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2); box-shadow: 0 0 20px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15); }
.ai-cp-generate-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ai-cp-preview {
  display: none;
  margin-top: 0.4rem;
  background: rgba(0,0,0,0.45);
  border-radius: var(--radius-sm, 6px);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  padding: 0.5rem;
  text-align: center;
}
.ai-cp-preview.show { display: block; }
.ai-cp-preview img {
  max-width: 100%;
  max-height: 240px;
  border-radius: var(--radius-sm, 6px);
  margin-bottom: 0.4rem;
}
.ai-cp-add-btn {
  width: 100%;
  padding: 0.45rem;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  border: 1px solid var(--neon-bright, #00FF9F);
  color: var(--neon-bright, #00FF9F);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: var(--font-primary, 'Inter', sans-serif);
}
.ai-cp-add-btn:hover { background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.22); }
.ai-cp-loading {
  text-align: center;
  padding: 1.25rem;
  color: var(--neon-bright, #00FF9F);
  font-size: 0.75rem;
}
.ai-cp-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  border-top-color: var(--neon-bright, #00FF9F);
  border-radius: 50%;
  animation: aiCpSpin 0.7s linear infinite;
  margin-bottom: 0.4rem;
}
@keyframes aiCpSpin { to { transform: rotate(360deg); } }

/* ── AI Pluggable Provider: test connection button ── */
.ai-cp-test-btn {
  background: rgba(0,0,0,0.45);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  border-radius: var(--radius-sm, 6px);
  color: var(--neon-bright, #00FF9F);
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}
.ai-cp-test-btn:hover {
  border-color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  box-shadow: 0 0 8px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
}
.ai-cp-test-btn:active {
  transform: scale(0.92);
}
.ai-cp-test-btn:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 2px;
}

/* Provider row in AI Co-Pilot panel */
.ai-cp-provider-row {
  margin-bottom: 0.35rem;
}

/* ── Provider grid with glowing neon buttons ── */
.ai-cp-provider-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
  padding: 0.25rem 0;
}
.ai-cp-provider-btn {
  flex: 1 0 auto;
  min-width: 70px;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  background: rgba(0,0,0,0.55);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  color: rgba(0, 255, 159, 0.6);
  font-family: var(--font-primary, 'Inter', sans-serif);
  transition: all 0.18s ease;
  text-align: center;
  white-space: nowrap;
}
.ai-cp-provider-btn:hover {
  border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.4);
  color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06);
}
.ai-cp-provider-btn.active {
  border-color: var(--neon-bright, #00FF9F);
  color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  box-shadow: 0 0 12px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2),
              inset 0 0 8px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.06);
  font-weight: 700;
}
.ai-cp-provider-btn.active:hover {
  box-shadow: 0 0 18px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.35),
              inset 0 0 10px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48()), 0.08);
}
.ai-cp-provider-btn:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 2px;
}

/* ── Mobile: provider grid wraps and full-width ── */
@media (max-width: 640px) {
  .ai-cp-provider-grid {
    gap: 0.25rem;
  }
  .ai-cp-provider-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    font-size: 0.6rem;
    padding: 0.35rem 0.3rem;
  }
}

/* Connection status indicator (dot + timestamp) */
.ai-cp-conn-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #444;
  vertical-align: middle;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}
.ai-cp-conn-ts {
  font-size: 0.62rem;
  color: #666;
  vertical-align: middle;
  margin-left: 0.2rem;
  word-break: break-word;
  line-height: 1.2;
}
.ai-cp-conn-status {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  vertical-align: middle;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
}
@media (max-width: 640px) {
  .ai-cp-conn-ts {
    font-size: 0.58rem;
  }
}

/* Provider Settings link in AI Co-Pilot panel */
.ai-cp-settings-link {
  display: inline-block;
  font-size: 0.62rem;
  color: rgba(0, 255, 159, 0.5);
  text-decoration: none;
  margin-left: 0.5rem;
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.15s ease;
}
.ai-cp-settings-link:hover {
  color: #00ff9f;
  text-decoration: underline;
}

/* Mobile: stacked layout for AI Co-Pilot rows */
@media (max-width: 640px) {
  .ai-cp-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
  }
  .ai-cp-row .ai-cp-label {
    min-width: auto;
    margin-bottom: 0.1rem;
  }
  .ai-cp-row .ai-cp-select {
    width: 100%;
  }
  .ai-cp-conn-status {
    margin-left: 0;
    margin-top: 0.2rem;
  }
  .ai-cp-settings-link {
    margin-left: 0;
    margin-top: 0.2rem;
    display: block;
  }
  .ai-cp-refresh-btn {
    margin-left: 0.2rem;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  .ai-cp-baseurl-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ai-cp-baseurl-row .ai-cp-label {
    margin-bottom: 0.1rem;
  }
  .ai-cp-baseurl-input {
    width: 100%;
  }
}

/* ── AI Refresh Status button ── */
.ai-cp-refresh-btn {
  background: rgba(0,0,0,0.35);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  border-radius: var(--radius-sm, 6px);
  color: var(--neon-bright, #00FF9F);
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
  margin-left: 0.3rem;
  vertical-align: middle;
}
  .ai-cp-refresh-btn:hover {
  border-color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
  box-shadow: 0 0 6px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
}
.ai-cp-refresh-btn:active {
  transform: scale(0.88);
}
.ai-cp-refresh-btn:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 2px;
}
.ai-cp-refresh-btn.spinning {
  animation: aiCpRefreshSpin 0.8s linear infinite;
  pointer-events: none;
  opacity: 0.7;
}

@keyframes aiCpRefreshSpin {
  to { transform: rotate(360deg); }
}

/* ── Active provider glow in dropdown ── */
.ai-cp-select option:checked {
  background: rgba(0,255,159,0.12);
  color: #00FF9F;
  font-weight: 700;
}
.ai-cp-select:has(option:checked) {
  border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.5);
  box-shadow: 0 0 10px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
}

/* ── Ollama base URL input ── */
.ai-cp-baseurl-input {
  flex: 1;
  background: rgba(0,0,0,0.6);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  border-radius: var(--radius-sm, 6px);
  color: var(--neon-bright, #00FF9F);
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  outline: none;
  transition: border-color 0.15s ease;
}
.ai-cp-baseurl-input:focus {
  border-color: var(--neon-bright, #00FF9F);
  box-shadow: 0 0 8px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
}
.ai-cp-baseurl-input::placeholder {
  color: #444;
  font-family: var(--font-primary, 'Inter', sans-serif);
}

/* ── Base URL highlight when Ollama active ── */
.ai-cp-baseurl-highlight {
  border-left: 2px solid var(--neon-bright, #00FF9F);
  padding-left: 0.5rem;
  background: rgba(0,255,159,0.03);
  border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
}
.ai-cp-baseurl-highlight .ai-cp-baseurl-input {
  border-color: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.35);
}
.ai-cp-baseurl-highlight .ai-cp-label {
  color: var(--neon-bright, #00FF9F);
}

/* ── Mobile layout refinements ── */
@media (max-width: 640px) {
  .ai-cp-baseurl-highlight {
    border-left: none;
    border-top: 2px solid var(--neon-bright, #00FF9F);
    padding-left: 0;
    padding-top: 0.3rem;
    background: transparent;
    border-radius: 0;
  }
  .ai-cp-provider-row {
    flex-wrap: wrap;
  }
  .ai-cp-provider-row .ai-cp-label {
    width: 100%;
    margin-bottom: 0.15rem;
  }
  .ai-cp-provider-row .ai-cp-select {
    width: 100%;
  }
  .ai-cp-conn-status {
    margin-top: 0.25rem;
    width: 100%;
  }
}

/* ── Ollama status row in Co-Pilot panel ── */
.ai-cp-ollama-status-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.45rem;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-sm, 6px);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
}
.ai-cp-ollama-status-icon {
  font-size: 0.7rem;
  line-height: 1;
  flex-shrink: 0;
}
.ai-cp-ollama-status-text {
  font-size: 0.7rem;
  font-weight: 600;
  flex: 1;
}
.ai-cp-ollama-refresh-btn {
  background: rgba(0,0,0,0.35);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.15);
  border-radius: var(--radius-sm, 6px);
  color: var(--neon-bright, #00FF9F);
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}
.ai-cp-ollama-refresh-btn:hover {
  border-color: var(--neon-bright, #00FF9F);
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.12);
}
.ai-cp-ollama-refresh-btn:active {
  transform: scale(0.88);
}
.ai-cp-ollama-refresh-btn:focus-visible {
  outline: 2px solid var(--neon-bright, #00FF9F);
  outline-offset: 2px;
}

/* ── Ollama first-time hint ── */
.ai-cp-ollama-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  padding: 0.4rem;
  background: rgba(255,215,0,0.04);
  border: 1px solid rgba(255,215,0,0.12);
  border-radius: var(--radius-sm, 6px);
  line-height: 1.4;
}
.ai-cp-ollama-hint code {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  color: #FFD700;
}

@media (max-width: 640px) {
  .ai-cp-ollama-status-row {
    flex-wrap: wrap;
  }
  .ai-cp-ollama-hint {
    font-size: 0.6rem;
  }
}

/* Extra-small screens */
@media (max-width: 400px) {
  .ai-cp-row.ai-cp-baseurl-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ai-cp-row.ai-cp-baseurl-row .ai-cp-baseurl-input {
    width: 100%;
  }
  .ai-cp-row .ai-cp-label {
    font-size: 0.6rem;
  }
  .ai-cp-select {
    font-size: 0.65rem;
  }
}

/* AI Settings Tab */
.ai-settings-section { margin-bottom: 1rem; }
.ai-settings-section label { color: #888; font-size: 0.72rem; display: block; margin-bottom: 0.3rem; }
.ai-key-input {
  width: 100%;
  background: rgba(0,0,0,0.7); border: 1px solid rgba(0,255,159,0.25);
  border-radius: 6px; color: #00FF9F; padding: 0.45rem 0.6rem;
  font-size: 0.75rem; font-family: monospace; box-sizing: border-box; outline: none;
}
.ai-key-input:focus { border-color: #00FF9F; box-shadow: 0 0 6px rgba(0,255,159,0.2); }
.ai-key-input::placeholder { color: #444; }
.ai-save-btn {
  width: 100%; padding: 0.5rem; border-radius: 6px; cursor: pointer;
  background: rgba(0,255,159,0.1); border: 1px solid rgba(0,255,159,0.3);
  color: #00FF9F; font-size: 0.78rem; font-weight: 600; transition: all 0.2s ease;
}
.ai-save-btn:hover { background: rgba(0,255,159,0.2); }
.ai-save-msg { color: #00FF9F; font-size: 0.7rem; text-align: center; margin-top: 0.3rem; display: none; }
.ai-key-status {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 0.3rem; vertical-align: middle;
}
.ai-key-status.set { background: #00FF9F; }
.ai-key-status.unset { background: #444; }

/* Phase 1 — Motion & Delight */
.layer-selected {
  box-shadow: 0 0 0 3px rgba(0, 255, 159, 0.6);
  transition: box-shadow 0.2s ease;
}

.toolbar-button {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.toolbar-button:hover {
  transform: translateY(-2px) scale(1.05);
}

.properties-panel {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); /* elastic feel */
}

/* Phase 1 — Canvas Polish */
.canvas-grid {
  background-image:
    linear-gradient(rgba(0,255,159,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,159,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: gridPulse 12s linear infinite;
}

/* ── Loading shimmer (general purpose) ── */
.loading-shimmer {
  background: linear-gradient(90deg, transparent 25%, rgba(0,255,159,0.08) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.ai-generation-preview {
  background: linear-gradient(90deg, transparent 25%, rgba(0,255,159,0.15) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.layer-item-added {
  animation: layerPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes layerPopIn {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Right-Click Context Menu ── */
.neet-ctx-menu {
  position: fixed;
  z-index: 100020;
  min-width: 200px;
  background: var(--glass-bg-intense, rgba(10,10,15,0.97));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.2);
  border-radius: var(--radius-md, 10px);
  padding: 0.35rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 60px hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.04);
  opacity: 0;
  transform-origin: top left;
  transition: opacity 0.12s ease;
  font-size: 0.78rem;
}
.neet-ctx-menu.active {
  opacity: 1;
  animation: neetCtxIn 0.12s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes neetCtxIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.neet-ctx-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-body, #c8c8d0);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm, 6px);
  text-align: left;
  font-family: var(--font-primary, 'Inter', sans-serif);
  transition: background 0.1s ease, color 0.1s ease;
}
.neet-ctx-item:hover {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.1);
  color: var(--neon-bright, #00FF9F);
}
.neet-ctx-item:active {
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.18);
}
.neet-ctx-icon {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.neet-ctx-separator {
  height: 1px;
  margin: 0.25rem 0.5rem;
  background: hsla(var(--neon-h, 152), var(--neon-s, 85%), var(--neon-l, 48%), 0.08);
}

/* ═══════════════════════════════════════════════════════════
   Phase 0B — Mobile Left Menu Fix: hamburger + slide-in sidebar
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  body.mobile-layout #main-sidebar {
    position: fixed !important;
    left: -280px !important;
    top: 60px !important;
    bottom: 0 !important;
    width: 280px !important;
    height: calc(100vh - 60px) !important;
    transition: left 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    border-left: none !important;
  }
  body.mobile-layout #main-sidebar.open {
    left: 0 !important;
  }
  body.mobile-layout #editor-section > div[style*="display: flex"] > div:last-child {
    margin-left: 0 !important;
    width: 100% !important;
    flex: 1 1 100% !important;
  }
  body.mobile-layout .hamburger-btn {
      display: flex !important;
    }
  }

  /* ═══════════════════════════════════════════════════════════
     Phase B — Pro Multi-Track Mixer Styles
     ═══════════════════════════════════════════════════════════ */
  .pro-mixer-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(10,10,18,0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0,255,159,0.15);
    border-radius: 12px;
    margin-bottom: 1rem;
  }
  .pro-mixer-bar .transport-btn {
    background: rgba(0,255,159,0.1);
    border: 1px solid rgba(0,255,159,0.3);
    color: var(--neon);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
  }
  .pro-mixer-bar .transport-btn:hover {
    background: rgba(0,255,159,0.2);
    box-shadow: 0 0 12px rgba(0,255,159,0.2);
  }
  .pro-mixer-bar .transport-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
  .pro-mixer-bar .bpm-display {
    color: var(--neon);
    font-family: monospace;
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 70px;
  }
  .mixer-track-card {
    background: rgba(10,10,18,0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0,255,159,0.12);
    border-radius: 14px;
    padding: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
  }
  .mixer-track-card:hover {
    border-color: rgba(0,255,159,0.25);
  }
  .mixer-track-card.active {
    box-shadow: 0 0 24px rgba(0,255,159,0.35);
    border-color: var(--neon);
  }
  .mixer-track-card.dragging {
    opacity: 0.6;
    transform: scale(0.98);
  }
  .mixer-track-card.drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(255,0,170,0.25);
  }
  .mixer-waveform-wrap {
    height: 70px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(0,255,159,0.15);
    border-radius: 8px;
    overflow: hidden;
    margin: 0.5rem 0;
  }
  .mixer-controls-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .mixer-knob {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
  }
  .mixer-knob label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
  }
  .mixer-knob input[type="range"] {
    width: 50px;
    accent-color: var(--neon);
  }
  .mixer-btn-sm {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
  }
  .mixer-btn-sm:hover {
    border-color: rgba(0,255,159,0.4);
    color: var(--neon);
  }
  .mixer-btn-sm.muted {
    border-color: rgba(255,50,50,0.4);
    color: #ff5050;
  }
  .mixer-btn-sm.soloed {
    border-color: rgba(0,229,255,0.5);
    color: #00e5ff;
  }
  .timeline-audio-row {
    height: 60px;
    border-bottom: 1px solid #333;
    position: relative;
    background: rgba(255,105,180,0.05);
  }
  .timeline-audio-row canvas {
    width: 100%;
    height: 100%;
  }
  .timeline-audio-label {
    position: absolute;
    left: 4px;
    top: 2px;
    font-size: 0.55rem;
    color: #ff69b4;
    background: rgba(0,0,0,0.5);
    padding: 1px 4px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
  }

  /* ═══════════════════════════════════════════════════════════
     Phase B.5 — Pro Mixer Polish: glassmorphism, glows, drag
     ═══════════════════════════════════════════════════════════ */
  .mixer-track-card {
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, box-shadow, opacity;
  }
  .mixer-track-card:hover {
    box-shadow: 0 0 24px rgba(0,255,159,0.15), inset 0 0 30px rgba(0,255,159,0.03);
    border-color: rgba(0,255,159,0.35);
    transform: translateY(-1px);
  }
  .mixer-track-card.active {
    box-shadow: 0 0 32px rgba(0,255,159,0.45), inset 0 0 40px rgba(0,255,159,0.06);
    border-color: var(--neon);
  }
  .mixer-track-card.dragging {
    opacity: 0.85;
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px rgba(0,255,159,0.25);
    z-index: 10;
    cursor: grabbing;
  }
  .mixer-track-card.drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 24px rgba(255,0,170,0.35), inset 0 0 20px rgba(255,0,170,0.08);
    transform: translateY(-2px) scale(1.01);
  }
  .mixer-track-card.drag-dim {
    opacity: 0.45;
    filter: grayscale(0.6);
    transform: scale(0.98);
  }
  .mixer-waveform-wrap {
    transition: border-color 0.2s;
    position: relative;
  }
  .mixer-waveform-wrap.wf-loading::after {
    content: "Loading waveform…";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-dim);
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    border-radius: inherit;
    animation: wf-pulse 1.4s ease-in-out infinite;
  }
  @keyframes wf-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
  }
  .mixer-waveform-wrap.wf-error {
    border-color: rgba(255,50,50,0.4);
    background: rgba(255,50,50,0.08);
  }
  .mixer-waveform-wrap.wf-error::after {
    content: "Audio unavailable";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #ff5050;
    background: rgba(0,0,0,0.4);
    border-radius: inherit;
  }
  .pro-mixer-bar .transport-btn {
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  }
  .pro-mixer-bar .transport-btn:hover {
    box-shadow: 0 0 14px rgba(0,255,159,0.25);
    transform: translateY(-1px);
  }
  .pro-mixer-bar .transport-btn:active {
    transform: scale(0.97);
  }
  .mixer-btn-sm {
    transition: all 0.15s cubic-bezier(0.23, 1, 0.32, 1);
  }
  .mixer-btn-sm:hover {
    box-shadow: 0 0 8px rgba(0,255,159,0.15);
    transform: translateY(-1px);
  }
  .mixer-btn-sm.muted {
    box-shadow: 0 0 6px rgba(255,50,50,0.15);
  }
  .mixer-btn-sm.soloed {
    box-shadow: 0 0 6px rgba(0,229,255,0.2);
  }
  .mixer-knob input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    outline: none;
    transition: background 0.2s;
  }
  .mixer-knob input[type="range"]:hover {
    background: rgba(0,255,159,0.15);
  }
  .mixer-knob input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px rgba(0,255,159,0.4);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .mixer-knob input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 14px rgba(0,255,159,0.6);
  }
  .mixer-knob label {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
  }
  @media (max-width: 768px) {
    .pro-mixer-bar {
      flex-wrap: wrap;
      gap: 0.5rem;
      padding: 0.5rem;
    }
    .pro-mixer-bar .transport-btn {
      padding: 0.3rem 0.5rem;
      font-size: 0.7rem;
    }
    .mixer-track-card {
      padding: 0.6rem;
    }
    .mixer-waveform-wrap {
      height: 40px;
    }
    .mixer-controls-row {
      gap: 0.3rem;
    }
    .mixer-knob input[type="range"] {
      width: 40px;
    }
  }

  /* ═══════════════════════════════════════════════════════════
     Phase D — Help modal, onboarding hints, demo button polish
     ═══════════════════════════════════════════════════════════ */
  #dj-help-modal.active {
    display: flex;
  }
  #dj-help-modal.active .glass-panel {
    transform: scale(1) !important;
    opacity: 1 !important;
  }
  #dj-help-btn:hover {
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.35);
    transform: translateY(-2px) scale(1.05);
  }
  #dj-help-btn:active {
    transform: scale(0.95);
  }
  .dj-onboarding-hint {
    animation: hint-bob 2.2s ease-in-out infinite;
  }
  @keyframes hint-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
  }

  /* ═══════════════════════════════════════════════════════════
     Phase C — Community Vault + Sharing + XRPL Mint Tie-in
     ═══════════════════════════════════════════════════════════ */
  .community-vault-card {
    position: relative;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  }
  .community-vault-card:hover {
    border-color: rgba(0,255,159,0.35);
    box-shadow: 0 0 24px rgba(0,255,159,0.12), inset 0 0 30px rgba(0,255,159,0.03);
    transform: translateY(-2px);
  }
  .cv-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  .cv-mint-badge {
    background: rgba(0,229,255,0.12);
    border: 1px solid rgba(0,229,255,0.35);
    color: #00e5ff;
  }
  .cv-remix-badge {
    background: rgba(255,0,170,0.1);
    border: 1px solid rgba(255,0,170,0.3);
    color: #ff00aa;
  }
  .cv-like-btn {
    background: transparent;
    border: 1px solid rgba(255,50,50,0.2);
    color: #ff5050;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
  }
  .cv-like-btn:hover {
    background: rgba(255,50,50,0.1);
    border-color: rgba(255,50,50,0.4);
  }
  .mint-mix-btn {
    background: linear-gradient(135deg, rgba(0,229,255,0.15), rgba(0,255,159,0.1));
    border: 1px solid #00e5ff;
    color: #00e5ff;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: "Inter", sans-serif;
  }
  .mint-mix-btn:hover {
    box-shadow: 0 0 20px rgba(0,229,255,0.25);
    transform: translateY(-1px);
  }
  .mint-mix-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
  .mix-lineage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.55rem;
    color: var(--text-dim);
    background: rgba(0,0,0,0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
  }

  /* ═══════════════════════════════════════════════════════════
     Phase C.5 — Skeletons, offline banner, report button,
     mixer mobile touch, vault glassmorphism polish
     ═══════════════════════════════════════════════════════════ */
  .cv-skeleton {
    background: rgba(10,10,18,0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,255,159,0.08);
    border-radius: 14px;
    padding: 1rem;
    animation: skeleton-pulse 1.6s ease-in-out infinite;
  }
  @keyframes skeleton-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.75; }
  }
  .cv-skeleton .sk-line {
    height: 0.75rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    margin-bottom: 0.6rem;
  }
  .cv-skeleton .sk-title {
    width: 60%;
  }
  .cv-skeleton .sk-meta {
    width: 40%;
  }
  .cv-skeleton .sk-actions {
    width: 80%;
    margin-bottom: 0;
  }
  .cv-report-btn {
    background: transparent;
    border: 1px solid rgba(255,165,0,0.25);
    color: #ffa500;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
  }
  .cv-report-btn:hover {
    background: rgba(255,165,0,0.12);
    border-color: rgba(255,165,0,0.5);
  }
  #offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: rgba(255,50,50,0.15);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,50,50,0.35);
    color: #ff5050;
    text-align: center;
    padding: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  #offline-banner.hidden {
    display: none;
  }
  .mixer-track-card {
    touch-action: manipulation; /* Prevent browser zoom on double-tap */
    user-select: none;
    -webkit-user-select: none;
  }
  .mixer-track-card .mixer-waveform-wrap {
    touch-action: none; /* Allow custom touch handling without scroll interference */
  }
  @media (max-width: 768px) {
    .mixer-track-card {
      padding: 0.75rem;
      border-radius: 12px;
    }
    .mixer-track-card:active {
      transform: scale(0.99);
      box-shadow: 0 0 18px rgba(0,255,159,0.25), inset 0 0 20px rgba(0,255,159,0.04);
    }
    .community-vault-card {
      border-radius: 12px;
      padding: 0.75rem;
    }
    .community-vault-card .btn-neon {
      font-size: 0.7rem;
      padding: 0.35rem 0.6rem;
    }
  }

/* ═══════════════════════════════════════════════════════════
   BACKGROUND TOOL — Remove BG, Solid, Gradient, Pattern
   ═══════════════════════════════════════════════════════════ */

#bg-tool-menu {
  position: fixed;
  z-index: 10010;
  background: rgba(10,10,15,0.96);
  backdrop-filter: blur(16px);
  border: 1px solid #00FF9F;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0,255,159,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 0.6rem;
  min-width: 220px;
  user-select: none;
  color: #ddd;
}

#bg-tool-menu .bg-tool-option {
  background: rgba(0,255,159,0.08);
  border: 1px solid rgba(0,255,159,0.4);
  color: #00FF9F;
  padding: 0.5rem 0.3rem;
  border-radius: 6px;
  font-size: 0.7rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

#bg-tool-menu .bg-tool-option:hover {
  background: rgba(0,255,159,0.25);
  box-shadow: 0 0 12px rgba(0,255,159,0.4);
  transform: translateY(-1px);
}

#bg-tool-menu .bg-tool-option:active {
  transform: scale(0.95);
}

#bg-tool-menu .bg-tool-option.loading {
  opacity: 0.6;
  cursor: wait;
}

#bg-tool-menu .bg-tool-option.success-glow {
  box-shadow: 0 0 16px rgba(0,255,159,0.7);
}

/* Color pickers for Solid BG, Gradient, Pattern */
#bg-color-picker,
#bg-gradient-picker,
#bg-pattern-picker {
  z-index: 10011;
}

#bg-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

#bg-color-picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

#bg-gradient-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

#bg-gradient-picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

#bg-pattern-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

#bg-pattern-picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

#bg-gradient-picker input[type="range"] {
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0,255,159,0.3);
  border-radius: 2px;
  outline: none;
}

#bg-gradient-picker input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00FF9F;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.3);
}

/* ═══════════════════════════════════════════════════════════
   LEFT AI MENU POLISH — Sidebar provider status dots, Test All
   ═══════════════════════════════════════════════════════════ */

.ai-sb-provider-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.5rem;
  background: rgba(0,255,159,0.06);
  border: 1px solid rgba(0,255,159,0.2);
  color: rgba(0,255,159,0.6);
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-primary);
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.ai-sb-provider-tab:hover {
  background: rgba(0,255,159,0.15);
  border-color: rgba(0,255,159,0.5);
  color: #00FF9F;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(0,255,159,0.2);
}

.ai-sb-provider-tab.active {
  background: rgba(0,255,159,0.12);
  border-color: #00FF9F;
  color: #00FF9F;
  box-shadow: 0 0 14px rgba(0,255,159,0.3), inset 0 0 10px rgba(0,255,159,0.08);
}

.ai-sb-provider-tab:active {
  transform: scale(0.95);
}

.ai-sb-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
  border: 1.5px solid rgba(255,255,255,0.15);
}

.ai-sb-status-dot.connected {
  background: #00FF9F;
  box-shadow: 0 0 6px rgba(0,255,159,0.6);
  border-color: rgba(0,255,159,0.4);
}

.ai-sb-status-dot.failed {
  background: #FF00AA;
  box-shadow: 0 0 6px rgba(255,0,170,0.6);
  border-color: rgba(255,0,170,0.4);
}

.ai-sb-status-dot.unknown {
  background: rgba(255,255,255,0.15);
  box-shadow: none;
  border-color: rgba(255,255,255,0.1);
}

.ai-sb-status-dot.testing {
  background: #FFD700;
  box-shadow: 0 0 8px rgba(255,215,0,0.6);
  border-color: rgba(255,215,0,0.4);
  animation: aiSbPulse 0.6s ease-in-out infinite;
}

@keyframes aiSbPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

.ai-sb-test-all-btn {
  background: rgba(0,255,159,0.08);
  border: 1px solid rgba(0,255,159,0.3);
  color: rgba(0,255,159,0.7);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-primary);
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.ai-sb-test-all-btn:hover {
  background: rgba(0,255,159,0.15);
  border-color: #00FF9F;
  color: #00FF9F;
  box-shadow: 0 0 10px rgba(0,255,159,0.25);
  transform: translateY(-1px);
}

.ai-sb-test-all-btn:active {
  transform: scale(0.95);
}

.ai-sb-test-all-btn:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

#tab-ai .ai-sb-provider-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

/* Co-Pilot panel: sync active provider button with sidebar */
#ai-cp-provider-select option .ai-sb-status-dot {
  display: none;
}

/* ── AI Co-Pilot: Floating FAB reopen button ── */
.ai-cp-fab-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--neon);
  color: #0a0a0f;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--neon-glow);
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ai-cp-fab-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px var(--neon-glow);
}
.ai-cp-fab-btn:active {
  transform: scale(0.95);
}

/* ── AI Co-Pilot Walkthrough ── */
.ai-cp-walkthrough-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: aiWalkFadeIn 0.3s ease;
}
.ai-cp-walkthrough-modal {
  background: var(--glass-bg-strong);
  border: 1px solid var(--neon-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  color: var(--text-body);
  box-shadow: 0 0 40px var(--neon-glow);
  animation: aiWalkSlideUp 0.3s ease;
}
.ai-cp-walkthrough-modal h2 {
  color: var(--neon-bright);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 0.05em;
}
.ai-cp-walkthrough-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.ai-cp-walkthrough-step.active {
  opacity: 1;
}
.ai-cp-walkthrough-step-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
  line-height: 1.4;
}
.ai-cp-walkthrough-step-content {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.5;
}
.ai-cp-walkthrough-step-content strong {
  color: var(--neon-bright);
}
.ai-cp-walkthrough-step-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.ai-cp-walkthrough-step-content a {
  color: var(--neon-bright);
  text-decoration: underline;
}
.ai-cp-walkthrough-progress {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin: 1.5rem 0 1rem;
}
.ai-cp-walkthrough-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.3s;
}
.ai-cp-walkthrough-dot.active {
  background: var(--neon-bright);
}
.ai-cp-walkthrough-dot.done {
  background: var(--neon);
}
.ai-cp-walkthrough-btn-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.ai-cp-walkthrough-btn-row button {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-primary);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ai-cp-walkthrough-btn-row button:active {
  transform: scale(0.95);
}
.ai-cp-walkthrough-btn-next {
  background: var(--neon);
  color: #0a0a0f;
  font-weight: 600;
}
.ai-cp-walkthrough-btn-next:hover {
  box-shadow: 0 0 20px var(--neon-glow);
}
.ai-cp-walkthrough-btn-done {
  background: var(--neon);
  color: #0a0a0f;
  font-weight: 600;
}
.ai-cp-walkthrough-btn-done:hover {
  box-shadow: 0 0 20px var(--neon-glow);
}
.ai-cp-walkthrough-btn-skip {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.ai-cp-walkthrough-btn-skip:hover {
  color: var(--text-body);
}

@keyframes aiWalkFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes aiWalkSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Editor canvas layout — force full-size container */
#editor-section {
  height: calc(100vh - 80px) !important;
  min-height: 0 !important;
}

#editor-canvas-wrapper {
  flex: 1 1 0% !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  position: relative !important;
  overflow: hidden !important;
  align-self: stretch !important;
}

#editor-canvas-wrapper canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  z-index: 10 !important;
}
