:root {
  /* Copiato da src/styles.css per avere la stessa palette dell'app */
  --bg-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-card-playing: #f8f9fa;
  --bg-modal: #ffffff;
  --text-main: #212529;
  --text-muted: #6c757d;
  --accent-color: #212529;
  --primary-color: #000000;
  --success-color: #28a745;
  --switch-enabled: #ffc107;
  --danger-color: #dc3545;
  --border-color: #dee2e6;
  --border-light: #ced4da;
  --font-main: 'JetBrains Mono', monospace;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  user-select: none;
  /* font-family removed from body to allow navbar inherit global font */
  font-feature-settings: "zero" 1;
  font-size: 1.25rem;
}

/* Apply JetBrains Mono only to the main content of Soundboard */
main#top {
  font-family: var(--font-main);
}

/* Navbar styles removed to inherit from global app.min.css */
.nav-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Local button styles retained but cleaned up */
.btn-cta {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.hero-section {
  background-color: #ffffff;
}

.hero-card {
  background-color: transparent;
  border-radius: 0;
  border: none;
}

.slot-preview {
  border-radius: 0;
  font-size: 0.95rem;
}

.key-preview {
  min-width: 36px;
  text-align: center;
  border-radius: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.hero-bullets li {
  margin-bottom: 0.15rem;
}

.feature-card {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.workflow-step {
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  background-color: #ffffff;
  border-radius: 0;
}

.workflow-step .step-number {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.tech-card {
  border-radius: 0;
}

.tech-pill {
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.5rem;
  border-radius: 0;
  text-align: center;
}

.btn-download {
  width: 100%;
  max-width: 380px;
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .btn-download {
    width: 100%;
    max-width: none;
  }
}

footer {
  background-color: #ffffff;
  font-size: 0.95rem;
}

footer a {
  color: inherit;
}

footer a:hover,
footer a:focus {
  color: inherit;
}

footer .small {
  font-size: 0.85rem;
}

/* Slider e switch identici all'app */
input[type=range].form-range::-webkit-slider-runnable-track {
  background-color: #e9ecef;
  height: 4px;
}

input[type=range].form-range::-webkit-slider-thumb {
  background-color: var(--text-main);
  border-radius: 0;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  box-shadow: none;
}

.form-check-input:checked {
  background-color: var(--switch-enabled) !important;
  border-color: var(--switch-enabled) !important;
}

.hero-section h1 {
  font-size: 3.4rem;
}

.hero-section .lead {
  font-size: 1.3rem;
}

/* Slot layout and controls copied from app */
.slot-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0;
  transition: none !important;
  box-shadow: none !important;
  height: 100%;
  position: relative;
}

.slot-card.active {
  border-color: var(--primary-color);
  border-width: 2px;
}

.slot-card.playing {
  background-color: var(--bg-card-playing);
  border-color: var(--success-color);
}

.slot-card.drag-over {
  border-color: var(--accent-color) !important;
  background-color: #e2e6ea !important;
}

.slot-content-full {
  display: block;
}

.slot-content-mini {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0.5rem;
}

.slot-card.minimized {
  height: auto;
  min-height: 60px;
}

.slot-card.minimized .slot-content-full {
  display: none;
}

.slot-card.minimized .slot-content-mini {
  display: flex;
}

.btn-toggle-view {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
}

.btn-toggle-view:hover {
  color: var(--text-main);
}

.meter-container {
  height: 6px;
  background-color: #e9ecef;
  border-radius: 0;
  overflow: hidden;
  margin-top: 5px;
}

.meter-bar {
  height: 100%;
  background-color: var(--accent-color);
  width: 0%;
  transition: none !important;
}

.key-badge {
  font-size: 1rem;
  font-weight: bold;
  min-width: 35px;
  text-align: center;
  display: inline-block;
  cursor: pointer;
  border-radius: 0;
  background-color: #f8f9fa !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-light);
}

.key-badge:hover {
  background-color: #e9ecef !important;
}

.key-badge.recording {
  background-color: var(--danger-color) !important;
  color: white !important;
}

.key-badge-full {
  min-width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem !important;
}

.btn-settings-full {
  width: 45px;
  height: 45px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.key-badge-mini {
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem !important;
  padding: 0 !important;
}

.btn-settings-mini {
  width: 30px;
  height: 30px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.slot-name-mini {
  font-size: 0.85rem;
}

/* Pulsanti Load / Settings identici all'app */
.btn-load-quick,
#btn-load-file,
.btn-settings {
  background: transparent !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-main) !important;
  font-size: 0.75rem !important;
  padding: 4px 10px !important;
  border-radius: 0 !important;
  transition: none !important;
  box-shadow: none !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-load-quick:hover,
#btn-load-file:hover,
.btn-settings:hover {
  border-color: var(--text-main) !important;
  background-color: #f8f9fa !important;
}

.btn-load-quick {
  width: 100% !important;
  display: block !important;
  margin: 0 auto;
}

.demo-section {
  background-color: #f8f9fa;
}

.demo-slot-wrapper {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.demo-slot {
  padding: 1.5rem;
}

.demo-slot-title {
  font-size: 1rem;
}

/* Waveform & selection demo: reuse app look */
.waveform-canvas {
  width: 100%;
  height: 110px;
  background-color: #f8f9fa;
  border: 1px solid var(--border-light);
  cursor: crosshair;
}

.waveform-ruler {
  width: 100%;
  height: 20px;
  display: block;
}

.settings-small-text {
  font-size: 0.85rem;
}

.demo-file-chip {
  position: absolute;
  top: -20px;
  left: 20px;
  padding: 0.35rem 0.75rem;
  background-color: #ffffff;
  border: 1px dashed var(--border-light);
  font-size: 0.8rem;
  color: var(--text-muted);
  border-radius: 0;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.demo-params {
  gap: 1.5rem;
}

.demo-param {
  flex: 1;
}

.demo-param-label {
  font-size: 0.75rem;
}

.demo-param-knob {
  height: 32px;
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: linear-gradient(to top, #212529 40%, #f8f9fa 40%);
  transform-origin: bottom;
}

.demo-meter-bar {
  width: 25%;
}

.demo-settings-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0;
}

.demo-slot-wrapper.state-drag .demo-file-chip {
  animation: demoFileDrag 2.1s ease-out forwards;
}

.demo-slot-wrapper.state-key .demo-key-badge {
  animation: demoKeyBind 1.4s ease-in-out;
}

.demo-slot-wrapper.state-params .demo-meter-bar {
  animation: demoMeter 1.8s ease-in-out;
}

.demo-slot-wrapper.state-params .demo-param-knob {
  animation: demoParamShift 1.8s ease-in-out;
}

@keyframes demoFileDrag {
  0% {
    opacity: 0;
    transform: translate(-40px, -30px);
  }
  20% {
    opacity: 1;
  }
  60% {
    transform: translate(80px, 40px);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(110px, 60px);
  }
}

@keyframes demoKeyBind {
  0% {
    background-color: #f8f9fa;
    color: var(--text-main);
    transform: translateY(0);
  }
  40% {
    background-color: #212529;
    color: #ffffff;
    transform: translateY(-2px);
  }
  100% {
    background-color: #f8f9fa;
    color: var(--text-main);
    transform: translateY(0);
  }
}

@keyframes demoMeter {
  0% {
    width: 10%;
  }
  50% {
    width: 85%;
  }
  100% {
    width: 30%;
  }
}

@keyframes demoParamShift {
  0% {
    transform: scaleY(0.8);
  }
  50% {
    transform: scaleY(1.1);
  }
  100% {
    transform: scaleY(0.9);
  }
}
