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

:root {
  --bg-dark: #121212;
  --bg-medium: #1e1e1e;
  --bg-light: #2d2d2d;
  --color-primary: #5e6ea1;
  --color-primary-dark: #45527e;
  --color-secondary: #7987b3;
  --color-text: #ffffff;
  --color-text-muted: #b3b3b3;
  --color-border: #3d3d3d;
  --color-success: #4caf50;
  --color-danger: #45527e;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 5px;
  --transition: all 0.3s ease;
  --color-error: #ff4d4d;
  --header-height: 55px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --font-family-base: 'Inter', sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 600;
  --line-height-base: 1.5;
  --letter-spacing: -0.015em;
  --clip-width: 150px;
}

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

body {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-dark);
  color: var(--color-text);
  /* Prevent address bar hiding */
  height: 100%;
  min-height: 100%;
  overflow-y: scroll;
  /* Disable overscroll bounce effect */
  /* overscroll-behavior: none; */
}

html {
  height: 100%;
  overflow-y: scroll;
  overscroll-behavior: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

button, input, select, textarea {
  font-family: inherit;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  user-select: none;
  height: 100vh;
  overflow: hidden;
}

header {
  background-color: var(--bg-medium);
  padding: 1rem;
  color: white;
  box-shadow: var(--shadow);
  position: fixed;
  width: 100vw;
  z-index: 100;
}

@media (max-width: 768px) {
  header {
    position: fixed;
    padding: 0.5rem 1rem;
    z-index: 100;
    width: 100vw;
    background-color: var(--bg-medium);
    height: var(--header-height);
    max-height: var(--header-height);
    min-height: var(--header-height);
    align-content: center;
    top: 0;
  }
}

.logo {
  display: flex;
  align-items: center;
  width: 100%;
}

.logo i {
  font-size: 1.3rem;
  margin-right: 0.7rem;
}

.logo h1 {
  font-size: 1.3rem;
  margin: 0;
  font-weight: 500;
}

#new-project-btn {
  margin-left: auto;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background-color: var(--color-secondary);
  border: none;
  border-radius: var(--border-radius);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

#new-project-btn:hover {
  background-color: var(--color-danger);
}

#new-project-btn:active {
  background-color: var(--color-danger);
}

@media (max-width: 768px) {
  #new-project-btn {
    background-color: var(--color-secondary);
  }
}

#new-project-btn i {
  font-size: 0.9rem;
  margin-right: 0.1rem;
}

.version {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-left: 0.5rem;
}

@media (max-width: 768px) {
  .logo {
    justify-content: space-between;
  }
  .logo h1 {
    font-size: 1.1rem;
  }
  
  #new-project-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }
}

main {
  flex: 1;
  padding: 2rem;
  margin-top: 50px;
  margin-bottom: 50px;
  height: calc(100vh - 100px);
  overflow: hidden;
}

@media (max-width: 768px) {
  .app-container {
    height: auto;
    overflow: visible;
  }
  
  main {
    height: auto;
    overflow: visible;
  }
  
  .steps-container {
    height: auto;
    display: block;
  }
  
  .step-content {
    overflow-y: visible;
  }

  main {
    padding: 0rem;
    margin-top: 0px;
    margin-bottom: 0px;
  }
  .steps-container {
    padding: 0rem;
    border-radius: 0rem !important;
    background-color: transparent !important;
  }

  .step-content {
    padding: 1rem !important;
    position: relative;
    top: 130px;
    height: auto;
    margin-bottom: 180px;
  }

  video {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }
}

footer {
  background-color: var(--bg-medium);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  position: fixed;
  bottom: 0;
  width: 100vw;
}

@media (max-width: 768px) {
  footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--bg-medium);
    z-index: 100;
    display: none;
  }
}

/* Steps navigation */
.steps-container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.steps-nav {
  display: flex;
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--color-border);
}

.step-nav {
  flex: 1;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  border-right: 1px solid var(--color-border);
  transition: var(--transition);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.step-nav:last-child {
  border-right: none;
}

.step-nav.active {
  background-color: var(--color-primary);
  color: white;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--bg-medium);
  color: var(--color-text);
  border-radius: 50%;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.step-nav.active .step-number {
  background-color: white;
  color: var(--color-primary);
}

.step-name {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Step content */
.step-content {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 80px;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

h2 {
  margin-bottom: 1.2rem;
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  h3 {  
    font-size: 0.8rem;
  }
  button {
    font-size: 0.8rem !important;
  }
}

h3 {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* Form elements */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  color: var(--color-text);
  font-size: 1rem;
  transition: var(--transition);
  user-select: text;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.2);
}

/* Buttons */
.btn-primary, 
.btn-secondary,
.btn-icon,
.file-remove,
button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-dark);
}

.btn-secondary {
  background-color: var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  background-color: var(--color-text-muted);
}

.btn-secondary:active {
  background-color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .btn-secondary {
    background-color: var(--color-border);
  }
}

#export-zip-btn {
  background-color: var(--color-secondary);
  color: white;
}

#export-zip-btn:hover {
  background-color: var(--color-danger);
}

#export-zip-btn:active {
  background-color: var(--color-danger);
}

.export-buttons a {
  width: 260px;
  align-items: center;
  display: flex;
  justify-content: center;
  text-decoration: none;
  height: 50px;
  font-size: 0.9rem;
}

.export-buttons button {
  width: 260px;
  height: 50px;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  #export-zip-btn {
    background-color: var(--color-secondary);
  }

  .export-buttons a {
    width: 100%;
    align-items: center;
    display: flex;
    justify-content: center;
    text-decoration: none;
    height: 50px;
  }

  .export-buttons button {
    width: 100%;
    height: 50px;
  }
}

.btn-icon {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--color-danger);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  position: absolute;
  bottom: 82px;
  background-color: var(--bg-medium);
  padding: 1rem;
  border-top: 1px solid var(--color-border);
  width: 90%;
  z-index: 100;
  margin-top: 0;
  max-width: 1160px;
  left: 50%;
  transform: translateX(-50%);
}

.actions button {
  width: 130px;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .actions {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--bg-medium);
    margin-bottom: 0px;
    z-index: 100;
    margin-left: 0;
    padding: 1rem;
    border-top: 1px solid var(--color-border);
    padding-bottom: 20px !important;
    justify-content: flex-end !important;
    gap: 20px !important;
  }

  .actions button {
    width: 47% !important;
  }
}

/* Format options */
.format-options {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.format-option {
  flex: 1;
  padding: 1.5rem;
  background-color: var(--bg-light);
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  height: 300px;
  display: flex;
  -moz-user-select: none;
  -ms-user-select: none;
  align-content: center;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

@media (max-width: 768px) {
  .format-option {
    min-height: 160px;
  }
}

.format-option:hover {
  border-color: var(--color-primary);
}

.format-option.selected {
  border-color: var(--color-primary);
  background-color: var(--color-danger);
}

.format-preview {
  margin-bottom: 1rem;
  font-size: 2.5rem;
  color: var(--color-text-muted);
}

.format-info h3 {
  margin-bottom: 0.25rem;
}

.format-info p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Upload area */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background-color: var(--bg-light);
  border: 2px dashed var(--color-border);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.upload-area:hover {
  border-color: var(--color-primary);
}

.upload-area i {
  font-size: 2.5rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.upload-area p {
  margin-bottom: 0.5rem;
  text-align: center;
}

.upload-area span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Uploaded files */
.uploaded-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 2fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.file-item {
  position: relative;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.file-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background-color: var(--bg-dark);
  transition: opacity 0.3s ease;
  position: relative;
}

.file-thumbnail.thumbnail-error,
.clip-thumbnail.thumbnail-error {
  opacity: 0.7;
  filter: grayscale(50%);
}

/* Asegurar que las miniaturas siempre tienen un fondo visible */
.file-thumbnail img,
.clip-thumbnail img {
  min-height: 100%;
  min-width: 100%;
}

/* Indicador de carga para miniaturas */
.file-thumbnail::before,
.clip-thumbnail::before {
  content: none;
}

.file-thumbnail,
.clip-thumbnail {
  background-color: var(--bg-dark);
  z-index: 1;
  position: relative;
}

.file-thumbnail img,
.clip-thumbnail img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.file-info {
  padding: 0.75rem;
}

.file-name {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
  user-select: text;
}

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

.file-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  z-index: 1;
  padding: 0 !important;
  font-size: 12px;
}

.file-remove:hover {
  background-color: var(--color-danger);
}

.file-remove:active {
  background-color: var(--color-danger);
}

@media (max-width: 768px) {
  .file-remove:hover {
    background-color: rgba(0, 0, 0, 0.5);
  }
}

/* Clips container */
.clips-container {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  /* min-height: 150px; */
  position: sticky;
  top: -20px;
  z-index: 1000;
  width: 100%;
  border: 1px solid var(--color-border);
}

#step-4 h2 {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

#export-quality {
  height: 50px;
}

@media (max-width: 768px) {
  .clips-container {
    position: fixed;
    margin-left: -1rem;
    padding: 1rem;
    top: 134px;
    margin-top: 0;
    border-radius: 0;
    z-index: 200;
    width: 100vw;
    padding-top: 10px;
  }
  .clip-editor {
    margin-bottom: 1.5rem;
    margin-top: var(--clip-width);
  }
}

.clip-item {
  position: relative;
  flex: 0 0 var(--clip-width);
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: grab;
  border: 2px solid transparent;
  transition: var(--transition);
}

.clip-item.selected {
  border-color: var(--color-primary);
}

.clip-item.dragging {
  opacity: 0.6;
  cursor: grabbing;
  position: relative;
  z-index: 200;
  box-shadow: 0 0 10px 0px var(--color-primary);
}

.clip-item.dragover {
  border: 2px dashed var(--color-primary);
}

.clip-drag-handle {
  position: absolute;
  top: 5px;
  right: 5px;
  color: var(--color-text);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 14px;
  z-index: 10;
  cursor: grab;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);

  display: none;
}

.clip-drag-handle:hover, .clip-drag-handle:active {
  background-color: var(--color-primary);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .clip-drag-handle {
    top: 10px;
    right: 10px;
    padding: 8px 10px;
    font-size: 16px;
    border-radius: 5px;
  }
}

.clip-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background-color: var(--bg-dark);
  user-select: none;  
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  background-image: url('/img/image-placeholder.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.clip-duration {
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  user-select: none;  
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Clip editor */
.clip-editor {
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .clip-editor {
    padding: 1rem;
  }
}

.aspect-ratio-options,
.duration-options,
.effect-options {
  margin-bottom: 1.5rem;
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.option {
  display: flex;
  align-items: center;
  cursor: pointer;
  background-color: var(--bg-medium);
  padding: 0.6rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  margin: 0;
  min-width: 190px;
}

@media (max-width: 768px) {
  .option {
    min-width: 49%;
  }
}

.option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option input[type="radio"] + span {
  display: flex;
  align-items: center;
  position: relative;
}

.option input[type="radio"] + span::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
  border-radius: 50%;
  border: 2px solid var(--color-text-muted);
  background-color: transparent;
  transition: var(--transition);
}

.option input[type="radio"]:checked + span::before {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  box-shadow: inset 0 0 0 3px var(--bg-medium);
}

.option input[type="radio"]:focus + span::before {
  box-shadow: inset 0 0 0 3px var(--bg-medium), 0 0 0 2px var(--color-primary-dark);
}

.option input[type="radio"]:checked ~ span {
  color: var(--color-primary);
  font-weight: 500;
}

.option.selected {
  background-color: rgba(124, 77, 255, 0.15);
  border-color: var(--color-primary);
}

/* Audio player */
#audio-player-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.audio-info {
  flex: 1;
}

#audio-name {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#play-pause {
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-medium);
  border-radius: 50%;
}

.progress-container {
  flex: 1;
  height: 6px;
  background-color: var(--bg-medium);
  border-radius: 25px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background-color: var(--color-primary);
  border-radius: 3px;
  animation: progress-animation 1.5s linear infinite;
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
}

@keyframes progress-animation {
  from {
    background-position: 1rem 0;
  }
  to {
    background-position: 0 0;
  }
}

/* Export */
.export-status {
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 1rem;
}

/* Input de duración */
#clip-duration {
  padding: 0.5rem;
  background-color: var(--bg-medium);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  color: var(--color-text);
  width: 190px;
  font-size: 1rem;
}

@media (max-width: 768px) {
  #clip-duration {
    width: 100%;
  }
}

#clip-duration:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .steps-nav {
    flex-direction: row;
    z-index: 100;
    width: 100%;
    position: fixed;
    margin-top: 0px;
    top: 53px;
  }
  
  .step-nav {
    border-right: none;
    font-size: 10px;
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem;
  }

  .step-name {
    font-size: 10px;
  }
  
  .step-nav:last-child {
    border-bottom: none;
  }
  
  .format-options {
    flex-direction: column;
  }
}

/* Timeline para videos */
.video-timeline-container {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.timeline-preview {
  width: 100%;
  background-color: var(--bg-dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.timeline-preview video {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-track {
  position: relative;
  height: 30px;
  background-color: var(--bg-dark);
  border-radius: 4px;
  cursor: pointer;
}

.timeline-selection {
  position: absolute;
  top: 0;
  height: 100%;
  background-color: rgba(124, 77, 255, 0.3);
  border: 1px solid var(--color-primary);
  border-radius: 4px;
}

.timeline-handle {
  position: absolute;
  top: 0;
  width: 10px;
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 4px;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.timeline-handle.start-handle {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.timeline-handle.end-handle {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

@media (max-width: 768px) {
  .timeline-track {
    height: 40px;
  }
  
  .timeline-handle {
    width: 20px;
    background-color: var(--color-primary);
    border: 2px solid white;
  }
  
  /* Increase the touch target area */
  .timeline-handle::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
  }
}

.timeline-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.timeline-time .duration {
  font-weight: bold;
  color: var(--color-text);
}

/* Botón de previsualización */
#preview-trim-btn {
  align-self: center;
  margin-top: 1rem;
}

/* Video icon para clips de video */
.video-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 7px;
  border-radius: 50%;
  font-size: 10px;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.clip-item .video-icon {
  top: 5px !important;
  left: 5px !important;
}

/* Estado vacío para el contenedor de clips */
.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 150px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0 2rem;
}

/* Indicadores de carga y error */
.loading-indicator, .error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  min-height: 150px;
  color: var(--color-text-muted);
}

.error-message {
  color: var(--color-error);
  background-color: rgba(255, 0, 0, 0.05);
  border-radius: var(--border-radius);
}

.loading-indicator i, .error-message i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.error-message i {
  color: var(--color-error);
}

/* Estilos para elementos deshabilitados durante el procesamiento */
.step-nav.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

button.disabled {
  pointer-events: none;
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--bg-medium);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

/* Estilos para el botón de exportación procesando */
#proccess-btn.disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
}

/* Indicador de procesamiento en el botón de exportación */
#proccess-btn.disabled i {
  margin-right: 8px;
}

.apply-to-all-container {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: rgba(124, 77, 255, 0.05);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--color-primary);
  text-align: center;
}

.apply-to-all-container button {
  margin-bottom: 0.5rem;
  background-color: var(--color-primary);
  color: white;
  transition: var(--transition);
}

.apply-to-all-container button:hover {
  background-color: var(--color-primary-dark);
  transform: scale(1.02);
}

.apply-to-all-container .help-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.apply-to-all-container button.active-touch {
  background-color: var(--color-primary-dark);
  transform: scale(0.98);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .apply-to-all-container {
    padding: 0.8rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
  }
  .apply-to-all-container button {
    padding: 1rem;
    font-size: 1.1rem;
    width: 100%;
    margin-bottom: 0.8rem;
  }
}

.export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: left;
}

.export-buttons a, 
.export-buttons button {
  min-width: 180px;
}

.featured-section {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding: 1.5rem;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--color-primary);
}

.featured-section h3 {
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.import-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

#import-file-name {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

#import-status {
  padding: 1rem;
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
}

#zip-status {
  padding: 1rem;
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .export-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .import-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  
  #import-file-name {
    margin-top: 0.5rem;
    max-width: 100%;
  }
  
  #step-1 .featured-section {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  #step-1 .featured-section h3 {
    font-size: 1rem;
  }
}

.music-section-title {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .music-section-title {
    margin-top: 1.5rem;
    padding-top: 1rem;
    font-size: 1.1rem;
  }
} 


/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-light) var(--bg-dark);
}

/* Estilos para el banner de instalación */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #4a90e2;
  color: white;
  padding: 12px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

.install-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.install-buttons {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.install-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

#install-yes {
  background-color: white;
  color: #4a90e2;
}

#install-yes:hover {
  background-color: #f0f0f0;
}

#install-no {
  background-color: transparent;
  color: white;
  border: 1px solid white;
}

#install-no:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .install-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .install-buttons {
    margin-top: 12px;
    width: 100%;
  }
  
  .install-buttons button {
    flex: 1;
  }
}

.standalone-mode body {
  height: 100dvh;
}

@media screen and (max-width: 768px) {
  /* Control body overflow based on active step */
  #step-4 h2 {
    display: none;
  }

  .export-video {
    display: none !important;
  }
}

.effect-options h4 {
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  margin-top: 1rem;
}

.export-progress-bar {
  width: 0%;
  height: 10px;
  background-color: var(--color-primary);
}

.clip-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  z-index: 10;
  padding: 0 !important;
  font-size: 10px;
}

.clip-remove:hover {
  background-color: var(--color-danger);
}

.clip-remove:active {
  background-color: var(--color-danger);
}

@media (max-width: 768px) {
  .clip-remove:hover {
    background-color: rgba(0, 0, 0, 0.5);
  }
  
  .clip-remove {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}