/* ============================================================
   CHEF TOCADO - Estilos Personalizados
   Canal Comida - Recetario Inteligente
   ============================================================ */

:root {
  --chef-orange:     #FF6B35;
  --chef-red:        #E63946;
  --chef-yellow:     #FFD166;
  --chef-green:      #06D6A0;
  --chef-dark:       #1A1A2E;
  --chef-dark-mid:   #16213E;
  --chef-cream:      #FFF8F0;
  --chef-brown:      #8B4513;
  --chef-white:      #FFFFFF;
  --gradient-hero:   linear-gradient(135deg, #FF6B35 0%, #E63946 50%, #FFD166 100%);
  --gradient-card:   linear-gradient(145deg, #1A1A2E 0%, #16213E 100%);
  --shadow-glow:     0 0 30px rgba(255, 107, 53, 0.4);
  --shadow-card:     0 8px 32px rgba(0, 0, 0, 0.3);
  --border-radius:   16px;
  --transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background: var(--chef-dark);
  color: var(--chef-cream);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Scrollbar personalizada ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--chef-dark); }
::-webkit-scrollbar-thumb { background: var(--chef-orange); border-radius: 4px; }

/* ---- Tipografía ---- */
h1, h2, h3 { font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem); }

/* ---- Utilidades de color ---- */
.text-orange  { color: var(--chef-orange); }
.text-yellow  { color: var(--chef-yellow); }
.text-green   { color: var(--chef-green); }
.text-red     { color: var(--chef-red); }
.bg-dark      { background: var(--chef-dark); }
.bg-dark-mid  { background: var(--chef-dark-mid); }

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--chef-orange);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--chef-orange);
  object-fit: cover;
}

.navbar-title {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-subtitle {
  font-size: 0.75rem;
  color: var(--chef-yellow);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.navbar-yt-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--chef-red);
  color: white;
  padding: 8px 16px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
}

.navbar-yt-btn:hover {
  background: #c0392b;
  transform: scale(1.05);
}

/* ============================================================
   HERO SECTION (LANDING / GATEKEEPING)
   ============================================================ */
#screen-landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(230, 57, 70, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 209, 102, 0.1) 0%, transparent 60%),
    var(--chef-dark);
  z-index: 0;
}

/* Partículas decorativas */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: float-particle linear infinite;
  opacity: 0.6;
}

@keyframes float-particle {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1100px;
  width: 100%;
  padding: 40px 24px;
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .hero-chef-img { order: -1; }
}

.hero-text-block { display: flex; flex-direction: column; gap: 20px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 107, 53, 0.2);
  border: 1px solid var(--chef-orange);
  color: var(--chef-orange);
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  width: fit-content;
}

@media (max-width: 768px) { .hero-badge { margin: 0 auto; } }

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

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 248, 240, 0.8);
  line-height: 1.6;
}

/* ---- Gatekeeping Form ---- */
.gatekeeper-card {
  background: rgba(22, 33, 62, 0.9);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: var(--border-radius);
  padding: 32px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}

.gatekeeper-card h3 {
  color: var(--chef-yellow);
  margin-bottom: 8px;
}

.gatekeeper-card p {
  color: rgba(255, 248, 240, 0.7);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 480px) { .input-group { flex-direction: column; } }

.input-code {
  flex: 1;
  background: rgba(26, 26, 46, 0.8);
  border: 2px solid rgba(255, 107, 53, 0.4);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--chef-cream);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  outline: none;
  transition: var(--transition);
}

.input-code:focus {
  border-color: var(--chef-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.input-code::placeholder {
  color: rgba(255, 248, 240, 0.3);
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--gradient-hero);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-msg {
  color: var(--chef-red);
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.error-msg.show { display: flex; }

.loading-spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.loading-spinner.show { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Chef Image ---- */
.hero-chef-img {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
}

.chef-img-wrapper {
  position: relative;
  display: inline-block;
}

.chef-img-wrapper img {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 20px 40px rgba(255, 107, 53, 0.4));
  animation: chef-float 3s ease-in-out infinite;
}

@keyframes chef-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-15px); }
}

.chef-glow-ring {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 40px;
  background: radial-gradient(ellipse, rgba(255, 107, 53, 0.5) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scaleX(1); }
  50%       { opacity: 1;   transform: translateX(-50%) scaleX(1.2); }
}

/* Burbujas decorativas */
.speech-bubble {
  position: absolute;
  background: var(--chef-yellow);
  color: var(--chef-dark);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  animation: bubble-pop 2s ease-in-out infinite;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 20px;
  border: 8px solid transparent;
  border-top-color: var(--chef-yellow);
  border-bottom: 0;
}

.speech-bubble-1 { top: 10%; right: -10px; animation-delay: 0s; }
.speech-bubble-2 { top: 35%; left: -20px; animation-delay: 1s; }

@keyframes bubble-pop {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50%       { transform: scale(1.05) rotate(2deg); }
}

/* ============================================================
   RECIPE SCREEN
   ============================================================ */
#screen-recipe {
  display: none;
  min-height: 100vh;
  padding-top: 90px;
  padding-bottom: 100px;
}

#screen-recipe.active { display: block; }

.recipe-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Recipe Header ---- */
.recipe-header {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

@media (max-width: 640px) { .recipe-header { grid-template-columns: 1fr; } }

.recipe-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--chef-orange);
}

.recipe-code-badge {
  background: rgba(255, 209, 102, 0.15);
  border: 2px solid var(--chef-yellow);
  border-radius: 12px;
  padding: 12px 20px;
  text-align: center;
}

.recipe-code-badge .label {
  font-size: 0.7rem;
  color: var(--chef-yellow);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.recipe-code-badge .code {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--chef-yellow);
  letter-spacing: 4px;
}

/* ---- Recipe Grid ---- */
.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 768px) { .recipe-grid { grid-template-columns: 1fr; } }

/* ---- Ingredients Section ---- */
.section-card {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--border-radius);
  padding: 24px;
  height: fit-content;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--chef-yellow);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 209, 102, 0.2);
}

.section-icon {
  width: 36px; height: 36px;
  background: rgba(255, 209, 102, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ---- Ingredient Gallery ---- */
.ingredient-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.ingredient-card {
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.ingredient-card:hover {
  border-color: var(--chef-orange);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.2);
}

.ingredient-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 6px;
  background: rgba(255, 107, 53, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 6px;
}

.ingredient-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.ingredient-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--chef-cream);
  line-height: 1.2;
}

.ingredient-qty {
  font-size: 0.65rem;
  color: var(--chef-orange);
  font-weight: 600;
  margin-top: 2px;
}

/* ---- Ingredients List ---- */
.ingredient-list { list-style: none; }

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 248, 240, 0.05);
  font-size: 0.9rem;
}

.ingredient-item:last-child { border-bottom: none; }

.ingredient-dot {
  width: 8px; height: 8px;
  background: var(--chef-orange);
  border-radius: 50%;
  flex-shrink: 0;
}

.ingredient-amount {
  color: var(--chef-yellow);
  font-weight: 700;
  min-width: 60px;
}

/* ---- Steps Section ---- */
.steps-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }

.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid rgba(255, 107, 53, 0.1);
  border-radius: 12px;
  transition: var(--transition);
  cursor: pointer;
}

.step-item:hover { border-color: rgba(255, 107, 53, 0.3); }

.step-item.completed {
  background: rgba(6, 214, 160, 0.08);
  border-color: rgba(6, 214, 160, 0.3);
}

.step-item.completed .step-text {
  text-decoration: line-through;
  color: rgba(255, 248, 240, 0.4);
}

.step-checkbox {
  width: 28px; height: 28px;
  border: 2px solid rgba(255, 107, 53, 0.5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  background: transparent;
}

.step-item.completed .step-checkbox {
  background: var(--chef-green);
  border-color: var(--chef-green);
}

.step-checkbox-icon {
  color: white;
  font-size: 0.9rem;
  display: none;
}

.step-item.completed .step-checkbox-icon { display: block; }

.step-number {
  width: 28px; height: 28px;
  background: var(--gradient-hero);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.step-content { flex: 1; }

.step-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--chef-cream);
  transition: var(--transition);
}

.step-tip {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 209, 102, 0.1);
  border-left: 3px solid var(--chef-yellow);
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  color: var(--chef-yellow);
}

/* ---- Progress Bar ---- */
.progress-section {
  background: var(--gradient-card);
  border: 1px solid rgba(6, 214, 160, 0.3);
  border-radius: var(--border-radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.progress-info { flex: 1; }

.progress-label {
  font-size: 0.85rem;
  color: rgba(255, 248, 240, 0.6);
  margin-bottom: 8px;
}

.progress-bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--chef-green), #00b894);
  border-radius: 5px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-percent {
  font-size: 2rem;
  font-weight: 800;
  color: var(--chef-green);
  min-width: 70px;
  text-align: right;
}

/* ---- Video Section ---- */
.video-embed {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 32px;
}

.video-embed iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

.video-placeholder {
  aspect-ratio: 16/9;
  background: rgba(26, 26, 46, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 248, 240, 0.4);
}

/* ---- Tags ---- */
.tags-section { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.tag {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.3);
  color: var(--chef-orange);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ---- Back Button ---- */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.4);
  color: var(--chef-orange);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
}

.btn-back:hover {
  background: rgba(255, 107, 53, 0.25);
  transform: translateX(-4px);
}

/* ============================================================
   CHATBOT FLOTANTE
   ============================================================ */
#chatbot-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
}

.chat-toggle-btn {
  width: 64px; height: 64px;
  background: var(--gradient-hero);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.5);
  transition: var(--transition);
  position: relative;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(255, 107, 53, 0.6);
}

.chat-toggle-btn img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-notification-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 14px; height: 14px;
  background: var(--chef-green);
  border-radius: 50%;
  border: 2px solid var(--chef-dark);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.3); }
}

.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  max-height: 520px;
  background: var(--chef-dark-mid);
  border: 1px solid rgba(255, 107, 53, 0.4);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0) translateY(20px);
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
}

.chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
}

@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 40px);
    right: -14px;
  }
}

.chat-header {
  background: var(--gradient-hero);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  object-fit: cover;
}

.chat-header-info { flex: 1; }

.chat-header-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: white;
}

.chat-header-status {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 6px; height: 6px;
  background: #00ff88;
  border-radius: 50%;
}

.chat-close-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.chat-close-btn:hover { background: rgba(255,255,255,0.3); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,107,53,0.4); border-radius: 2px; }

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.4;
  animation: msg-appear 0.3s ease;
}

@keyframes msg-appear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.25);
  color: var(--chef-cream);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-msg.user {
  background: var(--gradient-hero);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-msg.typing {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.2);
  align-self: flex-start;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.typing-dot {
  width: 8px; height: 8px;
  background: var(--chef-orange);
  border-radius: 50%;
  animation: typing-bounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-8px); }
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 107, 53, 0.2);
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--chef-cream);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.chat-input:focus { border-color: var(--chef-orange); }
.chat-input::placeholder { color: rgba(255, 248, 240, 0.3); }

.chat-send-btn {
  width: 40px; height: 40px;
  background: var(--gradient-hero);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send-btn:hover { transform: scale(1.1); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Suggested Questions ---- */
.chat-suggestions {
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid rgba(255, 107, 53, 0.1);
}

.suggestion-chip {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.3);
  color: var(--chef-orange);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.suggestion-chip:hover {
  background: rgba(255, 107, 53, 0.2);
  transform: scale(1.05);
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.95);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#loading-overlay.show { display: flex; }

.loading-chef {
  width: 120px;
  animation: chef-float 1.5s ease-in-out infinite;
}

.loading-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--chef-orange);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.loading-bar-track {
  width: 200px;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  background: var(--gradient-hero);
  border-radius: 3px;
  animation: loading-progress 2s ease-in-out infinite;
}

@keyframes loading-progress {
  0%   { width: 0%; }
  50%  { width: 70%; }
  100% { width: 100%; }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--chef-dark-mid);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 280px;
  max-width: 360px;
}

.toast.success { border-left: 4px solid var(--chef-green); }
.toast.error   { border-left: 4px solid var(--chef-red); }
.toast.info    { border-left: 4px solid var(--chef-orange); }

.toast-icon { font-size: 1.3rem; }
.toast-msg  { font-size: 0.88rem; font-weight: 600; flex: 1; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
#screen-admin {
  display: none;
  min-height: 100vh;
  padding-top: 90px;
  padding-bottom: 60px;
}

#screen-admin.active { display: block; }

.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.admin-header {
  text-align: center;
  margin-bottom: 40px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(230, 57, 70, 0.2);
  border: 1px solid var(--chef-red);
  color: var(--chef-red);
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.admin-login-card {
  background: var(--gradient-card);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 20px;
  padding: 40px;
  max-width: 440px;
  margin: 0 auto;
}

.admin-panel-content { display: none; }
.admin-panel-content.active { display: block; }

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 640px) { .admin-grid { grid-template-columns: 1fr; } }

.admin-stat-card {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--border-radius);
  padding: 24px;
  text-align: center;
}

.admin-stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-stat-label {
  font-size: 0.85rem;
  color: rgba(255, 248, 240, 0.6);
  margin-top: 4px;
}

.admin-input-card {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--border-radius);
  padding: 28px;
  margin-bottom: 24px;
}

.admin-textarea {
  width: 100%;
  background: rgba(26, 26, 46, 0.8);
  border: 2px solid rgba(255, 107, 53, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--chef-cream);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.admin-textarea:focus { border-color: var(--chef-orange); }
.admin-textarea::placeholder { color: rgba(255, 248, 240, 0.3); }

.admin-input {
  width: 100%;
  background: rgba(26, 26, 46, 0.8);
  border: 2px solid rgba(255, 107, 53, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--chef-cream);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  margin-bottom: 12px;
}

.admin-input:focus { border-color: var(--chef-orange); }

.btn-admin {
  background: linear-gradient(135deg, var(--chef-red), #c0392b);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.btn-admin:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4); }

.btn-secondary {
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.4);
  color: var(--chef-orange);
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover { background: rgba(255, 107, 53, 0.25); }

/* ---- Progress Log ---- */
.progress-log {
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 12px;
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
}

.log-entry {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 10px;
}

.log-time { color: rgba(255, 248, 240, 0.4); min-width: 80px; }
.log-msg.success { color: var(--chef-green); }
.log-msg.error   { color: var(--chef-red); }
.log-msg.info    { color: var(--chef-orange); }
.log-msg.pending { color: var(--chef-yellow); }

/* ---- Recipe Table ---- */
.recipes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.recipes-table th {
  background: rgba(255, 107, 53, 0.15);
  color: var(--chef-orange);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid rgba(255, 107, 53, 0.3);
}

.recipes-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--chef-cream);
}

.recipes-table tr:hover td { background: rgba(255, 107, 53, 0.05); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.done    { background: rgba(6, 214, 160, 0.15); color: var(--chef-green); }
.status-badge.pending { background: rgba(255, 209, 102, 0.15); color: var(--chef-yellow); }
.status-badge.error   { background: rgba(230, 57, 70, 0.15); color: var(--chef-red); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: rgba(22, 33, 62, 0.8);
  border-top: 1px solid rgba(255, 107, 53, 0.2);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 248, 240, 0.5);
}

.footer a {
  color: var(--chef-orange);
  text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

/* ============================================================
   ANIMACIONES DE ENTRADA
   ============================================================ */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.slide-up {
  animation: slideUp 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 480px) {
  .navbar { padding: 10px 16px; }
  .navbar-title { font-size: 1.1rem; }
  .recipe-container { padding: 0 16px; }
  .admin-container { padding: 0 16px; }
  #chatbot-fab { bottom: 16px; right: 16px; }
}
