*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
}

@font-face {
  font-family: "EngebrechteBoldItalic"; /*a name to be used later*/
  src: url("../fonts/engebrechtre bd it.ttf"); /*URL to font*/
}
@font-face {
  font-family: "EngebrechteReg"; /*a name to be used later*/
  src: url("../fonts/engebrechtre rg.ttf"); /*URL to font*/
}

html {
  height: 100%;
}

:root {
  --sound-wrapper-width: 280px;
  --sound-wrapper-height: 100px;
  --sound-wrapper-padding: 4px;
  --scaling: 0.9;
  --primary-color: #993333;
  --secondary-color: #ffcc00;
  --tertiary-color: #cc6633;
}

body {
  font-family: "EngebrechteReg", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: #ecf0f1;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
 body a {
  text-decoration: none;
 }

.topnav {
  background-color: #333;
  -webkit-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  position: fixed;
  top: 0;
  width: 100%;
  opacity: 0.98;
  height: 50px;
  min-width: 430px;
  transition: transform 0.4s;
  z-index: 800;
  overflow: visible;
  display: flex;
  align-items: center;
}

.topnav a {
  display: flex;
  align-items: center;
  color: #f2f2f2;
  text-align: center;
  padding: 0 16px;
  text-decoration: none;
  font-size: 18px;
  height: 50px;
}

.topnav a.menu:hover {
  background-color: #ddd;
  color: black;
  text-shadow: 0 -1px hsla(0, 0%, 0%, 0.8);
}

.topnav a.active {
 /* background-color: #3498db; */
  background-color: var(--primary-color);
  color: white;
}

/* ========================================
   Toast Notification System
   ======================================== */

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(400px);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  font-size: 20px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 4px;
  text-transform: capitalize;
}

.toast-message {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #666;
  word-wrap: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: #333;
}

/* Toast Types */
.toast.success {
  border-left: 4px solid #2ecc71;
}

.toast.success .toast-icon {
  color: #2ecc71;
}

.toast.success .toast-title {
  color: #2ecc71;
}

.toast.error {
  border-left: 4px solid #e74c3c;
}

.toast.error .toast-icon {
  color: #e74c3c;
}

.toast.error .toast-title {
  color: #e74c3c;
}

.toast.info {
  border-left: 4px solid #3498db;
}

.toast.info .toast-icon {
  color: #3498db;
}

.toast.info .toast-title {
  color: #3498db;
}

.toast.warning {
  border-left: 4px solid #f39c12;
}

.toast.warning .toast-icon {
  color: #f39c12;
}

.toast.warning .toast-title {
  color: #f39c12;
}

/* Mobile Responsive */
@media only screen and (max-width: 580px) {
  .toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* ========================================
   Welcome Modal / Onboarding
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.welcome-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-overlay.show .welcome-modal {
  transform: scale(1);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-color), #cc5533);
  color: white;
  padding: 30px;
  border-radius: 12px 12px 0 0;
  text-align: center;
}

.modal-header h2 {
  margin: 0 0 10px 0;
  font-size: 2rem;
  font-family: "EngebrechteBoldItalic", sans-serif;
}

.modal-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.modal-body {
  padding: 30px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  margin-bottom: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 24px;
  color: var(--primary-color);
  flex-shrink: 0;
  width: 30px;
  text-align: center;
}

.feature-content h3 {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
  color: #333;
}

.feature-content p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "EngebrechteReg", sans-serif;
}

.modal-button.primary {
  background: var(--primary-color);
  color: white;
}

.modal-button.primary:hover {
  background: #b82929;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-button.secondary {
  background: #e0e0e0;
  color: #333;
}

.modal-button.secondary:hover {
  background: #d0d0d0;
}

/* Mobile Responsive Modal */
@media only screen and (max-width: 580px) {
  .welcome-modal {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 20px;
  }

  .feature-item {
    padding: 12px;
  }

  .modal-footer {
    padding: 15px 20px;
    flex-direction: column;
  }

  .modal-button {
    width: 100%;
  }
}

/* ========================================
   Sound Groups Section - Centered & Consistent
   ======================================== */
.groups-section {
  width: 100%;
  margin: 0;
  padding: 20px;
  position: sticky;
  top: 50px;
  z-index: 1000;
  max-width: 1400px;
  margin: 0 auto;
  background: transparent;
  backdrop-filter: blur(10px);
}

.groups-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* Desktop: groepen naast elkaar - DISABLED omdat MAX_GROUPS = 1 */
@media (min-width: 768px) {
  .groups-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Wide screens: single column because only 1 group allowed */
@media (min-width: 1200px) {
  .groups-container {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin: 0 auto;
  }
}

.sound-group {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 15px;
  position: relative;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.sound-group:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(153, 51, 51, 0.2);
  transform: translateY(-2px);
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0;
  flex-shrink: 0;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.group-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* macOS style dot - alleen delete */
.group-action-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}

.group-action-btn i {
  display: none;
}

.group-action-btn:hover i {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 7px;
  color: rgba(0, 0, 0, 0.8);
}

.group-action-btn.delete-group {
  background: #ec695e;
}

.group-action-btn.delete-group:hover {
  background: #e74c3c;
}

/* Group footer met play button */
.group-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 2;
}

.group-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Grote play button - onder de sounds */
.group-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.group-play-btn:hover {
  background: #d94d2a;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(153, 51, 51, 0.5);
}

.group-play-btn i {
  font-size: 14px;
  margin-left: 2px;
}

.group-reset-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-right: 8px;
}

.group-reset-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.group-reset-btn i {
  font-size: 12px;
}

/* Playback Mode Toggle */
.playback-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.playback-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.playback-mode-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.playback-mode-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.playback-mode-label i {
  font-size: 0.9rem;
  color: var(--primary-color);
}

.group-sounds {
  min-height: 160px;
  height: 160px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 12px;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  border: none;
  display: block !important;
  white-space: nowrap;
}

.group-sounds.drag-over {
  background: rgba(153, 51, 51, 0.3);
  box-shadow: inset 0 0 30px rgba(153, 51, 51, 0.4), 0 0 0 3px var(--primary-color);
  border-color: var(--primary-color);
  animation: pulse-drop-zone 0.8s ease-in-out infinite;
}

@keyframes pulse-drop-zone {
  0%, 100% {
    box-shadow: inset 0 0 30px rgba(153, 51, 51, 0.4), 0 0 0 3px var(--primary-color);
  }
  50% {
    box-shadow: inset 0 0 40px rgba(153, 51, 51, 0.5), 0 0 0 4px var(--primary-color), 0 0 20px rgba(153, 51, 51, 0.3);
  }
}

.group-sounds::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.group-sounds::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.group-sounds::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.group-sounds::-webkit-scrollbar-thumb:hover {
  background: #d94d2a;
}

.group-sounds::-webkit-scrollbar-corner {
  background: rgba(0, 0, 0, 0.2);
}

.group-sound-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
  transition: all 0.2s ease;
  width: 100%;
  min-height: 180px;
}

.group-sound-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
  transform: scale(1.02);
}

.group-sound-item.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.group-sound-item.playing {
  background: rgba(235, 87, 51, 0.3);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(235, 87, 51, 0.4);
}

.group-sound-drag-handle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  cursor: grab;
}

.group-sound-drag-handle:active {
  cursor: grabbing;
}

.group-sound-image {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.group-sound-info {
  flex: 1;
  min-width: 0;
  text-align: center;
  width: 100%;
}

.group-sound-title {
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-sound-duration {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 500;
}

.group-sound-remove {
  background: transparent;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.group-sound-remove:hover {
  opacity: 1;
}

.group-empty-state {
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 15px 10px;
  font-size: 0.8rem;
  grid-column: 1 / -1;
}

.group-stats {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #ffffff !important;
  font-size: 1rem;
  flex-shrink: 0;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.group-stats span {
  color: #ffffff !important;
}

.group-stats i {
  margin-right: 5px;
  color: var(--secondary-color);
  display: none;
}

/* Group Progress Fill - Background Overlay */
.group-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: transparent; /* Hidden per user request */
  border-radius: 15px;
  transition: width 0.1s linear;
  z-index: 1;
  pointer-events: none;
}

.group-progress-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

.current-sound-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.group-progress-counter {
  font-weight: 600;
  color: var(--secondary-color);
  white-space: nowrap;
}

/* Modern Card Progress Indicator */
.card .progress {
  position: absolute;
  left: 0;
  width: 0%;
  height: 4px;
  top: 0;
  background: linear-gradient(90deg, var(--primary-color) 0%, #d94d2a 50%, var(--secondary-color) 100%);
  background-size: 200% 100%;
  border-radius: 15px 15px 0 0;
  transition: width 0.1s linear;
  z-index: 5;
  box-shadow: 0 0 10px rgba(153, 51, 51, 0.6);
  animation: shimmer 2s linear infinite;
}

.card.playing .progress {
  animation: shimmer 2s linear infinite;
  animation: progressMove 1s linear forwards;
}

@keyframes progressMove {
  from { left: -100%; }
  to { left: 100%; }
}

/* Card dragging visual feedback */
.card[draggable="true"] {
  cursor: grab;
  transition: opacity 0.2s ease;
}

.card[draggable="true"]:active {
  cursor: grabbing;
}

.foutmelding-title {
  color: #e74c3c;
  font-size: 1.2em;
  text-transform: capitalize;
}

.fountmelding-content {
  color: white;
  font-size: 1em;
}

.online-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 20px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.online-counter:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.online-counter i {
  font-size: 1.2em;
  color: #4CAF50;
  filter: drop-shadow(0 0 4px rgba(76, 175, 80, 0.5));
}

.online-counter .counter-text {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.selector-menu {
  display: none; /* Hidden - filters not used with new search in navbar */
}

.logged-in-user {
  display: none; /* Hidden for now */
}

.container {
  display: flex;
  flex-wrap: wrap;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  padding: 10px 0px 0px 10px;
  position: absolute;
  top: 0px;
  margin: 10% auto;
  min-width: 335px;
  max-width: 940px;
  margin-top: 47px;
  
}



.error-container {
  min-width: 450px;
  max-width: 480px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  height: 400px;
  background-color: #333;
  margin: 47px auto;
  text-align: center;
  padding-top: 20px;
  -webkit-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
}

.formContainer {
  position: relative;
  margin: 80px auto 40px;
  width: 500px;
  min-height: 585px;
  background-color: #333;
  font-size: 0.9em;
  text-align: center;
  border-radius: 8px;
  padding: 20px;
  -webkit-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
}

.textContent {
  font-family: "EngebrechteReg", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-align: left;
  position: relative;
  margin: 0 auto 20px;
  background-color: rgba(51, 51, 51, 0.8);
  border-radius: 8px;
  height: auto;
  width: 100%;
  max-width: 450px;
  padding: 15px 20px;
  color: #ddd;
  line-height: 1.5;
}

.textContent h2 {
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.formFields {
  position: relative;
  margin-top: 20px;
  width: 100%;
}

.formInput {
  position: relative;
  width: 100%;
  padding: 20px 0;
}

.uploadFormText {
  width: 350px;
}

.imagePreview {
  position: relative;
}

.imagePreview img {
  position: absolute;
  border-radius: 4px;
  top: 20px;
  right: 20px;
  height: auto;
  width: auto;
  max-width: 170px;
  max-height: 155px;
}

.titlePreview {
  position: absolute;
  top: 180px;
  right: 20px;
  color: whitesmoke;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  max-width: 170px;
  word-wrap: break-word;
}

#f_du {
  position: relative;
  display: inline-block;
  margin-left: 15px;
  color: var(--secondary-color);
  font-size: 1.2em;
  font-weight: bold;
  vertical-align: middle;
}
input[type="text"],
select,
textarea {
  font-family: "EngebrechteReg", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  padding: 10px 15px;
  height: 40px;
  width: 100%;
  max-width: 400px;
  border: 2px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  margin-bottom: 15px;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}
.inputSelect {
  font-family: "EngebrechteReg", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  margin-bottom: 10px;
  cursor: pointer;
}

input[type="file"] {
  padding: 8px;
  background: #f8f8f8;
  border: 2px dashed #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="file"]:hover {
  border-color: var(--primary-color);
  background: #fff;
}

select:focus {
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
  margin-bottom: 10px;
  font-size: 16px;
}

label {
  text-align: left;
  color: whitesmoke;
  font-size: 1.1em;
  height: 28px;
  display: block;
  width: 150px;
  float: left;
}
input[type="submit"] {
  font-family: "EngebrechteReg", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 18px;
  position: relative;
  background-color: var(--primary-color);
  color: white;
  padding: 14px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  height: 50px;
  width: 200px;
  margin: 30px auto 20px;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="submit"]:hover {
  background-color: #b82929;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}



  .logged-in-user {
    position: absolute;
    margin-top: 85px;
    color: #ddd;
    right: 20px;

  }

  .selector-menu {
    text-align: center;
    position: absolute;
    top: 7px;
    left: 125px;
    height: 50px;
    z-index: 1000;
  }
  .formContainer {
    margin-top: 47px;
    width: 480px;
  }
  .uploadNav {
    height: 47px;
  }




.wrapper {
  position: absolute;
  width: 300px;
  height: 100px;

  padding-right: 10px;
  margin-bottom: 20px;
  margin-right: 10px;

}
.sound-wrapper {
  display: inline-block;
  position: absolute;
  height: var(--sound-wrapper-height);
  width: var(--sound-wrapper-width);
  border-radius: 4px;
  background-color: #333;
  -webkit-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  overflow:hidden;
  

}

span {
  display: inline-block;
  vertical-align: middle;
  line-height: normal;
}


.rating {
  position: absolute;
  top: 10px;
  right: 10px;
}

.rating img {
  width: 15px;
}

.date-created {
  display: none;
}

/* ---- button ---- */

.button {
  font-family: "EngebrechteReg", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: inline-block;
  padding: 10px 18px;
  margin-bottom: 10px;
  background: #eee;
  border: none;
  border-radius: 7px;
  color: #222;
  font-size: 15px;
  cursor: pointer;
  max-width: 120px;
  height: 35px;
  overflow: hidden;
}

.button:hover {
  background-color: var(--primary-color);
  color: #222;
}

.button:active,
.button.is-checked {
  background-color: var(--primary-color);
}

.button.is-checked {
  color: white;
}

/* ---- button-group ---- */

.button-group:after {
  content: "";
  text-align: center;
  display: block;
  clear: both;
}

.button-group .button {
  border-radius: 0;
  margin-left: 0;
}

.button-group .button:first-child {
  border-radius: 4px 0 0 4px;
}

.button-group .button:nth-last-child(2) {
  border-radius: 0 4px 4px 0;
}




.main,
main {
  padding-top: 60px;
  background-color: rgba(51, 51, 51, 0.2);
  min-height: calc(100vh - 60px);
}

/* Navbar Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
  flex: 0 1 auto;
  max-width: 500px;
}

.nav-controls .quicksearch {
  flex: 1;
  min-width: 150px;
  max-width: 300px;
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.nav-controls .quicksearch:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
}

.nav-controls .quicksearch::placeholder {
  color: #999;
}

/* Nav Icon Buttons */
.nav-icon-btn {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

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

/* Add Group Button */
#add-group-btn {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

#add-group-btn:hover {
  background: var(--primary-color);
  color: white;
}

#add-group-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.5);
}

#add-group-btn:disabled:hover {
  background: transparent;
  transform: none;
}

/* Show Hidden Button States */
#show-hidden-toggle.showing-hidden {
  border-color: #ff6b6b;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

/* Discord Button States */
#discord-toggle.connected {
  border-color: #5865F2;
  color: #5865F2;
  background: rgba(88, 101, 242, 0.1);
}

.bgboem {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.5;

}
.bgboem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}


.container-grid {
  margin: 0 auto;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.container-grid .card {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 !important;
}

@media only screen and (max-width: 580px) {
  .main {
    background-color: rgba(51, 51, 51, 0.2);
  
  }
  .bgboem img {
    width: 100%;
    height: auto;
    position:fixed;
    top: -10%;
    left:0px;
  }

  .search-control-wrapper {
    flex-direction: column;
    padding: 0 20px;
  }

  .quicksearch {
    width: 100%;
    max-width: 100%;
  }

  .control-buttons {
    width: 100%;
    justify-content: center;
  }

  .online-counter {
    margin-right: 10px;
    padding: 6px 12px;
  }

  .online-counter .counter-text {
    font-size: 0.85em;
  }

  /* Mobile timeline layout - compact horizontal fragments */
  .group-sounds {
    min-height: 70px;
    height: 70px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 5px 8px;
  }

  /* Smaller timeline items on mobile */
  .timeline-sound-item {
    height: 60px;
    min-height: 60px;
    touch-action: none;
  }

  .timeline-sound-item .waveform-canvas {
    height: 60px;
  }

  .timeline-sound-item .sound-info-overlay {
    padding: 2px 6px;
  }

  .timeline-sound-item .sound-title-overlay {
    font-size: 0.6rem;
  }

  .timeline-sound-item .sound-duration-overlay {
    font-size: 0.55rem;
  }

  /* Smaller remove button on mobile */
  .timeline-sound-item .sound-remove-btn {
    opacity: 1 !important;
    min-width: 24px;
    min-height: 24px;
    width: 24px;
    height: 24px;
    font-size: 10px;
    top: 4px;
    right: 4px;
    transform: none;
    background: rgba(231, 76, 60, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .timeline-sound-item .sound-remove-btn i {
    font-size: 10px;
  }

  /* Hide resize handles on mobile */
  .sound-resize-handle-left,
  .sound-resize-handle-right {
    display: none;
  }

  /* Playhead adjustments for mobile */
  .timeline-playhead {
    width: 4px;
  }

  .playhead-line {
    width: 4px;
  }
}

/* Tablet and touch devices - show remove button (no hover on touch) */
@media only screen and (max-width: 1024px) {
  .timeline-sound-item .sound-remove-btn {
    opacity: 1 !important;
  }
}

/* Extra narrow screens (Galaxy Fold front screen ~280-375px) */
@media only screen and (max-width: 400px) {
  /* Remove min-width constraint on navbar */
  .topnav {
    min-width: 100%;
    flex-wrap: wrap;
    height: auto;
    min-height: 50px;
    padding: 5px 0;
  }

  /* Compact menu links */
  .topnav a.menu {
    padding: 0 10px;
    font-size: 14px;
    height: 40px;
  }

  /* Stack nav controls below menu */
  .nav-controls {
    order: 3;
    width: 100%;
    margin: 5px 10px;
    gap: 5px;
    max-width: none;
  }

  .nav-controls .quicksearch {
    min-width: 80px;
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
  }

  /* Smaller nav buttons */
  .nav-icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .nav-icon-btn i {
    font-size: 14px;
  }

  /* Hide online counter text, show only icon */
  .online-counter {
    padding: 5px 8px;
  }

  .online-counter .counter-text {
    display: none;
  }

  /* Adjust main content for taller navbar */
  .main {
    margin-top: 95px !important;
  }

  /* Full-width cards for narrow screens */
  .container-grid {
    width: 100% !important;
    padding: 0 5px;
  }

  .card {
    width: calc(100vw - 20px) !important;
    max-width: 280px;
    margin-right: 10px !important;
    margin-bottom: 10px !important;
  }

  /* Smaller group headers */
  .group-header h3 {
    font-size: 1rem;
  }

  .group-actions button {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  /* Even more compact timeline on very narrow screens */
  .group-sounds {
    height: 60px;
    min-height: 60px;
    padding: 4px 6px;
  }

  .timeline-sound-item {
    height: 52px;
    min-height: 52px;
  }

  .timeline-sound-item .waveform-canvas {
    height: 52px;
  }

  .timeline-sound-item .sound-title-overlay {
    font-size: 0.55rem;
  }

  .timeline-sound-item .sound-duration-overlay {
    display: none;
  }
}

.card {
  position: absolute;
  border-radius: 15px;
  margin-right: 40px;
  margin-bottom: 20px;
  width: 300px;
  height: 100px;
  background-color: #333;
  -moz-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Slide animation for hiding sounds */
.card.sliding-out {
  opacity: 0;
  transform: translateX(-20px) scale(0.95);
}

.card.sliding-in {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-left: 8px;
  position: absolute;
  height: 20px;
  width: 300px;
  border-top-left-radius: 15px;
  z-index: 10;
  overflow: visible;
}

.progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    rgba(153, 51, 51, 0.4) 0%,
    rgba(153, 51, 51, 0.2) 100%);
  border-radius: 15px;
  transition: width 0.1s linear;
  z-index: 1;
  pointer-events: none;
}

.middle-bar {
  margin-top: 15px;
  position: absolute;
  display: block;
  width: auto;  
  height: 100px;
}

.bottom-bar {
  position: absolute;
  bottom: 0px;
  left: 0px;
  height: 20px;
  width:300px;
  border-bottom-left-radius: 15px;  
  z-index: 10;
  overflow: hidden;
  background-color: rgba(76, 78, 77, 0.4);
}

.sound-timer {
  width: 40px;
  height: 20px;
  right: 10px;
  display: block;
  position: absolute;
  top: 40px;
  color: silver;
  text-align: right;
  z-index: 200;
  font-size: 0.8rem;
}
.sound-count {
  position: absolute;
  display: block;
  color: var(--secondary-color);
  top: 60px;
  right: 10px;
  z-index: 200;
  font-size: 0.9rem;
}
.duration-counter {
  width: 40px;
  height: 20px;
  right: 10px;
  display: block;
  position: absolute;
  top: 40px;
  color: var(--tertiary-color);
  text-align: right;
  font-size: 0.8rem;
  z-index: 200;
}


.sound-image {
  position: absolute;
  display: block;
  top: -5px;
  left: 10px;
  height: 80px;
  width: 90px;
  transform: translate();
  z-index: 60;
}


.sound-image img {
  height: auto;
  width: auto;
  max-width: 90px;
  max-height: 80px;
  position: absolute;
  opacity: 0.9;
  margin: 0 auto;
  z-index: 200;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  border-radius: 15px;
  -moz-box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
  background-color:rgba(0, 0, 0, 0.8)
}


.sound-title {
  font-family: "EngebrechteBoldItalic";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: whitesmoke;
  position: absolute;
  width: 140px;
  overflow-wrap: break-word;
  hyphens: auto;
  left: 110px;
  font-size: 1.4rem;
  text-shadow: 2px 2px #000;
  vertical-align: middle;
  line-height: 25px;
  top: 35%;
  transform: translateY(-50%);
}

.sound-tags {
  position: absolute;
  color: var(--tertiary-color);
  font-size: 0.8rem;
  width: 150px;
  z-index: 380;
  overflow: hidden;
  left: 110px;
  top: 0px;
}


.hibbem {
  position:absolute;
  top: -1000px;
}

/* Sound Actions Container - holds favorite, hide and share buttons horizontally at top */
.sound-actions {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  right: 5px;
  top: 5px;
  z-index: 200;
  padding: 2px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Favorite Button - Apple-style glassmorphic design */
.sound-favorite {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-favorite:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.sound-favorite i {
  font-size: 9px;
  transition: all 0.2s ease;
}

.sound-favorite i.fa-solid {
  color: #ffd700; /* Filled star is gold */
  filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.6));
}

.sound-favorite i.fa-regular {
  color: rgba(255, 255, 255, 0.7); /* Empty star is light */
}

/* Hide Button - Apple-style glassmorphic design */
.sound-hide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-hide:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.sound-hide i {
  font-size: 9px;
  transition: all 0.2s ease;
}

.sound-hide i.fa-eye-slash {
  color: #ff6b6b; /* Red when hidden */
  filter: drop-shadow(0 0 3px rgba(255, 107, 107, 0.4));
}

.sound-hide i.fa-eye {
  color: rgba(255, 255, 255, 0.7); /* Light when visible */
}

/* Share Button - Apple-style glassmorphic design */
.sound-share {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-share:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

.sound-share i {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.sound-share:hover i {
  color: #4a9eff;
  filter: drop-shadow(0 0 3px rgba(74, 158, 255, 0.4));
}

/* macOS style card buttons */
.card-action-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}

.card-action-dot i {
  display: none;
}

.card-action-dot:hover i {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6px;
  color: rgba(0, 0, 0, 0.8);
}

.card-action-dot.card-fav {
  background: #f5c033;
}

.card-action-dot.card-fav:hover {
  background: #ffd700;
}

.card-action-dot.card-hide {
  background: #ec695e;
}

.card-action-dot.card-hide:hover {
  background: #e74c3c;
}

.card-action-dot.card-share {
  background: #61c454;
}

.card-action-dot.card-share:hover {
  background: #4caf50;
}

.sound-share:hover i {
  color: #4a9eff;
}

/* Favorite Card Styling - subtle highlight */
.card.is-favorite {
  border: 2px solid #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3),
              5px 5px 5px 0px rgba(0, 0, 0, 0.4);
}

.card.is-favorite .top-bar {
  background: linear-gradient(90deg,
    rgba(255, 215, 0, 0.2) 0%,
    rgba(255, 215, 0, 0.05) 100%);
}

/* Hidden Card Styling - reduced opacity when shown */
.card.is-hidden {
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.card.is-hidden:hover {
  opacity: 0.7; /* More visible on hover for interaction */
}

.card.is-hidden .top-bar {
  background: linear-gradient(90deg,
    rgba(255, 107, 107, 0.2) 0%,
    rgba(255, 107, 107, 0.05) 100%);
}

/* ========================================
   Drag & Drop Styling
   ======================================== */

/* Make cards feel draggable */
.card {
  cursor: move;
  cursor: grab;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.card:active {
  cursor: grabbing;
}

/* Ghost - placeholder where item was */
.sortable-ghost {
  opacity: 0.4;
  background: #444;
  border: 2px dashed #666;
}

/* Chosen - item being dragged */
.sortable-chosen {
  cursor: grabbing !important;
}

/* Drag - item while dragging */
.sortable-drag {
  opacity: 0.8;
  transform: rotate(2deg) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  z-index: 9999;
  cursor: grabbing !important;
}

/* Container during drag */
.container-grid {
  position: relative;
}

/* Smooth transitions for reordering */
.card {
  transition: transform 0.15s ease;
}

/* ========================================
   Timeline Sound Items
   ======================================== */
.timeline-sound-item {
  position: absolute;
  top: 10px;
  height: 140px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: grab;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  display: inline-block;
  user-select: none;
}

.timeline-sound-item:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10;
  transform: none; /* Explicitly prevent any movement */
}

.timeline-sound-item.dragging,
.timeline-sound-item.dragging-timeline {
  opacity: 0.7;
  cursor: grabbing;
  z-index: 100;
  transition: none; /* Disable transitions during drag */
}

/* Touch-specific styles */
.card.touch-dragging {
  opacity: 0.4 !important;
  transform: none !important; /* Don't transform original - clone handles visual feedback */
  z-index: 1;
  transition: opacity 0.2s ease;
}

/* Drag clone that follows finger */
.card.drag-clone {
  border: 2px solid var(--primary-color) !important;
  border-radius: 15px;
  background-color: #333;
}

/* Improve touch targets */
.timeline-sound-item {
  touch-action: none; /* Disable browser touch handling */
  -webkit-touch-callout: none; /* Disable iOS callout */
  -webkit-user-select: none; /* Disable text selection */
  user-select: none;
}

.card {
  touch-action: pan-x pan-y; /* Allow scrolling, but we handle long-press via JS */
  -webkit-touch-callout: none !important; /* Disable iOS callout on long press */
  -webkit-user-select: none !important; /* Disable text selection */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
  user-select: none !important;
}

/* When touch is being held - block ALL native behaviors */
.card.touch-holding {
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* When dragging, prevent ALL native touch behaviors */
.card.touch-dragging {
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  pointer-events: none;
}

.sound-remove-btn {
  min-width: 44px;
  min-height: 44px; /* iOS recommended touch target size */
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-sound-item.playing {
  border-color: var(--secondary-color);
  box-shadow: 0 0 20px rgba(235, 87, 51, 0.6);
}

.timeline-sound-item.overlapping {
  border-color: #ff9800;
  background: rgba(255, 152, 0, 0.2);
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
  z-index: 101;
}

.timeline-sound-item.overlap-target {
  border-color: #ff5722;
  background: rgba(255, 87, 34, 0.15);
  box-shadow: 0 0 10px rgba(255, 87, 34, 0.4);
  animation: pulse-overlap 0.8s ease-in-out infinite;
}

@keyframes pulse-overlap {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Unified playhead element containing line and triangles */
.timeline-playhead {
  position: absolute;
  left: 0;
  top: -12px; /* Extend above container for top triangle */
  bottom: -12px; /* Extend below container for bottom triangle */
  width: 4px;
  z-index: 9999;
  pointer-events: auto;
  cursor: ew-resize;
  transition: left 0.1s ease-out;
}

.timeline-playhead.dragging {
  transition: none;
}

/* The red line inside playhead */
.playhead-line {
  position: absolute;
  top: 12px; /* Offset for top triangle */
  bottom: 12px; /* Offset for bottom triangle */
  left: 0;
  width: 4px;
  background: #ff3333;
  box-shadow: 0 0 15px rgba(255, 51, 51, 1), 0 0 25px rgba(255, 51, 51, 0.7);
  pointer-events: none;
}

.timeline-playhead.dragging .playhead-line {
  box-shadow: 0 0 25px rgba(255, 51, 51, 1), 0 0 40px rgba(255, 51, 51, 0.9);
}

/* Top triangle */
.playhead-triangle-top {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid #ff3333;
  filter: drop-shadow(0 0 8px rgba(255, 51, 51, 0.8));
  pointer-events: none;
  transform: translateX(-50%);
}

/* Bottom triangle */
.playhead-triangle-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #ff3333;
  filter: drop-shadow(0 0 8px rgba(255, 51, 51, 0.8));
  pointer-events: none;
  transform: translateX(-50%);
}

.waveform-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sound-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  pointer-events: none;
}

.sound-title-overlay {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.sound-duration-overlay {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

.sound-resize-handle-left,
.sound-resize-handle-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  background: rgba(255, 255, 255, 0.3);
  cursor: ew-resize;
  opacity: 0;
  transition: opacity 0.2s;
}

.sound-resize-handle-left {
  left: 0;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.sound-resize-handle-right {
  right: 0;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.timeline-sound-item:hover .sound-resize-handle-left,
.timeline-sound-item:hover .sound-resize-handle-right {
  opacity: 1;
}

.sound-remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(236, 105, 94, 0.9);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s;
  z-index: 20;
}

.timeline-sound-item:hover .sound-remove-btn {
  opacity: 1;
}

.sound-remove-btn:hover {
  background: #e74c3c;
  transform: scale(1.1);
}

.sound-remove-btn i {
  font-size: 12px;
}
