/*
 * AuraAudio Studio - Modern Glassmorphism Styling
 * Crafted with CSS variables, 100dvh layout, British English conventions,
 * and responsive design optimized for iPad, Android, and Windows.
 */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121d;
  --bg-card: rgba(16, 23, 38, 0.72);
  --bg-card-hover: rgba(22, 32, 53, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.3);

  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.35);

  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

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

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px -5px var(--accent-glow);
}

/* Reset and Core Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100dvh;
  width: 100%;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient Background Glow */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -150px;
  right: 10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.12) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
}

.app-wrapper {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .app-wrapper {
    padding: 2.5rem 2rem 4rem;
    gap: 2.25rem;
  }
}

/* Header */
.app-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  -webkit-text-fill-color: #a5b4fc;
}

.header-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 650px;
}

.header-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.25rem;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.feature-pill svg {
  color: var(--accent-cyan);
}

/* Glass Card */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Upload & Dropzone Area */
.dropzone-container {
  padding: 2.5rem 1.5rem;
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  background: rgba(13, 18, 29, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.dropzone-container:hover,
.dropzone-container.drag-active {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.07);
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.dropzone-icon-glow {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.dropzone-container:hover .dropzone-icon-glow {
  transform: scale(1.08);
  background: rgba(99, 102, 241, 0.2);
}

.dropzone-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

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

.dropzone-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.format-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
  touch-action: manipulation;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

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

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.25);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 0.5rem;
  border-radius: 50%;
}

/* Batch Queue Section */
.queue-panel {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.badge-count {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Batch Progress Bar */
.batch-progress-wrapper {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.batch-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  border-radius: 9999px;
  transition: width 0.25s ease;
}

/* Queue List */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.queue-item {
  background: rgba(11, 16, 26, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.queue-item:hover {
  background: rgba(18, 26, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.14);
}

.queue-item.queue-item-active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
  background: rgba(23, 31, 51, 0.9);
}

.queue-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.queue-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
  flex: 1;
}

.queue-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.queue-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-rename-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.2rem 0.5rem;
  outline: none;
  width: 100%;
  max-width: 320px;
}

@keyframes editorPulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    border-color: var(--accent-cyan);
  }
  30% {
    box-shadow: 0 0 35px 8px rgba(6, 182, 212, 0.5);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: var(--shadow-card);
    border-color: var(--border-subtle);
    transform: translateY(0);
  }
}

.editor-panel-highlight {
  animation: editorPulseGlow 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.queue-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.target-badge {
  color: var(--accent-cyan);
  font-weight: 600;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-ready {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-processing {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.35);
  animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-error {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Result Card inside Queue Item */
.queue-item-result {
  background: rgba(6, 182, 212, 0.04);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 640px) {
  .queue-item-result {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.result-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.size-diff-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
}

.size-tag-reduced {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.size-tag-expanded {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.result-audio-player {
  height: 32px;
  max-width: 220px;
  outline: none;
  filter: invert(0.9) hue-rotate(180deg);
}

.queue-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

/* Studio Audio Editor Section */
.editor-panel {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.editor-header-bar {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.editor-header-bar h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.editor-header-bar p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Waveform Visualiser Canvas Container */
.waveform-container {
  background: rgba(8, 11, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.waveform-canvas-box {
  width: 100%;
  height: 140px;
  position: relative;
  cursor: crosshair;
  touch-action: none;
}

#waveformCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.waveform-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.waveform-playback-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timecode-display {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.time-divider {
  color: var(--text-dim);
}

.waveform-trim-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.trim-input-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.input-time {
  width: 72px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.3rem 0.4rem;
  text-align: center;
}

.input-time:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* Settings & DSP Grid */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .settings-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

.settings-card {
  background: rgba(11, 16, 26, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.card-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.65rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

/* Inputs, Selects, and Custom Controls */
.form-select,
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-select option {
  background: #0f172a;
  color: #fff;
}

/* Range Sliders */
.form-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  outline: none;
  transition: background 0.2s;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--accent-primary-hover);
}

.form-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

/* Toggles & Checkboxes */
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.toggle-label {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

.toggle-subtitle {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked + .slider-round {
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  border-color: transparent;
}

input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* Action Footer */
.editor-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

/* Modal for Live Recording */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.modal-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.modal-visible .modal-window {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.record-circle-glow {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.12);
  border: 2px solid var(--accent-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-rose);
  box-shadow: 0 0 25px var(--accent-rose-glow);
}

.record-time-large {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.record-meter-container {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.record-meter-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #f43f5e);
  transition: width 0.05s linear;
}

.record-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s, transform 0.3s;
}

.toast-fade {
  opacity: 0;
  transform: translateY(10px);
}

.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast-error {
  border-left: 4px solid var(--accent-rose);
}

.toast-info {
  border-left: 4px solid var(--accent-primary);
}

.toast-warning {
  border-left: 4px solid var(--accent-amber);
}

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

/* Footer */
.app-footer {
  margin-top: auto;
  text-align: center;
  padding-top: 2rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.app-footer a:hover {
  color: var(--accent-primary);
}
