@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #070709;
  --bg-card: rgba(18, 18, 22, 0.75);
  --bg-card-hover: rgba(26, 26, 32, 0.9);
  
  --border-light: rgba(255, 255, 255, 0.05);
  --border-active: rgba(239, 68, 68, 0.35);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #4b5563;
  
  --accent-red: #ef4444;
  --accent-darkred: #991b1b;
  --accent-white: #ffffff;
  --accent-gray: #374151;
  
  --gradient-neon: linear-gradient(135deg, var(--accent-red) 0%, #b91c1c 50%, var(--accent-darkred) 100%);
  --gradient-glow: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(153, 27, 27, 0.2) 50%, rgba(153, 27, 27, 0.1) 100%);
  
  --shadow-neon: 0 0 30px rgba(239, 68, 68, 0.2);
  --shadow-neon-hover: 0 0 45px rgba(239, 68, 68, 0.35);
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  background-image: 
    linear-gradient(to right, #070709 0%, rgba(7, 7, 9, 0) 15%, rgba(7, 7, 9, 0) 85%, #070709 100%),
    linear-gradient(to bottom, #070709 0%, rgba(7, 7, 9, 0.4) 15%, rgba(7, 7, 9, 0.55) 85%, #070709 100%),
    url('guitar-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.app-container {
  width: calc(100% - 32px);
  max-width: 100%;
  margin: 10px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Header Section */
.app-header {
  position: relative;
  text-align: center;
  margin-bottom: 0px;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.0rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: linear-gradient(135deg, 
    #ffffff 0%, 
    #ffffff 35%, 
    var(--accent-red) 47%, 
    #ff8888 50%, 
    var(--accent-red) 53%, 
    #ffffff 65%, 
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: flowWave 4s linear infinite;
  filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.3));
  margin-bottom: 0px;
  position: relative;
  display: inline-block;
}

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

h1::after {
  content: 'v3.0';
  position: absolute;
  bottom: 4px;
  right: -55px;
  font-size: 0.65rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--accent-red);
  border: 1px solid var(--border-active);
  padding: 1px 4px;
  border-radius: 4px;
  -webkit-text-fill-color: var(--accent-red);
  letter-spacing: normal;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
}

/* Console Rack Grid */
.console-rack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 768px) {
  .console-rack {
    grid-template-columns: 1fr;
  }
}

.rack-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

/* Rack Unit Card (Sleek hardware module look) */
.rack-unit {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.rack-unit:hover {
  border-color: rgba(255, 255, 255, 0.08);
  z-index: 10;
}

/* Sizing and alignment for console units */
.grow-unit {
  display: flex;
  flex-direction: column;
}

.grow-unit .unit-body {
  display: flex;
  flex-direction: column;
}

.grow-unit .style-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.grow-unit .style-card {
  min-height: 28px;
  padding: 4px 10px;
}

.grow-unit .maximizer-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 142px;
  box-sizing: border-box;
}


.unit-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-light);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.visualizer-header {
  justify-content: space-between;
}

.viz-style-selector {
  display: flex;
  gap: 6px;
}

.viz-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.viz-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.viz-btn.active {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--border-active);
  color: var(--accent-red);
}

.unit-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-transform: uppercase;
}

/* LED Indicator Glow */
.unit-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

.unit-body {
  padding: 12px 14px;
}

/* --- Unit 1: Dropzone & File Info --- */
#input-unit-body {
  height: 142px;
  box-sizing: border-box;
}

.dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.005);
  transition: var(--transition-smooth);
  text-align: center;
}

.dropzone:hover {
  border-color: var(--accent-red);
  background: rgba(239, 68, 68, 0.02);
}

.dropzone-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.dropzone:hover .dropzone-icon {
  color: var(--accent-red);
}

.dropzone-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* File Info Box */
.file-info {
  display: none;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  animation: fadeIn 0.3s ease-out;
}

.file-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.file-name {
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 75%;
}

.remove-file {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  padding: 4px 10px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.remove-file:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-main);
}

.waveform-container {
  width: 100%;
  height: 38px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}

.waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.file-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Unit 2: Character EQ --- */
.style-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.style-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 4px 10px;
  min-height: 28px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.style-card:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateX(3px);
}

.style-card.active {
  background: rgba(239, 68, 68, 0.04);
  border-color: var(--border-active);
}

.style-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
}

.style-card.active .style-name {
  color: var(--accent-red);
}

.style-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Unit 3: Spatial Profile Grid --- */
.spatial-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.style-card.spatial-card {
  padding: 4px 10px;
  min-height: 28px;
}

.style-card.spatial-card.active {
  background: rgba(239, 68, 68, 0.04);
  border-color: var(--border-active);
}

.style-card.spatial-card.active .style-name {
  color: var(--accent-red);
}

/* --- Unit 4: Maximizer Output --- */
.maximizer-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 142px;
  box-sizing: border-box;
}

.slider-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

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

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
}

.slider-value {
  color: var(--accent-red);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  transition: var(--transition-smooth);
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-main);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.custom-range::-webkit-slider-thumb:hover {
  background: var(--accent-red);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
  transform: scale(1.15);
}

/* Tooltips */
.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  margin-left: 4px;
  vertical-align: middle;
}

.tooltip:hover {
  color: var(--accent-red);
  z-index: 999;
}

.tooltip-text {
  visibility: hidden;
  width: 250px;
  background-color: #0b0c10;
  color: var(--text-main);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  position: absolute;
  z-index: 100;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.tooltip-text p {
  margin-bottom: 4px;
}

.tooltip-text p:last-child {
  margin-bottom: 0;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
  text-align: center;
  transition: var(--transition-smooth);
}

.tooltip:hover .tooltip-icon {
  border-color: var(--accent-red);
  color: var(--accent-red);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.2);
}

.header-tooltip {
  margin-left: auto;
}

.header-tooltip .tooltip-text {
  bottom: auto;
  top: 130%;
  left: auto;
  right: 0;
  transform: translateX(0);
}

.header-tooltip:hover .tooltip-text {
  transform: translateY(2px);
}


/* Master Action Button */
.master-action-row {
  display: flex;
  height: 48px;
  position: relative;
}

.btn-master {
  width: 100%;
  height: 100%;
  background: var(--gradient-neon);
  color: var(--text-main);
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-neon);
  text-align: center;
}

.btn-master:hover:not(:disabled) {
  box-shadow: var(--shadow-neon-hover);
  transform: translateY(-1px);
}

.btn-master:disabled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dark);
  box-shadow: none;
  cursor: not-allowed;
}

.processing-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 7, 9, 0.85);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border-active);
  animation: fadeIn 0.2s ease-out;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  border-top-color: var(--accent-red);
  animation: spin 0.8s linear infinite;
}

.progress-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-red);
  font-family: 'Space Grotesk', sans-serif;
}

/* --- Monitor Channel (A/B Compare Player) --- */
.output-container {
  display: none;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.005) 100%);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  justify-content: space-between;
}

.player-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: -5px;
}

.audio-visual-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.audio-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-neon);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.audio-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  margin-top: -10px;
}

/* LUFS Badges Display */
.lufs-badges-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.lufs-badge {
  flex: 1;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.lufs-badge:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}

.lufs-badge-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lufs-badge-value {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}

.lufs-badge-value.original {
  color: var(--text-main);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.lufs-badge-value.mastered {
  color: var(--accent-red);
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

/* Horizontal Player Control Layout */
.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.ab-comparison {
  display: flex;
  gap: 8px;
}

.match-volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.switch-label input {
  display: none;
}

.switch-slider {
  position: relative;
  width: 34px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch-label input:checked + .switch-slider {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: var(--border-active);
}

.switch-label input:checked + .switch-slider::before {
  transform: translateX(16px);
  background-color: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

.switch-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.switch-label input:checked ~ .switch-text {
  color: var(--text-main);
}

.toggle-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

#btn-original.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--accent-white);
}

#btn-mastered.active {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  background: var(--text-main);
  color: var(--bg-dark);
  transform: scale(1.05);
}

.btn-download {
  background: var(--gradient-neon);
  border: none;
  color: var(--text-main);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-neon);
}

.btn-download svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-download:hover {
  box-shadow: var(--shadow-neon-hover);
  transform: translateY(-1px);
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

/* Player Actions Secondary Row */
.player-actions-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  padding-top: 15px;
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-video:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--accent-red);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

/* Modals Overlay & Card Layout */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 7, 9, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease-out;
}

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

.modal-card {
  background: #0d0d11;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--accent-red);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Stripe Form & Styling */
.product-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 16px;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
  font-family: 'Space Grotesk', sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

.product-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.product-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-red);
}

/* Stripe Checkout Container */
.stripe-checkout-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
}

.checkout-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkout-detail-row .detail-value {
  color: var(--text-main);
  font-weight: 500;
}

.checkout-detail-row.total-row {
  border-top: 1px dashed var(--border-light);
  padding-top: 12px;
  margin-top: 4px;
  font-size: 1.05rem;
}

.checkout-detail-row.total-row .detail-value {
  color: #ffffff;
  font-weight: 700;
}

.btn-stripe-pay {
  background: #635bff; /* Stripe Purple */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(99, 91, 255, 0.2);
  text-decoration: none;
  text-align: center;
  display: block;
}

.btn-stripe-pay:hover {
  background: #7a73ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 91, 255, 0.35);
}

.btn-stripe-pay:active {
  transform: translateY(0);
}

.stripe-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stripe-logo-svg {
  color: #635bff;
}

/* Loading state for simulated payment */
.payment-loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 7, 9, 0.95);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  z-index: 10;
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.payment-loading-overlay.active {
  display: flex;
}

.payment-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: #635bff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.payment-loading-text {
  font-size: 0.85rem;
  color: var(--text-main);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.05em;
}

.test-payment-helper {
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-bypass-link {
  background: transparent;
  border: none;
  color: var(--accent-red);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
  transition: var(--transition-smooth);
}

.btn-bypass-link:hover {
  color: var(--text-main);
}

/* Video Render Modal Layout */
.render-card {
  max-width: 320px;
  align-items: center;
}

.render-body {
  width: 100%;
  align-items: center;
}

.render-preview-container {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
}

#render-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.render-progress-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.render-progress-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.render-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--gradient-neon);
  transition: width 0.1s linear;
}

.render-progress-text-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-muted);
}

#render-status {
  font-weight: 500;
}

#render-percentage {
  color: var(--accent-red);
  font-weight: 600;
}

/* Change Selections Confirmation Modal Styles */
.confirm-card {
  max-width: 350px !important;
  padding: 24px !important;
  text-align: center;
}

.confirm-message {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.btn-confirm-no {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-confirm-no:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-confirm-yes {
  flex: 1;
  background: var(--gradient-neon);
  border: none;
  color: var(--text-main);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-neon);
}

.btn-confirm-yes:hover {
  box-shadow: var(--shadow-neon-hover);
  transform: translateY(-1px);
}


/* Split Player Layout and Live Visualizer Styles */
.player-split-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  width: 100%;
}

.visualizer-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.005) 100%);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  min-height: 220px;
}

.visualizer-body {
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

.visualizer-canvas-wrapper {
  position: relative;
  height: 160px;
  aspect-ratio: 9/16;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  background: #020203;
}

#player-visualizer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Visualizer Video Render Warning Box Styling */
.render-warning-box {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
  animation: pulseGlow 2.5s infinite ease-in-out;
}

.warning-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.warning-text {
  font-size: 0.78rem;
  color: var(--text-main);
  line-height: 1.45;
  text-align: left;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
}

@keyframes pulseGlow {
  0%, 100% {
    border-color: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.04);
  }
  50% {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.18);
  }
}

@media (max-width: 768px) {
  .player-split-layout {
    grid-template-columns: 1fr;
  }
  
  .visualizer-canvas-wrapper {
    height: auto;
    width: 100%;
    max-width: 220px;
    aspect-ratio: 9/16;
  }

  .player-controls-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .btn-download {
    width: 100%;
    margin-top: 4px;
  }
}

/* Desktop Mastered Active Viewport Fill */
@media (min-width: 769px) {
  body.mastered-active {
    overflow: hidden;
  }

  body.mastered-active .app-header {
    flex-shrink: 0;
  }

  body.mastered-active .app-container {
    height: calc(100vh - 20px);
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  body.mastered-active .console-rack {
    flex-shrink: 0;
  }

  /* Monitor Channel / Comparison Player compression */
  body.mastered-active .output-container {
    display: block !important;
    flex: 1;
    min-height: 0;
  }

  body.mastered-active .player-split-layout {
    height: 100%;
    gap: 10px;
  }

  body.mastered-active .player-card {
    height: 100%;
    min-height: 0;
    padding: 8px 12px;
    gap: 6px;
  }

  body.mastered-active .player-header {
    margin-bottom: -6px;
  }

  body.mastered-active .audio-time-row {
    margin-top: -6px;
  }

  body.mastered-active .lufs-badges-container {
    gap: 6px;
  }

  body.mastered-active .lufs-badge {
    padding: 3px 8px;
  }

  body.mastered-active .visualizer-card {
    height: 100%;
    min-height: 0;
  }

  body.mastered-active .visualizer-body {
    padding: 6px;
  }

  body.mastered-active .visualizer-canvas-wrapper {
    height: 75%;
    max-height: 180px;
  }
}



/* Hamburger Menu Toggle Button */
.menu-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 36px;
  height: 32px;
  padding: 9px 8px;
  z-index: 10000;
  transition: var(--transition-smooth);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-active);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.menu-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Open/active state for hamburger animation */
.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menu Dropdown Panel */
.menu-dropdown {
  position: absolute;
  top: 48px;
  left: 10px;
  background: rgba(13, 13, 17, 0.96);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--shadow-neon);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  flex-direction: column;
  padding: 6px 0;
  min-width: 190px;
  z-index: 9999;
  transform-origin: top left;
  animation: menuScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuScaleIn {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.menu-dropdown.active {
  display: flex;
}

.menu-item {
  background: none;
  border: none;
  color: var(--text-main);
  padding: 10px 16px;
  text-align: left;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.menu-item:first-child:hover {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.menu-item:last-child:hover {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.menu-icon {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  transition: var(--transition-smooth);
}

.menu-item:hover .menu-icon {
  stroke: var(--accent-red);
}

/* Modals sizing and scrollable areas */
.faq-card {
  max-width: 600px;
}

.contact-card {
  max-width: 460px;
}

.scrollable-content {
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 12px;
}

/* Scrollbar styling for modal lists */
.scrollable-content::-webkit-scrollbar {
  width: 5px;
}

.scrollable-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
  border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb {
  background: rgba(239, 68, 68, 0.2);
  border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* FAQ Layout items */
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.faq-question {
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.01em;
}

.faq-answer {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 300;
}

/* Contact form inputs layout */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  text-align: left;
}

.form-group label {
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.contact-status-msg {
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}

.contact-status-msg.success {
  display: block;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.contact-status-msg.error {
  display: block;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

/* Adjustments for top header on mobile */
@media (max-width: 768px) {
  .menu-toggle {
    top: 8px;
    left: 8px;
  }
  .menu-dropdown {
    top: 44px;
    left: 8px;
  }
}

/* Promo Bypass Code styling inside checkout modal */
.promo-code-container {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.promo-code-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 5px 0 10px 0;
}

.promo-code-divider::before,
.promo-code-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.promo-code-divider:not(:empty)::before {
  margin-right: .6em;
}

.promo-code-divider:not(:empty)::after {
  margin-left: .6em;
}

.promo-code-row {
  display: flex;
  gap: 8px;
  max-width: 340px;
  margin: 0 auto;
  width: 100%;
}

#promo-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.9rem;
  outline: none;
  font-family: 'Outfit', sans-serif;
  transition: var(--transition-smooth);
}

#promo-input:focus {
  border-color: var(--accent-red);
  background: rgba(255, 255, 255, 0.05);
}

#btn-promo-apply {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: var(--transition-smooth);
}

#btn-promo-apply:hover {
  background: var(--gradient-neon);
  border-color: transparent;
  box-shadow: var(--shadow-neon-hover);
}

.promo-error-msg {
  color: var(--accent-red);
  font-size: 0.8rem;
  margin-top: 2px;
  display: none;
  text-align: center;
}


