/* Modern Ultra-Aesthetic Design for AnyAudio to MP3 Studio */

:root {
  --bg-primary: #0A0D17;
  --bg-secondary: #121829;
  --card-bg: rgba(20, 27, 45, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  --accent-glow: rgba(99, 102, 241, 0.35);
  --accent-primary: #6366F1;
  --accent-hover: #4F46E5;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --success: #10B981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --error: #EF4444;
  --warning: #F59E0B;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Glowing Mesh */
.bg-glow-1 {
  position: fixed;
  top: -150px;
  left: 10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-2 {
  position: fixed;
  bottom: -150px;
  right: 10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.14) 0%, rgba(236, 72, 153, 0) 70%);
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.app-container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 36px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  color: #A5B4FC;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 20px;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.feature-pill {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  color: var(--text-muted);
}

/* Glassmorphism Card */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  margin-bottom: 24px;
  overflow: hidden;
  transition: var(--transition);
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  background: rgba(18, 24, 42, 0.6);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.dropzone:hover, .dropzone.drag-active {
  border-color: #8B5CF6;
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px);
}

.drop-icon-wrapper {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A5B4FC;
  transition: var(--transition);
}

.dropzone:hover .drop-icon-wrapper {
  transform: scale(1.1);
  background: var(--accent-gradient);
  color: #FFFFFF;
}

.drop-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.drop-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.drop-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

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

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 16px var(--success-glow);
}

.btn-success:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
}

.btn-danger-outline:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.15);
  border-color: #EF4444;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-download {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
}

.btn-download:hover {
  background: #10B981;
  color: white;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* Format chips */
.supported-formats-box {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.format-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.08);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Settings Bar */
.settings-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
}

.setting-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

select {
  background: rgba(10, 13, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

select:focus, select:hover {
  border-color: var(--accent-primary);
}

/* Global Progress */
.global-progress-box {
  padding: 16px 24px;
  background: rgba(99, 102, 241, 0.06);
  border-bottom: 1px solid var(--card-border);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

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

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Queue Card */
.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
}

.queue-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.count-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #818CF8;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
}

.queue-actions {
  display: flex;
  gap: 10px;
}

.queue-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(14, 18, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.queue-item:hover {
  background: rgba(22, 28, 48, 0.8);
  border-color: rgba(99, 102, 241, 0.2);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 200px;
  max-width: 280px;
}

.ext-tag {
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  min-width: 46px;
}

.item-info {
  overflow: hidden;
}

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

.item-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.size-change {
  color: #34D399;
}

.item-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 320px;
}

.mini-player audio {
  width: 100%;
  height: 28px;
  filter: invert(0.9) hue-rotate(180deg);
  border-radius: 6px;
}

.item-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.item-progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.item-status-text {
  font-size: 11px;
  color: var(--text-dim);
}

.item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.badge-busy {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
}

.badge-error {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}

.empty-state svg {
  margin-bottom: 12px;
  opacity: 0.4;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 60px;
  color: var(--text-dim);
  font-size: 13px;
}

@media (max-width: 768px) {
  .title {
    font-size: 32px;
  }
  .queue-item {
    flex-direction: column;
    align-items: stretch;
  }
  .item-left {
    max-width: 100%;
  }
  .item-center {
    max-width: 100%;
  }
  .item-right {
    justify-content: flex-end;
  }
}
