:root {
  --bg-color: #0d0d1a;
  --text-color: #f8fafc;
  --text-secondary: #94a3b8;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --accent-color: #c084fc;
  /* Purple accent */
  --accent-glow: rgba(192, 132, 252, 0.5);
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, #201a2b 0%, #0d0d1a 100%);
  z-index: -2;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
}

.orb-1 {
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: #7c3aed;
  /* Purple */
}

.orb-2 {
  bottom: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: #db2777;
  /* Pink/Rose */
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Centering like video tool */
  width: 100%;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-size: 2rem;
  /* Matching video tool size */
  margin: 0;
  background: linear-gradient(to right, #c084fc, #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.subtitle {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
}

.main-card {
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Config Panel */
.config-panel {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group select,
.form-group input[type="range"] {
  width: 100%;
}

select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: var(--accent-color);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 3px;
  margin-top: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
}

.note {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--card-border);
  border-radius: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.02);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent-color);
  background: rgba(59, 130, 246, 0.05);
}

.icon-container svg {
  width: 48px;
  height: 48px;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.drop-text {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.drop-subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}


#fileInput {
  display: none;
}

/* Actions in Card */
.card-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-stop {
  background: transparent;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-success {
  background: var(--success-color);
  color: #0f172a;
}

.status-error {
  color: white;
}

/* Gallery */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

/* Gallery Items */
.gallery .card {
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  margin-bottom: 0;
  border: 1px solid var(--card-border);
}

.card-icon-container {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  margin-right: 1rem;
}

.card-body {
  flex: 1;
  min-width: 0;
  padding: 0;
  display: block;
}

.file-info {
  flex: 1;
  min-width: 0;
  margin-bottom: 0.25rem;
}

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
  color: var(--text-color);
}

.file-size {
  font-size: 0.8rem;
  color: #94a3b8;
}


/* Actions */
.actions {
  margin-top: 2rem;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.4);
}

/* Back Link */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--text-color);
}

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

/* Toast */
.notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(16, 185, 129, 0.9);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 100;
  font-weight: 600;
  white-space: nowrap;
}

.notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 600px) {
  .config-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}