/* ==================== Upload Modal V2 - 8-bit Steve Jobs ====================*/

/* Tier-based color system - Gold/Fire Theme */
.upload-v2-modal {
  --accent: #fbbf24;        /* Free tier - Gold */
  --accent-glow: rgba(251, 191, 36, 0.4);
  --accent-dim: rgba(251, 191, 36, 0.25);
  --accent-subtle: rgba(251, 191, 36, 0.1);
  --accent-fire: #ff6b35;   /* Fire orange for highlights */
}

.upload-v2-modal[data-tier="pro"] {
  --accent: #ff6b35;        /* Pro - Fire Orange */
  --accent-glow: rgba(255, 107, 53, 0.4);
  --accent-dim: rgba(255, 107, 53, 0.25);
  --accent-subtle: rgba(255, 107, 53, 0.1);
  --accent-fire: #ff4500;
}

.upload-v2-modal[data-tier="studio"] {
  --accent: #ffd700;        /* Studio - Bright Gold */
  --accent-glow: rgba(255, 215, 0, 0.5);
  --accent-dim: rgba(255, 215, 0, 0.3);
  --accent-subtle: rgba(255, 215, 0, 0.15);
  --accent-fire: #ffaa00;
}

.upload-v2-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.upload-v2-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.upload-v2-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
}

.upload-v2-content {
  position: relative;
  width: 90%;
  max-width: 480px;
  min-height: 420px;
  max-height: 90vh;
  background: #0d0a08;
  border: 2px solid var(--accent-dim);
  border-radius: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}

/* Styled scrollbar for dark theme */
.upload-v2-content::-webkit-scrollbar {
  width: 6px;
}
.upload-v2-content::-webkit-scrollbar-track {
  background: transparent;
}
.upload-v2-content::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 3px;
}
.upload-v2-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Subtle scanline overlay - CRT nostalgia */
.upload-v2-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
}

.upload-v2-modal.is-open .upload-v2-content {
  transform: scale(1) translateY(0);
}

/* ===== Drop State ===== */
.upload-v2-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  min-height: 420px;
  cursor: pointer;
  transition: all 0.3s;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 90%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
    #0d0a08;
  overflow: hidden;
}

/* Heat shimmer overlay */
.upload-v2-drop > *:first-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Forge corner brackets */
.upload-v2-drop::before,
.upload-v2-drop::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(251, 191, 36, 0.4);
  transition: all 0.3s;
  z-index: 20;
}

.upload-v2-drop::before {
  top: 20px;
  left: 20px;
  border-right: none;
  border-bottom: none;
  box-shadow: -2px -2px 12px rgba(255, 107, 53, 0.3);
}

.upload-v2-drop::after {
  bottom: 20px;
  right: 20px;
  border-left: none;
  border-top: none;
  box-shadow: 2px 2px 12px rgba(255, 107, 53, 0.3);
}

.upload-v2-drop:hover::before,
.upload-v2-drop:hover::after,
.upload-v2-drop.dragover::before,
.upload-v2-drop.dragover::after {
  border-color: #fbbf24;
  width: 36px;
  height: 36px;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
}

.drop-visual {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 28px;
  pointer-events: none; /* Let clicks pass through to drop zone */
}

/* ===== FIRE EFFECT ===== */

/* Base flame glow */
.drop-visual::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 160px;
  transform: translate(-50%, -55%);
  background: 
    radial-gradient(ellipse 50% 80% at 50% 100%, #ff6b35 0%, transparent 50%),
    radial-gradient(ellipse 60% 70% at 50% 100%, #fbbf24 0%, transparent 40%),
    radial-gradient(ellipse 40% 60% at 50% 100%, #fff5e0 0%, transparent 30%);
  filter: blur(8px);
  animation: fire-glow 0.8s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

/* Flame shapes - left */
.drop-visual::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 100px;
  background: 
    radial-gradient(ellipse 30% 50% at 30% 100%, #ff4500 0%, transparent 60%),
    radial-gradient(ellipse 30% 50% at 70% 100%, #ff4500 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 50% 100%, #fbbf24 0%, transparent 50%);
  filter: blur(4px);
  animation: flames-dance 0.5s ease-in-out infinite alternate;
  z-index: 1;
  pointer-events: none;
}

/* Rising embers container */
.drop-rings {
  display: block;
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}

/* Ember particles */
.ring {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fbbf24;
  border-radius: 50%;
  bottom: 20%;
  filter: blur(1px);
  animation: ember-rise 2s ease-out infinite;
}

.ring-1 {
  left: 30%;
  animation-delay: 0s;
  background: #ff6b35;
}

.ring-2 {
  left: 50%;
  animation-delay: 0.5s;
  background: #fbbf24;
  width: 4px;
  height: 4px;
}

.ring-3 {
  left: 70%;
  animation-delay: 1s;
  background: #ff4500;
  width: 5px;
  height: 5px;
}

/* Cassette icon floating above flames */
.drop-icon {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  animation: icon-hover-fire 1.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 20px rgba(255, 107, 53, 0.8)) 
          drop-shadow(0 0 40px rgba(251, 191, 36, 0.6));
  z-index: 10;
  transition: all 0.3s;
  pointer-events: none;
}

/* Core white-hot glow directly under icon */
.drop-visual .drop-icon::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(255, 250, 240, 0.9) 0%, rgba(255, 200, 100, 0.5) 40%, transparent 70%);
  filter: blur(6px);
  animation: core-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes fire-glow {
  0% { 
    opacity: 0.7;
    transform: translate(-50%, -55%) scale(1);
  }
  100% { 
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.05);
  }
}

@keyframes flames-dance {
  0% { 
    transform: translateX(-50%) scaleY(1) scaleX(1);
    opacity: 0.8;
  }
  100% { 
    transform: translateX(-50%) scaleY(1.1) scaleX(0.95);
    opacity: 1;
  }
}

@keyframes ember-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-80px) scale(0);
    opacity: 0;
  }
}

@keyframes icon-hover-fire {
  0%, 100% { 
    transform: translate(-50%, -50%);
  }
  50% { 
    transform: translate(-50%, calc(-50% - 8px));
  }
}

@keyframes core-pulse {
  0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.upload-v2-drop h2 {
  font-family: 'Press Start 2P', 'Space Mono', monospace;
  font-size: 1.1rem;
  font-weight: 400;
  color: #fff;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
  text-shadow: 
    0 0 10px rgba(251, 191, 36, 0.8),
    0 0 30px rgba(255, 107, 53, 0.5),
    0 0 50px rgba(255, 69, 0, 0.3);
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.upload-v2-drop p {
  color: rgba(255, 200, 150, 0.6);
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  margin: 0;
  letter-spacing: 0.5px;
  text-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
  position: relative;
  z-index: 10;
  pointer-events: none;
}

/* HEAT INTENSIFIES on hover/dragover */
.upload-v2-drop:hover .drop-visual::before,
.upload-v2-drop.dragover .drop-visual::before {
  width: 150px;
  height: 200px;
  filter: blur(10px);
  animation: fire-glow 0.4s ease-in-out infinite alternate;
}

.upload-v2-drop:hover .drop-visual::after,
.upload-v2-drop.dragover .drop-visual::after {
  height: 130px;
  animation: flames-dance 0.3s ease-in-out infinite alternate;
}

.upload-v2-drop:hover .ring,
.upload-v2-drop.dragover .ring {
  animation-duration: 1.2s;
}

.upload-v2-drop:hover .drop-icon,
.upload-v2-drop.dragover .drop-icon {
  transform: translate(-50%, -50%) scale(1.1);
  filter: drop-shadow(0 4px 30px rgba(255, 107, 53, 1)) 
          drop-shadow(0 0 60px rgba(251, 191, 36, 0.9))
          drop-shadow(0 0 80px rgba(255, 69, 0, 0.5));
  animation: icon-hover-fire 0.8s ease-in-out infinite;
}

/* Screen heat effect */
.upload-v2-drop.dragover {
  background: radial-gradient(ellipse at 50% 80%, rgba(255, 107, 53, 0.15) 0%, transparent 60%);
}

/* ===== Processing State - Terminal Style ===== */
.upload-v2-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
}

.processing-visual {
  margin-bottom: 32px;
}

/* 8-bit waveform bars */
.waveform-analyzer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--accent-dim);
  border-radius: 4px;
}

.wave-bar {
  width: 8px;
  height: 20px;
  background: var(--accent);
  border-radius: 0; /* Pixel-perfect squares */
  animation: wave-analyze 0.6s steps(4) infinite;
  box-shadow: 0 0 8px var(--accent-glow);
}

.wave-bar:nth-child(1) { animation-delay: 0.0s; }
.wave-bar:nth-child(2) { animation-delay: 0.08s; }
.wave-bar:nth-child(3) { animation-delay: 0.16s; }
.wave-bar:nth-child(4) { animation-delay: 0.24s; }
.wave-bar:nth-child(5) { animation-delay: 0.32s; }
.wave-bar:nth-child(6) { animation-delay: 0.40s; }
.wave-bar:nth-child(7) { animation-delay: 0.48s; }
.wave-bar:nth-child(8) { animation-delay: 0.56s; }

@keyframes wave-analyze {
  0%, 100% { height: 12px; }
  25% { height: 36px; }
  50% { height: 48px; }
  75% { height: 24px; }
}

.upload-v2-processing h2 {
  font-family: 'Press Start 2P', 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--accent);
  margin: 0 0 12px 0;
  text-shadow: 0 0 10px var(--accent-glow);
}

/* Terminal cursor blink */
.upload-v2-processing h2::after {
  content: '_';
  animation: cursor-blink 0.8s steps(1) infinite;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.processing-status {
  font-family: 'Space Mono', monospace;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin: 0;
  letter-spacing: 0.5px;
}

/* 8-bit Pixel Progress Bar */
.processing-progress {
  display: flex;
  gap: 4px;
  margin-top: 24px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 3px solid var(--accent-dim);
  border-radius: 0; /* Hard pixel edges */
}

/* Individual pixel blocks */
.pixel-block {
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0.3;
  animation: pixel-pop 2.5s steps(1) forwards;
}

/* Staggered fill animation */
.pixel-block:nth-child(1) { animation-delay: 0.15s; }
.pixel-block:nth-child(2) { animation-delay: 0.30s; }
.pixel-block:nth-child(3) { animation-delay: 0.45s; }
.pixel-block:nth-child(4) { animation-delay: 0.60s; }
.pixel-block:nth-child(5) { animation-delay: 0.75s; }
.pixel-block:nth-child(6) { animation-delay: 0.90s; }
.pixel-block:nth-child(7) { animation-delay: 1.05s; }
.pixel-block:nth-child(8) { animation-delay: 1.20s; }
.pixel-block:nth-child(9) { animation-delay: 1.35s; }
.pixel-block:nth-child(10) { animation-delay: 1.50s; }

/* Color gradient across blocks - gold to fire */
.pixel-block:nth-child(1),
.pixel-block:nth-child(2),
.pixel-block:nth-child(3) {
  --block-color: var(--accent);
}
.pixel-block:nth-child(4),
.pixel-block:nth-child(5),
.pixel-block:nth-child(6),
.pixel-block:nth-child(7) {
  --block-color: color-mix(in srgb, var(--accent) 50%, var(--accent-fire, #ff6b35));
}
.pixel-block:nth-child(8),
.pixel-block:nth-child(9),
.pixel-block:nth-child(10) {
  --block-color: var(--accent-fire, #ff6b35);
}

@keyframes pixel-pop {
  0% {
    opacity: 0.3;
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    background: var(--block-color, var(--accent));
    box-shadow: 0 0 8px var(--block-color, var(--accent));
    transform: scale(1);
  }
}

/* ===== Ready State ===== */
.upload-v2-ready {
  padding: 32px;
}

.upload-v2-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--accent-dim);
  border-radius: 6px;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.upload-v2-close:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-glow);
}

.ready-preview {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.preview-cover {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--accent-dim);
  cursor: pointer;
  transition: all 0.2s;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 var(--accent-glow);
  }
  50% { 
    transform: scale(1.015);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
  }
}

.preview-cover:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px var(--accent-glow);
  transform: scale(1.03);
  animation: none; /* Pause breathing on hover */
}

/* Upload overlay on hover */
.preview-cover::after {
  content: '📷';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none; /* Let clicks pass through to file input */
}

.preview-cover:hover::after {
  opacity: 1;
}

/* Hidden file input */
.preview-cover input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.preview-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  opacity: 0;
  transition: opacity 0.2s;
}

.preview-cover:hover .cover-actions {
  opacity: 1;
}

.cover-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.cover-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-family: 'Press Start 2P', 'Space Mono', monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 400;
  text-shadow: 0 0 8px var(--accent-glow);
  opacity: 0.85;
}

.preview-title,
.preview-artist {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 0;
  color: #fff;
  font-family: 'Press Start 2P', monospace !important;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.preview-title {
  font-size: 0.75rem;
  line-height: 1.6;
}

.preview-artist {
  font-size: 0.65rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.preview-title:focus,
.preview-artist:focus {
  border-color: var(--accent);
  outline: none;
  text-shadow: 0 0 12px var(--accent-glow);
}

.preview-title::placeholder,
.preview-artist::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

/* Metadata Row - 8-bit style */
.ready-metadata {
  margin-bottom: 20px;
  position: relative;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

/* Pixel corner brackets */
.ready-metadata::before,
.ready-metadata::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-glow);
}

.ready-metadata::before {
  top: 4px;
  left: 4px;
  border-right: none;
  border-bottom: none;
}

.ready-metadata::after {
  bottom: 4px;
  right: 4px;
  border-left: none;
  border-top: none;
}

.metadata-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* Description & Tags rows: single item spans full width */
.metadata-row:has(.metadata-description),
.metadata-row:has(.metadata-tags-input) {
  grid-template-columns: 1fr;
}

.metadata-description {
  width: 100% !important;
  min-height: 72px;
  resize: vertical;
}

.metadata-tags-input {
  width: 100% !important;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.metadata-input,
.metadata-select,
.metadata-description,
.metadata-tags-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(10, 5, 20, 0.8);
  border: 2px solid var(--accent-dim);
  border-radius: 4px;
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

/* Hide number input spinners - Steve Jobs would never */
.metadata-input[type="number"]::-webkit-inner-spin-button,
.metadata-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.metadata-input[type="number"] {
  -moz-appearance: textfield;
}

.metadata-input:hover,
.metadata-select:hover,
.metadata-description:hover,
.metadata-tags-input:hover {
  border-color: var(--accent-dim);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 12px var(--accent-subtle);
}

.metadata-input:focus,
.metadata-select:focus,
.metadata-description:focus,
.metadata-tags-input:focus {
  border-color: var(--accent);
  background: rgba(10, 8, 13, 0.9);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-dim);
}

/* Auto-filled fields get a subtle pulse to show "I filled this for you" */
.auto-filled {
  animation: autoFillGlow 1.5s ease-out;
}

@keyframes autoFillGlow {
  0% { border-color: var(--accent); box-shadow: 0 0 15px var(--accent-dim); }
  100% { border-color: var(--accent-dim); box-shadow: none; }
}

.metadata-select {
  cursor: pointer;
  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='%23888' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.metadata-select option {
  background: #1a1410;
  color: #fff;
}

.metadata-select optgroup {
  background: #0d0a08;
  color: var(--accent);
  font-weight: 600;
  font-style: normal;
  padding: 8px 0;
}

.metadata-select optgroup option {
  background: #14100c;
  color: #fff;
  padding-left: 12px;
}

/* Custom BPM Input */
.bpm-custom {
  margin-top: 8px;
}

.bpm-custom-input {
  width: 100%;
  padding: 10px 12px;
  background: #0d0a08;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Space Mono', monospace;
  outline: none;
  transition: all 0.2s;
}

.bpm-custom-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}

.bpm-custom-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Hide spinners on custom BPM */
.bpm-custom-input::-webkit-inner-spin-button,
.bpm-custom-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bpm-custom-input {
  -moz-appearance: textfield;
}

/* Price Options - 8-bit style */
.ready-price {
  margin-bottom: 24px;
  position: relative;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

/* Pixel corner brackets */
.ready-price::before,
.ready-price::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-glow);
}

.ready-price::before {
  top: 4px;
  left: 4px;
  border-right: none;
  border-bottom: none;
}

.ready-price::after {
  bottom: 4px;
  right: 4px;
  border-left: none;
  border-top: none;
}

.ready-price .field-label {
  margin-bottom: 10px;
}

.price-options {
  display: flex;
  gap: 8px;
}

.price-option {
  flex: 1;
  padding: 10px 12px;
  background: rgba(10, 5, 20, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.price-option:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-glow);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-subtle);
}

.price-option.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow), inset 0 0 20px var(--accent-subtle);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Custom Price Input - Sleek inline design */
.price-custom {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 14px 20px;
  background: rgba(10, 8, 15, 0.6);
  border: 1px solid var(--accent-dim);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.price-custom.hidden {
  display: none;
}

.price-currency {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}

.price-custom-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  outline: none;
  width: 80px;
  font-family: 'Space Mono', monospace;
}

/* Hide spinners on custom price too */
.price-custom-input::-webkit-inner-spin-button,
.price-custom-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-custom-input {
  -moz-appearance: textfield;
}

.price-custom-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}

/* ===== Waveform Preview - Visualizer vibes ===== */
.ready-waveform {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  margin-bottom: 20px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

/* Subtle glow behind waveform */
.ready-waveform::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 30%;
  width: 40%;
  height: 100%;
  background: radial-gradient(ellipse, var(--accent-subtle) 0%, transparent 70%);
  transform: translateY(-50%);
  pointer-events: none;
}

.waveform-container {
  flex: 1;
  height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.waveform-container .waveform-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(0,0,0,0.5) 100%);
  border-radius: 1px 1px 0 0;
  min-width: 3px;
  box-shadow: 0 0 6px var(--accent-glow);
  animation: none;
}

.waveform-play {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), rgba(0,0,0,0.3));
  border: 2px solid var(--accent-glow);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.waveform-play:hover {
  transform: scale(1.05);
  box-shadow: 0 0 24px var(--accent-glow);
  border-color: var(--accent);
}

.waveform-play:active {
  transform: scale(0.98);
}

/* Waveform bar dance animation */
@keyframes bar-dance {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* ToS Checkbox */
.upload-v2-tos {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  cursor: pointer;
  user-select: none;
}
.upload-v2-tos input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.upload-v2-tos span {
  line-height: 1.3;
}

/* Publish Button - INSERT COIN vibes */
.upload-v2-publish {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), rgba(0,0,0,0.2));
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Press Start 2P', 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: publish-glow 2s ease-in-out infinite;
}

@keyframes publish-glow {
  0%, 100% { 
    box-shadow: 0 4px 20px var(--accent-glow);
  }
  50% { 
    box-shadow: 0 4px 30px var(--accent-glow), 0 0 40px var(--accent-subtle);
  }
}

.upload-v2-publish:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
  animation: none;
}

.upload-v2-publish:active {
  transform: translateY(0);
}

.upload-v2-publish:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  animation: none;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Mobile */
@media (max-width: 520px) {
  .upload-v2-content {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    border-radius: 24px 24px 0 0;
    position: absolute;
    bottom: 0;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .upload-v2-modal.is-open .upload-v2-content {
    transform: translateY(0);
  }
  
  .upload-v2-drop {
    padding: 48px 24px;
  }
  
  .upload-v2-ready {
    padding: 24px;
  }
  
  .ready-preview {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .preview-cover {
    width: 120px;
    height: 120px;
  }
  
  .preview-info {
    width: 100%;
  }
  
  .preview-title,
  .preview-artist {
    text-align: center;
  }
  
  .metadata-row {
    flex-wrap: wrap;
  }
  
  .metadata-item {
    min-width: calc(50% - 6px);
  }
  
  .metadata-item:last-child {
    flex: 100%;
  }
}

/* ==================== Sign In Prompt - Steve Jobs Approved ==================== */
.upload-signin-prompt {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.upload-signin-prompt.is-open {
  opacity: 1;
  visibility: visible;
}

.signin-prompt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

.signin-prompt-content {
  position: relative;
  width: 90%;
  max-width: 360px;
  padding: 48px 40px;
  background: linear-gradient(180deg, #14100c 0%, #0d0a08 100%);
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 0 60px rgba(251, 191, 36, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

.upload-signin-prompt.is-open .signin-prompt-content {
  transform: scale(1) translateY(0);
}

.signin-prompt-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: icon-bounce 2s ease-in-out infinite;
}

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

.signin-prompt-content h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: #fff;
  margin: 0 0 12px 0;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.signin-prompt-content p {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 32px 0;
}

.signin-prompt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #fbbf24, #ff6b35);
  border: none;
  border-radius: 12px;
  color: #000;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.signin-prompt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(251, 191, 36, 0.5);
}

.signin-prompt-btn img {
  width: 20px;
  height: 20px;
}

.signin-prompt-close {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.signin-prompt-close:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

/* ==================== Audio Analysis States ==================== */

/* Analyzing state - subtle pulse */
.metadata-input.analyzing,
.metadata-select.analyzing {
  animation: analyzing-pulse 1.5s ease-in-out infinite;
}

@keyframes analyzing-pulse {
  0%, 100% { 
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.03);
  }
  50% { 
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.08);
  }
}

/* Detection success - brief green flash */
.metadata-input.detection-success,
.metadata-select.detection-success {
  animation: detection-success 0.6s ease-out;
}

@keyframes detection-success {
  0% { 
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
  }
  100% { 
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
  }
}

/* Auto-filled indicator */
.metadata-input.auto-filled,
.metadata-select.auto-filled {
  border-color: rgba(34, 197, 94, 0.3);
}

.metadata-input.auto-filled:focus,
.metadata-select.auto-filled:focus {
  border-color: var(--accent);
}

/* Uncertain detection - yellow/amber indicator with "?" */
.metadata-input.uncertain,
.metadata-select.uncertain {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.08);
  position: relative;
}

.metadata-input.uncertain::after,
.metadata-select.uncertain::after {
  content: '?';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #fbbf24;
  font-weight: bold;
  font-size: 0.9em;
}

/* Parent container needs relative positioning for the pseudo-element */
.metadata-item:has(.uncertain) {
  position: relative;
}

.metadata-item:has(.uncertain)::after {
  content: '?';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #fbbf24;
  font-weight: bold;
  font-size: 1em;
  pointer-events: none;
  z-index: 1;
}

/* ==================== Batch Upload (Multi-Track) ==================== */
.upload-v2-batch {
  padding: 24px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.batch-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #00ffc8;
  margin-bottom: 20px;
  text-align: center;
}

.batch-shared-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.batch-shared-meta .field-group {
  flex: 1;
  min-width: 120px;
}

.batch-track-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.batch-track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}

.batch-track:last-child { border-bottom: none; }
.batch-track.is-uploading { background: rgba(0, 255, 200, 0.03); }
.batch-track.is-done { opacity: 0.5; }
.batch-track.is-error { background: rgba(255, 0, 0, 0.05); }

.batch-track-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  min-width: 20px;
}

.batch-track-title {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  padding: 4px 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}

.batch-track-title:focus {
  border-color: rgba(0, 255, 200, 0.3);
  outline: none;
}

.batch-track-size {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  min-width: 45px;
  text-align: right;
}

.batch-track-status {
  min-width: 24px;
  text-align: center;
  font-size: 14px;
}

.batch-progress-wrap {
  margin-bottom: 16px;
}

.batch-progress-text {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  text-align: center;
}

.batch-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.batch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ffc8, #00b89c);
  border-radius: 2px;
  transition: width 0.3s;
}

/* ==================== Ownership Confirmation Gate ==================== */
.upload-v2-ownership {
  background: rgba(0, 255, 245, 0.03);
  border: 1px solid rgba(0, 255, 245, 0.15);
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
}

.ownership-header {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #00fff5;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.ownership-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 16px;
}

.ownership-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.ownership-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1px solid rgba(0, 255, 245, 0.3);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
  margin-top: 2px;
  cursor: pointer;
  position: relative;
}

.ownership-check input[type="checkbox"]:checked {
  background: rgba(0, 255, 245, 0.15);
  border-color: #00fff5;
}

.ownership-check input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 2px;
  font-size: 12px;
  color: #00fff5;
}

.ownership-link {
  color: #00fff5;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 245, 0.3);
}

.ownership-link:hover {
  border-bottom-color: #00fff5;
}

.ownership-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.upload-v2-cancel {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-v2-cancel:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
}
