@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600&family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --bg-dark: #020205;
  --bg-card: rgba(15, 15, 25, 0.7);
  --primary: #ecc94b;
  /* Cambiado a dorado/amarillo estilo Artlist */
  --primary-glow: rgba(236, 201, 75, 0.4);
  --secondary: #d69e2e;
  --secondary-glow: rgba(214, 158, 46, 0.3);
  --accent: #ec4899;
  --text-main: #ffffff;
  --text-dim: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --glass: blur(16px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* HERO SECTION CINEMÁTICA - BENTO GRID */
.hero-section {
  position: relative;
  height: 90vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--bg-dark);
  /* Fondo negro profundo */
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center;
  margin-top: -80px;
  /* Para que quede debajo del nav */
  padding-top: 80px;
  overflow: hidden;
}

/* Destellos Neón en Intersecciones */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 0 0, rgba(139, 92, 246, 0.8) 1.5px, transparent 2px);
  background-size: 60px 60px;
  background-position: center;
  z-index: 1;
  animation: bentoPulse 4s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes bentoPulse {
  0% {
    opacity: 0.1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.02);
  }

  100% {
    opacity: 0.2;
    transform: scale(1);
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Viñeta para difuminar los bordes del grid y darle profundidad */
  background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 85%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.25rem;
  color: #e2e8f0;
  margin-bottom: 2.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  font-weight: 300;
}

.btn-yellow-large {
  background: linear-gradient(90deg, #f6e05e 0%, #d69e2e 100%);
  color: #1a202c;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(214, 158, 46, 0.4);
  transition: all 0.3s ease;
}

.btn-yellow-large:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 35px rgba(214, 158, 46, 0.6);
}

.btn-yellow {
  background: linear-gradient(90deg, #f6e05e 0%, #d69e2e 100%);
  color: #1a202c;
  border: none;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-yellow:hover {
  filter: brightness(1.1);
}

/* Glass Navbar - Transparente */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.main-nav.scrolled {
  background: rgba(2, 2, 5, 0.9);
  backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--border);
  padding: 1rem 5%;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.nav-logo span {
  color: var(--primary);
}

/* Main Layout */
.dashboard-container {
  padding: 2rem 5%;
}

.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

/* Form Styles */
.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
  display: block;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  color: white;
  font-weight: 500;
  transition: all 0.3s;
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
  outline: none;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 0.85rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* NAVEGACIÓN Y TABS */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: white;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--primary);
}

.tab-content {
  display: none;
  padding: 2rem 5%;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* GRIDS ESPECÍFICOS */
.studio-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

/* Video Input Table */
.video-input-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-header, .video-row {
  display: grid;
  grid-template-columns: 40px 1.5fr 1fr 1fr 140px 120px 140px;
  gap: 15px;
  align-items: center;
}

.col-select select {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  padding: 0.5rem;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.table-header {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  padding: 0 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.video-row {
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.video-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.col-num {
  font-weight: 800;
  color: var(--primary);
  text-align: center;
}

.video-row input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
}

.video-row input:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.3);
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 3rem auto;
}

.config-welcome {
  text-align: center;
  margin-top: 2rem;
}

.config-welcome h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.config-welcome p {
  color: var(--text-dim);
}

.setup-info ol {
  padding-left: 1.5rem;
  color: var(--text-dim);
}

.setup-info li {
  margin-bottom: 1rem;
  line-height: 1.4;
}

.btn-generate-all {
  width: 100%;
}

@media (max-width: 1000px) {

  .studio-grid,
  .config-grid {
    grid-template-columns: 1fr;
  }
}

/* Grid Videos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.video-item {
  background: var(--bg-card);
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.3s ease;
}

.video-item:hover {
  transform: scale(1.02);
  border-color: var(--secondary);
}

.video-preview {
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.status-pending {
  color: #fbbf24;
  border: 1px solid #fbbf24;
}

.status-done {
  color: #34d399;
  border: 1px solid #34d399;
}

.video-info {
  padding: 1rem;
}

.video-info p {
  font-size: 0.9rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Master Prompts */
.prompt-chip {
  display: inline-block;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-chip:hover {
  background: var(--primary);
  color: white;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* How it works */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.step-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.step-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 1.5rem;
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

@media (max-width: 800px) {
  .how-it-works-grid {
    grid-template-columns: 1fr;
  }
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}