/* ==========================================================================
   DUAL-CHANNEL CALL RECORDER & ADMIN PORTAL DESIGN SYSTEM
   Modern Dark Glassmorphism, Neon Accents, Responsive Layouts
   ========================================================================== */

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

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(18, 24, 38, 0.65);
  --bg-card-hover: rgba(28, 36, 56, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-glow: rgba(99, 102, 241, 0.3);
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.4);
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.4);
  --accent-amber: #f59e0b;
  --accent-cyan: #06b6d4;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-main: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-brand {
  font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Container Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
}

/* Navbar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 2rem;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-title svg {
  color: var(--primary);
}

.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-nav-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Main Container */
.main-layout {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Views */
.view-section {
  width: 100%;
  max-width: 680px;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-section.hidden {
  display: none !important;
}

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

/* Lobby Card */
.lobby-card {
  padding: 2.5rem;
  text-align: center;
}

.lobby-header {
  margin-bottom: 2rem;
}

.lobby-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.lobby-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-badge-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  color: var(--accent-emerald);
  font-size: 0.8rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

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

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

/* Call Room Card */
.call-card {
  padding: 2rem;
}

.call-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 1.5rem;
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  color: var(--accent-rose);
  font-size: 0.85rem;
  font-weight: 600;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-rose);
  border-radius: 50%;
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.call-timer {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.share-link-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(10, 14, 23, 0.6);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-glass);
  align-items: center;
}

.share-link-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  outline: none;
}

.btn-copy {
  padding: 0.4rem 0.9rem;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-copy:hover {
  background: #4f46e5;
}

/* Audio Visualizer Grid */
.audio-channels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.channel-card {
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.channel-card.channel-left {
  border-top: 3px solid var(--primary);
}

.channel-card.channel-right {
  border-top: 3px solid var(--accent-emerald);
}

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

.channel-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.channel-left .channel-tag {
  background: var(--primary-glow);
  color: #a5b4fc;
}

.channel-right .channel-tag {
  background: var(--accent-emerald-glow);
  color: #6ee7b7;
}

.participant-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Oscilloscope Canvas */
.visualizer-canvas {
  width: 100%;
  height: 70px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  display: block;
}

.vu-meter-bar {
  height: 6px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  margin-top: 0.5rem;
  overflow: hidden;
}

.vu-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-amber), var(--accent-rose));
  transition: width 0.05s ease;
}

/* Call Control Buttons */
.call-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.action-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.action-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.15);
}

.action-btn.muted {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.action-btn.btn-hangup {
  background: linear-gradient(135deg, var(--accent-rose), #dc2626);
  border: none;
  box-shadow: var(--accent-rose-glow);
}

.action-btn.btn-hangup:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.6);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 0.8rem 1.2rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  box-shadow: var(--shadow-main);
  animation: slideInRight 0.3s ease-out forwards;
}

.toast.toast-success { border-left-color: var(--accent-emerald); }
.toast.toast-error { border-left-color: var(--accent-rose); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Modal System (Admin Login & Dashboard) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(12px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-card {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-card.modal-sm {
  max-width: 420px;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

/* Security Badge Notice */
.security-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #c7d2fe;
}

/* Admin Table */
.recordings-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

.recordings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.recordings-table th {
  background: rgba(10, 14, 23, 0.9);
  padding: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-glass);
}

.recordings-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-main);
}

.recordings-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* Brand Title Pointer for Secret Trigger */
.brand-title {
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

.brand-title:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Player Box in Admin (Sleek Glassmorphism & Neon Glow) */
.admin-player-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.25);
  animation: fadeIn 0.3s ease-out;
}

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

.player-info-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.player-live-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  width: fit-content;
}

.player-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.player-controls-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.channel-selector-group {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.ch-btn {
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.ch-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* App Footer & Secret Lock */
.app-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border-glass);
  margin-top: auto;
}

.secret-footer-lock {
  cursor: pointer;
  opacity: 0.3;
  font-size: 0.85rem;
  transition: var(--transition-fast);
  user-select: none;
}

.secret-footer-lock:hover {
  opacity: 1;
  transform: scale(1.2);
}

.download-dropdown {
  display: flex;
  gap: 0.5rem;
}

.btn-action-icon {
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-fast);
}

.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-action-icon.danger {
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-action-icon.danger:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state svg {
  color: var(--text-dim);
  margin-bottom: 1rem;
}

/* ==========================================================================
   MOBILE SMARTPHONE & TABLET RESPONSIVE STYLES
   ========================================================================== */

/* Touch-friendly inputs and buttons */
button, input, select, textarea {
  touch-action: manipulation;
}

@media (max-width: 768px) {
  .app-header {
    padding: 0.85rem 1rem;
  }

  .brand-title {
    font-size: 1.15rem;
    gap: 0.5rem;
  }

  .brand-title svg {
    width: 22px;
    height: 22px;
  }

  .admin-nav-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.825rem;
    min-height: 40px;
  }

  .main-layout {
    padding: 1rem 0.75rem;
  }

  .lobby-card {
    padding: 1.5rem 1.1rem;
  }

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

  .lobby-header p {
    font-size: 0.875rem;
  }

  .form-control {
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    padding: 0.85rem 1rem;
  }

  .btn-primary {
    min-height: 48px;
    font-size: 1rem;
  }

  .call-card {
    padding: 1.25rem 1rem;
  }

  .call-status-bar {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
  }

  .recording-indicator {
    font-size: 0.775rem;
    padding: 0.35rem 0.7rem;
  }

  .call-timer {
    font-size: 1rem;
  }

  .share-link-box {
    flex-wrap: wrap;
    padding: 0.6rem 0.8rem;
  }

  .share-link-input {
    width: 100%;
    font-size: 0.8rem;
  }

  .btn-copy {
    width: 100%;
    min-height: 40px;
    margin-top: 0.3rem;
  }

  .audio-channels-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .channel-card {
    padding: 1rem;
  }

  .visualizer-canvas {
    height: 80px;
  }

  .action-btn {
    width: 60px;
    height: 60px;
  }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 0.75rem;
  }

  .modal-card {
    max-height: 94vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 1.1rem 1.25rem;
  }

  .modal-header h3 {
    font-size: 1.15rem;
  }

  .modal-body {
    padding: 1.25rem 1rem;
  }

  .security-notice {
    font-size: 0.8rem;
    padding: 0.75rem;
  }

  /* Table Mobile Scroll */
  .recordings-table-wrapper {
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }

  .recordings-table th, 
  .recordings-table td {
    padding: 0.75rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Admin Player Box Mobile */
  .admin-player-box {
    padding: 1rem;
  }

  .admin-player-box > div {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .channel-selector-group {
    width: 100%;
    justify-content: space-between;
  }

  .ch-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.4rem;
    min-height: 38px;
    font-size: 0.775rem;
  }

  .btn-action-icon {
    min-height: 36px;
    padding: 0.4rem 0.6rem;
    font-size: 0.775rem;
  }
}

@media (max-width: 480px) {
  .brand-title span span {
    display: none; /* Hide PRO WAV tag on tiny screens */
  }

  .feature-badge-row {
    flex-direction: column;
    align-items: center;
  }

  .feature-tag {
    width: 100%;
    justify-content: center;
  }

  .modal-close-btn {
    font-size: 1.5rem;
    padding: 0.5rem;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ==========================================================================
   INLINE ADMIN PLAYER & ACTION BUTTON STYLES
   ========================================================================== */

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  transition: var(--transition-fast);
}

.btn-action-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
}

.btn-action-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-action-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-action-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-action-danger:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: #f43f5e;
  transform: translateY(-1px);
}

/* Download Dropdown Menu */
.download-dropdown {
  position: relative;
}

.download-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  background: #111827;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 100;
  min-width: 180px;
  overflow: hidden;
}

.download-menu.show {
  display: block !important;
}

.dl-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.6rem 0.9rem;
  color: var(--text-main);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.dl-item:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

/* Inline Admin Player Card */
.inline-admin-player {
  background: rgba(13, 18, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 0.6rem;
  animation: slideDown 0.25s ease-out;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.inline-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.inline-player-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ch-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

.ch-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.4);
}

.ch-btn[data-ch="1"].active {
  background: rgba(129, 140, 248, 0.15);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.4);
}

.ch-btn[data-ch="2"].active {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.close-player-btn {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 0.35rem;
  transition: var(--transition-fast);
}

.close-player-btn:hover {
  background: rgba(244, 63, 94, 0.25);
}

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

.custom-play-btn svg.hidden,
.custom-vol-btn svg.hidden {
  display: none !important;
}

/* ==========================================================================
   REDESIGNED PLAYBACK CONTROL BAR (Rounded Pill, Professional & Proportionate)
   ========================================================================== */
.custom-player-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(18, 24, 38, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.1rem;
  box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

/* Play / Pause Button */
.custom-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.custom-play-btn:hover {
  transform: scale(1.06);
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
}

.custom-play-btn:active {
  transform: scale(0.94);
}

.custom-play-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* Time Display */
.player-time-display {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 82px;
  text-align: center;
  user-select: none;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.player-time-display .current-time {
  color: var(--text-main);
  font-weight: 600;
}

/* Progress Seeker Bar Wrapper */
.progress-seeker-wrapper {
  position: relative;
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  height: 20px;
}

.progress-track-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  overflow: hidden;
}

.progress-buffer-fill {
  position: absolute;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  transition: width 0.2s ease;
}

.progress-active-fill {
  position: absolute;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f46e5 0%, #818cf8 100%);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
  pointer-events: none;
}

.custom-seek-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  background: transparent;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 3;
  margin: 0;
}

.custom-seek-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #818cf8;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.custom-seek-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #6366f1;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.85);
}

.custom-seek-input::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #818cf8;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
  cursor: pointer;
}

/* Volume Control Group */
.volume-control-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.custom-vol-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.custom-vol-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.custom-vol-btn svg {
  width: 15px;
  height: 15px;
}

.custom-vol-input {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.custom-vol-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a5b4fc;
  cursor: pointer;
}

.custom-vol-input::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a5b4fc;
  cursor: pointer;
}

/* Audio Player Dark Theme Fallback */
audio {
  color-scheme: dark;
  width: 100%;
  border-radius: var(--radius-sm);
  background: #0f172a;
  outline: none;
}

.inline-admin-player audio {
  color-scheme: dark;
  width: 100%;
  border-radius: var(--radius-sm);
  background: #1e293b;
  outline: none;
}

.empty-state.hidden {
  display: none !important;
}




