/* =============================================================================
   SolusNoir - Dark Noir Styling + Mobile Support
   ============================================================================= */

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

:root {
  --noir-black: #0a0a0f;
  --noir-gray: #1a1a1f;
  --noir-border: #2a2a2f;
  --white: #ffffff;
  --white-60: rgba(255, 255, 255, 0.6);
  --white-40: rgba(255, 255, 255, 0.4);
  --white-10: rgba(255, 255, 255, 0.1);
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #10b981;
  --warning: #f59e0b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", sans-serif;
  background: var(--noir-black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  border-bottom: 1px solid var(--noir-border);
  backdrop-filter: blur(10px);
  background: rgba(10, 10, 15, 0.9);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

/* Ensure header content does not underlap the top-right logo */
.header {
  padding-right: 4.5rem; /* leaves space for #siteLogo */
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo svg {
  color: var(--accent);
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-tagline {
  display: block;
  font-size: 0.75rem;
  color: var(--white-60);
  font-weight: 400;
}

/* Site logo inside the left header .logo container */
.logo img {
  height: 40px;
  width: auto;
  border-radius: 6px;
  object-fit: contain;
  margin-right: 0.75rem;
}

.btn-pro {
  padding: 0.5rem 1.5rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-pro:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Main */
.main {
  padding: 3rem 0;
}

/* Upload Section */
.upload-section {
  text-align: center;
  padding: 4rem 0;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--white-60);
  margin-bottom: 3rem;
}

.upload-zone {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 2rem;
  border: 2px dashed var(--white-40);
  border-radius: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
  transform: scale(1.02);
}

.upload-icon {
  color: var(--white-40);
  margin-bottom: 1.5rem;
}

.upload-text {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.upload-hint {
  color: var(--white-40);
  font-size: 0.875rem;
}

/* Editor Section */
.editor-section {
  animation: fadeIn 0.5s;
}

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

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Cards */
.card {
  background: var(--noir-gray);
  border: 1px solid var(--noir-border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
}

.card:hover {
  background: rgba(26, 26, 31, 0.8);
  border-color: var(--white-10);
}

.track-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-info {
  color: var(--white-60);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Waveform */
.waveform-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#waveformCanvas {
  width: 100%;
  height: auto;
}

/* Playback Controls */
.playback-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-play {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.btn-play:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.btn-play svg {
  color: var(--white);
}

.time-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.time-display {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  color: var(--white-60);
  flex-shrink: 0;
  min-width: 2.5rem;
}

/* 🔥 FIXED: Breder progress bar + cursor pointer */
.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--white-10);
  border-radius: 9999px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: height 0.2s;
}

.progress-bar:hover {
  height: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ec4899);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 9999px;
}

/* Control Cards */
.control-card {
  position: relative;
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.control-header label {
  font-weight: 700;
  font-size: 1.125rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-free {
  background: var(--success);
  color: var(--white);
}

.badge-pro {
  background: var(--warning);
  color: var(--noir-black);
}

.control-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 1rem;
  color: var(--accent);
}

.control-value.disabled {
  color: var(--white-40);
}

/* Slider */
.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: var(--white-10);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  transition: all 0.3s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.slider:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Pro Lock Overlay */
.pro-locked {
  position: relative;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: all 0.3s;
}

.lock-overlay:hover {
  background: rgba(0, 0, 0, 0.9);
}

.lock-overlay svg {
  color: var(--warning);
  margin-bottom: 0.75rem;
}

.lock-overlay p {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.lock-overlay small {
  color: var(--white-60);
  font-size: 0.875rem;
}

/* 🔥 CRITICAL FIX: Timer overlay moet NIET clicks blokkeren */
.timer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(8px);
  border: 2px solid var(--accent);
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none; /* 🔥 KEY FIX */
}

.timer-overlay svg {
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.timer-text {
  font-size: 0.9rem;
  color: var(--white-60);
  margin-bottom: 0.5rem;
}

.timer-countdown {
  font-size: 3rem;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.timer-overlay small {
  color: var(--white-60);
  font-size: 0.85rem;
}

/* Download Button */
.btn-download {
  width: 100%;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  border: none;
  border-radius: 1rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s;
  padding: 1rem;
}

.modal-content {
  background: var(--noir-gray);
  border: 1px solid var(--noir-border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 450px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--white-60);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

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

.modal-content h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.pro-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.pro-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--noir-border);
  font-size: 1.125rem;
}

.pro-price {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.btn-upgrade {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  border: none;
  border-radius: 0.75rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-upgrade:hover {
  background: var(--accent-hover);
}

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

/* =============================================================================
   MOBILE RESPONSIVE (GSM)
   ============================================================================= */

@media (max-width: 1024px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .upload-zone {
    padding: 3rem 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  .main {
    padding: 2rem 0;
  }

  .card {
    padding: 1rem;
  }

  .control-value {
    font-size: 1.5rem;
  }

  .logo h1 {
    font-size: 1.25rem;
  }

  .logo-tagline {
    font-size: 0.65rem;
  }

  .btn-pro {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
  }

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

  .playback-controls {
    gap: 0.5rem;
  }

  .btn-play {
    width: 2.5rem;
    height: 2.5rem;
  }

  .time-display {
    font-size: 0.75rem;
    min-width: 2rem;
  }

  .progress-bar {
    height: 6px;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .timer-countdown {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .upload-zone {
    padding: 2rem 1rem;
  }

  .upload-icon {
    width: 48px;
    height: 48px;
  }

  .upload-text {
    font-size: 1.125rem;
  }

  .control-header label {
    font-size: 1rem;
  }

  .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
}
