/* =============================================
   VARIABLES Y COLORES
   ============================================= */

:root {
  --primary-color: #ff3333;
  --primary-dark: #cc0000;
  --secondary-color: #f9a825;
  --bg-dark: #0a0e27;
  --bg-light: #f8f9fa;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --border-color: #e0e0e0;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   RESET Y BASE
   ============================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Mejorar el touch en móviles */
  -webkit-tap-highlight-color: rgba(255, 51, 51, 0.2);
  -webkit-touch-callout: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Prevenir zoom en inputs en iOS */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  /* Suavizar el scroll en móviles */
  -webkit-overflow-scrolling: touch;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

input,
select,
textarea {
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 51, 51, 0.1);
}

/* =============================================
   SPLASH SCREEN
   ============================================= */

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #ff3333 0%, #b30000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.active {
  opacity: 1;
  visibility: visible;
}

.splash-content {
  text-align: center;
  animation: splashFadeIn 1s ease-in-out;
}

.splash-logo {
  position: relative;
  margin-bottom: 30px;
}

.splash-logo-img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 8px solid white;
  background: white;
  padding: 18px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  animation: splashBounce 2s infinite;
}

.splash-chef-hat {
  position: absolute;
  top: -20px;
  right: 10px;
  font-size: 3em;
  color: white;
  animation: splashRotate 3s infinite;
}

.splash-title {
  font-size: 2.5em;
  color: white;
  margin-bottom: 10px;
  font-weight: 700;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.splash-subtitle {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
}

.splash-loader {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar {
  height: 100%;
  background: white;
  animation: splashLoad 1.5s infinite;
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes splashBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes splashRotate {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

@keyframes splashLoad {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* =============================================
   NAVBAR / NAVEGACIÓN
   ============================================= */

.navbar {
  background: linear-gradient(135deg, var(--text-dark) 0%, #1a1a2e 100%);
  padding: 15px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.navbar-logo:hover {
  transform: translateY(-2px);
}

.logo-img {
  max-height: 80px;
  width: auto;
  background: white;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.logo-text {
  color: var(--text-light);
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: 1px;
}

.navbar-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 6px;
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.95em;
}

.nav-link:hover {
  background-color: rgba(255, 51, 51, 0.2);
  color: var(--secondary-color);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.logout-btn {
  background-color: var(--error-color);
  color: var(--text-light);
}

.logout-btn:hover {
  background-color: #c82333;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-light);
  border-radius: 3px;
  transition: var(--transition);
}

/* =============================================
   LOGIN SCREEN
   ============================================= */

.login-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,51,51,0.15), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(249,168,37,0.2), transparent 40%),
              linear-gradient(135deg, #0c0f24 0%, #12142e 60%, #0c0f24 100%);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-screen.active {
  display: flex;
}

.login-container {
  width: 100%;
  max-width: 520px;
  max-height: 95vh;
  overflow-y: auto;
  padding: 10px;
}

.login-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 42px 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo img {
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  background: white;
  padding: 10px 12px;
  border-radius: 14px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.18));
}

.login-card h1 {
  font-size: 1.8em;
  color: var(--text-dark);
  margin-bottom: 10px;
  text-align: center;
}

.login-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 0.95em;
}

.login-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

/* =============================================
   FORMULARIOS
   ============================================= */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95em;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 51, 51, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-message {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9em;
}

.form-message.error {
  background-color: #fee;
  color: var(--error-color);
  border: 1px solid #fcc;
}

.form-message.success {
  background-color: #efe;
  color: var(--success-color);
  border: 1px solid #cfc;
}

/* =============================================
   BOTONES
   ============================================= */

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 51, 51, 0.3);
}

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

.btn-secondary:hover {
  background-color: #f5941f;
  transform: translateY(-2px);
}

.btn-danger {
  background-color: var(--error-color);
  color: var(--text-light);
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85em;
}

.btn-remove-item {
  background-color: #fee;
  color: var(--error-color);
  padding: 8px 12px;
  border-radius: 6px;
}

.btn-remove-item:hover {
  background-color: #fcc;
}

/* =============================================
   CONTENIDO PRINCIPAL
   ============================================= */

.main-content {
  display: none;
  min-height: calc(100vh - 80px);
  background-color: var(--bg-light);
}

.main-content.active {
  display: block;
}

.page {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.page.active {
  display: block;
}

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

/* =============================================
   HERO SECTION
   ============================================= */

.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  padding: 80px 20px;
  text-align: center;
  margin-bottom: 60px;
}

.hero-content h1 {
  font-size: 3em;
  margin-bottom: 15px;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2em;
  margin-bottom: 40px;
  opacity: 0.95;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.stat {
  background: rgba(255, 255, 255, 0.2);
  padding: 25px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.stat-number {
  display: block;
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  display: block;
  opacity: 0.9;
}

/* =============================================
   SECCIONES
   ============================================= */

.home-section,
.page-header {
  max-width: 1400px;
  margin: 0 auto 50px;
  padding: 0 20px;
}

.page-header {
  padding-top: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
  font-size: 2.5em;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-header h2 {
  font-size: 1.8em;
  color: var(--text-dark);
}

.view-all-link {
  color: var(--primary-color);
  font-weight: 600;
  padding: 8px 16px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  transition: var(--transition);
}

.view-all-link:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* =============================================
   GRID DE RECETAS
   ============================================= */

.recipes-grid,
.chefs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.recipe-card {
  background: var(--text-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.recipe-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #e0e0e0;
}

.recipe-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.recipe-card-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.recipe-card-meta {
  display: flex;
  gap: 15px;
  margin: 12px 0;
  font-size: 0.85em;
  color: #666;
}

.recipe-card-chef {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 12px;
  padding-top: 15px;
}

.recipe-card-chef img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
}

.recipe-card-chef-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9em;
}

.recipe-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* =============================================
   TARJETAS DE CHEFS
   ============================================= */

.chefs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.chef-card {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chef-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.chef-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 15px;
  border: 3px solid var(--primary-color);
}

.chef-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chef-info h3 {
  font-size: 1.3em;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.chef-bio {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 15px;
  line-height: 1.4;
  min-height: 40px;
}

.chef-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 0.9em;
  color: #666;
}

.chef-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-follow {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.9em;
}

.btn-follow.active {
  background-color: #4CAF50;
  border-color: #4CAF50;
  color: white;
}

.recipe-card-actions button {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85em;
  transition: var(--transition);
}

.btn-view {
  background-color: var(--primary-color);
  color: var(--text-light);
}

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

.btn-favorite {
  background-color: #fee;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-favorite.active {
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* =============================================
   CHEF CARDS
   ============================================= */

.chef-card {
  background: var(--text-light);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.chef-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.chef-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 15px;
  border: 4px solid var(--primary-color);
}

.chef-card h3 {
  font-size: 1.2em;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.chef-specialties {
  color: #666;
  font-size: 0.85em;
  margin-bottom: 15px;
}

.chef-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.chef-stat {
  text-align: center;
}

.chef-stat-number {
  display: block;
  font-weight: 700;
  font-size: 1.3em;
  color: var(--primary-color);
}

.chef-stat-label {
  display: block;
  font-size: 0.8em;
  color: #999;
}

/* =============================================
   BÚSQUEDA Y FILTROS
   ============================================= */

.recipes-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 12px;
  color: #999;
}

.search-box input {
  width: 100%;
  padding-left: 40px;
  background-color: var(--text-light);
}

.filter-select {
  padding: 10px 15px;
  background-color: var(--text-light);
  min-width: 200px;
}

/* =============================================
   TIMELINE DE NOTICIAS
   ============================================= */

.news-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.news-timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.news-item {
  padding-left: 100px;
  padding-bottom: 40px;
  position: relative;
  background: var(--text-light);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.news-item::before {
  content: '';
  position: absolute;
  left: -45px;
  top: 35px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid var(--bg-light);
}

.news-date {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.news-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.news-content {
  color: #666;
  line-height: 1.8;
  margin-bottom: 15px;
}

.news-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin: 15px 0;
}

/* =============================================
   PERFIL
   ============================================= */

.profile-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.profile-header {
  background: var(--text-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.profile-cover {
  height: 250px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.profile-info {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  padding: 30px;
  margin-top: -80px;
  position: relative;
}

.profile-avatar {
  position: relative;
}

.profile-avatar img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--text-light);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.change-avatar-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: var(--primary-color);
  color: var(--text-light);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.change-avatar-btn:hover {
  background-color: var(--primary-dark);
  transform: scale(1.1);
}

.profile-details {
  flex-grow: 1;
}

.profile-details h1 {
  font-size: 2em;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.profile-role {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--text-dark);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85em;
  margin-bottom: 15px;
}

.profile-email {
  color: #666;
  margin-bottom: 15px;
}

.profile-content {
  background: var(--text-light);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
}

.profile-tab-btn {
  flex: 1;
  padding: 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: #999;
  font-size: 0.95em;
}

.profile-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.profile-tab-content {
  display: none;
  padding: 30px;
}

.profile-tab-content.active {
  display: block;
}

.profile-section {
  margin-bottom: 30px;
}

.profile-section h3 {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.specialties-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.specialty-tag {
  background-color: var(--secondary-color);
  color: var(--text-dark);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9em;
}

.settings-form {
  max-width: 600px;
}

.danger-zone {
  margin-top: 40px;
  padding: 25px;
  background-color: #fee;
  border: 2px solid var(--error-color);
  border-radius: 12px;
}

.danger-zone h3 {
  color: var(--error-color);
  margin-bottom: 10px;
}

.danger-zone p {
  color: #666;
  margin-bottom: 15px;
}

/* =============================================
   DETALLE DE RECETA
   ============================================= */

.back-btn {
  background-color: var(--text-light);
  color: var(--text-dark);
  padding: 12px 20px;
  border-radius: 8px;
  margin: 20px;
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.back-btn:hover {
  background-color: #f0f0f0;
  transform: translateX(-5px);
}

.recipe-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.recipe-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
  background: var(--text-light);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.recipe-media {
  width: 100%;
}

.recipe-video {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  background-color: #000;
}

.recipe-video iframe,
.recipe-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-intro h1 {
  font-size: 2.2em;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.recipe-meta {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 2px solid var(--border-color);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-weight: 600;
}

.meta-item i {
  color: var(--primary-color);
  font-size: 1.2em;
}

.recipe-chef {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding: 15px;
  background-color: var(--bg-light);
  border-radius: 8px;
}

.recipe-chef img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.recipe-chef p {
  margin: 0;
  font-size: 0.85em;
  color: #999;
}

.recipe-chef strong {
  display: block;
  color: var(--text-dark);
  font-size: 1em;
}

.recipe-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--text-light);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.recipe-column h2 {
  font-size: 1.5em;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.ingredients-list {
  list-style: none;
}

.ingredients-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 15px;
}

.ingredients-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  flex-shrink: 0;
}

.ingredient-amount {
  color: #999;
  font-weight: 600;
}

.instructions-list {
  padding-left: 0;
  list-style: none;
}

.instructions-list li {
  padding: 20px 0 20px 50px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  line-height: 1.8;
}

.instructions-list li::before {
  content: counter(list-number);
  counter-increment: list-number;
  position: absolute;
  left: 0;
  top: 20px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.instructions-list {
  counter-reset: list-number;
}

.pdf-download {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background-color: var(--bg-light);
  border-radius: 8px;
  border: 2px solid var(--border-color);
}

.pdf-download i {
  color: var(--error-color);
  font-size: 1.5em;
}

.pdf-download a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.recipe-footer {
  background: var(--text-light);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.recipe-footer h2 {
  font-size: 1.3em;
  margin-bottom: 15px;
  color: var(--text-dark);
}

/* =============================================
   FORMULARIO DE CARGA DE RECETA
   ============================================= */

.recipe-form {
  max-width: 900px;
  margin: 0 auto;
  background: var(--text-light);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.dynamic-list {
  margin-bottom: 15px;
}

.ingredient-item,
.instruction-item {
  display: grid;
  gap: 10px;
  margin-bottom: 15px;
  padding: 15px;
  background-color: var(--bg-light);
  border-radius: 8px;
  align-items: center;
}

.ingredient-item {
  grid-template-columns: 1fr 1fr auto;
}

.instruction-item {
  grid-template-columns: auto 1fr auto;
}

.step-number {
  background-color: var(--primary-color);
  color: var(--text-light);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

/* =============================================
   MODAL
   ============================================= */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--text-light);
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 25px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8em;
  cursor: pointer;
  color: #999;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 25px;
}

.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
}

/* =============================================
   ESTADO VACÍO
   ============================================= */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--text-light);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
}

.empty-state i {
  font-size: 4em;
  color: var(--primary-color);
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h2 {
  font-size: 1.5em;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.empty-state p {
  color: #999;
  margin-bottom: 25px;
}

/* =============================================
   LIKES Y COMENTARIOS
   ============================================= */

.recipe-engagement {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.recipe-likes {
  margin-bottom: 30px;
}

.btn-like {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 30px;
  padding: 12px 30px;
  font-size: 1.1em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-like i {
  font-size: 1.3em;
  color: var(--primary-color);
  transition: var(--transition);
}

.btn-like:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

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

.btn-like.active i {
  color: white;
}

.recipe-comments-section {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.recipe-comments-section h2 {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-form {
  margin-bottom: 30px;
  display: flex;
  gap: 15px;
}

.comment-form textarea {
  flex: 1;
  resize: vertical;
  min-height: 80px;
}

.comment-form button {
  align-self: flex-end;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: var(--bg-light);
  border-radius: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-username {
  color: var(--primary-color);
  font-size: 0.95em;
}

.comment-time {
  font-size: 0.85em;
  color: #999;
}

.comment-text {
  margin-bottom: 10px;
  line-height: 1.5;
}

.btn-delete-comment {
  background: none;
  color: var(--error-color);
  font-size: 0.85em;
  padding: 4px 8px;
  transition: var(--transition);
}

.btn-delete-comment:hover {
  background: rgba(220, 53, 69, 0.1);
  border-radius: 4px;
}

.no-comments {
  text-align: center;
  color: #999;
  padding: 40px 20px;
}

/* =============================================
   PANEL DE ADMINISTRACIÓN
   ============================================= */

.admin-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.admin-stat-card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.admin-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.admin-stat-card i {
  font-size: 3em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.admin-stat-card h3 {
  font-size: 2.5em;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.admin-stat-card p {
  color: #666;
  font-size: 0.95em;
}

.admin-section {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.admin-section h2 {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-search {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.admin-search input,
.admin-search select {
  flex: 1;
  min-width: 200px;
}

.admin-users-table {
  overflow-x: auto;
}

.admin-users-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-users-table th,
.admin-users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-users-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
}

.admin-users-table td {
  vertical-align: middle;
}

.change-role-select {
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
}

.btn-view-user {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

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

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 600;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  /* ===== ESTRUCTURA GENERAL ===== */
  html {
    font-size: 14px;
  }

  body {
    padding-bottom: 20px;
  }

  /* ===== NAVBAR ===== */
  .navbar {
    padding: 10px 15px;
  }

  .logo {
    height: 60px;
    font-size: 1em;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--text-dark);
    flex-direction: column;
    gap: 0;
    border-top: 2px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }

  .navbar-menu.active {
    display: flex;
  }

  .nav-link {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    text-align: left;
  }

  .hamburger {
    display: flex;
  }

  /* ===== HERO SECTION ===== */
  .hero-section {
    padding: 40px 15px;
    min-height: auto;
  }

  .hero-content h1 {
    font-size: 1.8em;
  }

  .hero-content p {
    font-size: 1em;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat {
    padding: 15px;
  }

  /* ===== GRIDS ===== */
  .recipes-grid,
  .chefs-grid,
  .my-recipes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  /* ===== RECIPE CARDS ===== */
  .recipe-card {
    max-width: 100%;
  }

  .recipe-card-image {
    height: 200px;
  }

  .recipe-card-content {
    padding: 15px;
  }

  /* ===== FORMS ===== */
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .recipe-form,
  .settings-form {
    padding: 20px 15px;
  }

  .form-section {
    padding: 15px;
    margin: 20px 0;
  }

  .info-box {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    font-size: 0.85em;
  }

  /* ===== PAGE HEADERS ===== */
  .page-header {
    padding: 20px 15px;
  }

  .page-header h1 {
    font-size: 1.5em;
  }

  /* ===== CONTROLS ===== */
  .recipes-controls {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .search-box {
    min-width: auto;
    width: 100%;
  }

  .filter-select {
    width: 100%;
  }

  /* ===== RECIPE DETAIL ===== */
  .recipe-header {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 15px;
  }

  .recipe-video {
    height: 250px;
  }

  .recipe-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .recipe-intro h1 {
    font-size: 1.5em;
  }

  .recipe-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  .recipe-meta-item {
    font-size: 0.85em;
  }

  /* ===== PROFILE ===== */
  .profile-header {
    text-align: center;
    padding: 20px 15px;
  }

  .profile-info {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .profile-avatar {
    position: relative;
  }

  .profile-avatar img {
    width: 120px;
    height: 120px;
  }

  .profile-details {
    text-align: center;
  }

  .profile-details h1 {
    font-size: 1.5em;
  }

  .profile-tabs {
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 15px;
  }

  .profile-tab-btn {
    flex: 1;
    min-width: auto;
    font-size: 0.85em;
    padding: 10px;
  }

  /* ===== BUTTONS ===== */
  .btn {
    padding: 10px 16px;
    font-size: 0.9em;
    width: 100%;
  }

  .btn-block {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .form-actions .btn {
    width: 100%;
  }

  /* ===== MODALS ===== */
  .modal {
    padding: 10px;
  }

  .modal-content {
    padding: 20px 15px;
    max-width: 95%;
    margin: auto;
  }

  .modal-header h2 {
    font-size: 1.3em;
  }

  .modal-close {
    right: 10px;
    top: 10px;
  }

  /* ===== LISTS ===== */
  .ingredient-item,
  .instruction-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ingredient-item .ingredient-checkbox {
    order: -1;
  }

  /* ===== NEWS ===== */
  .news-timeline::before {
    left: 15px;
  }

  .news-item {
    padding-left: 50px;
    padding-right: 15px;
  }

  .news-item::before {
    left: -35px;
  }

  /* ===== ADMIN ===== */
  .admin-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .admin-users-table {
    overflow-x: auto;
  }

  .admin-users-table table {
    min-width: 600px;
  }

  /* ===== AUTH ===== */
  .login-card {
    padding: 25px 20px;
    margin: 20px 15px;
  }

  .auth-tabs {
    gap: 5px;
  }

  .tab-btn {
    font-size: 0.9em;
    padding: 10px;
  }

  /* ===== SECTIONS ===== */
  .home-section,
  .profile-section {
    padding: 20px 15px;
  }

  .section-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  /* ===== RADIO OPTIONS ===== */
  .radio-group {
    gap: 10px;
  }

  .radio-option {
    padding: 12px;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  /* ===== EXTRA SMALL SCREENS ===== */
  html {
    font-size: 13px;
  }

  .hero-content h1 {
    font-size: 1.5em;
    line-height: 1.2;
  }

  .hero-content p {
    font-size: 0.95em;
  }

  .page-header h1 {
    font-size: 1.3em;
  }

  .recipe-intro h1 {
    font-size: 1.3em;
  }

  .recipe-card-title {
    font-size: 1em;
  }

  .recipe-meta {
    flex-direction: column;
    gap: 8px;
  }

  .profile-details h1 {
    font-size: 1.3em;
  }

  .btn {
    padding: 10px 14px;
    font-size: 0.85em;
  }

  .modal-content {
    padding: 15px 10px;
  }

  .form-section {
    padding: 12px;
  }

  .info-box {
    padding: 10px;
    font-size: 0.8em;
  }

  .profile-tab-btn {
    font-size: 0.8em;
    padding: 8px;
  }

  .recipe-video {
    height: 200px;
  }

  /* Ocultar elementos no esenciales en pantallas muy pequeñas */
  .recipe-meta-item i {
    display: none;
  }

  .stat-label {
    font-size: 0.8em;
  }

  .stat-number {
    font-size: 1.5em;
  }
}

/* =============================================
   ENHANCED UPLOAD FORM STYLES
   ============================================= */

.form-section {
  margin: 30px 0;
  padding: 20px;
  background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
  border-radius: 12px;
  border: 2px solid var(--border-color);
}

.form-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.2em;
}

.form-section h3 i {
  font-size: 1.3em;
}

.info-box {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: linear-gradient(135deg, #fff3cd 0%, #fff9e6 100%);
  border-left: 4px solid var(--warning-color);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9em;
}

.info-box i {
  color: var(--warning-color);
  font-size: 1.5em;
  flex-shrink: 0;
  margin-top: 3px;
}

.info-box ul {
  margin: 10px 0;
  padding-left: 20px;
}

.info-box li {
  margin: 8px 0;
}

.info-box strong {
  color: var(--text-dark);
}

.info-box p {
  margin-top: 10px;
  color: #666;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.radio-option:hover {
  border-color: var(--primary-color);
  background: #fff5f5;
}

.radio-option input[type="radio"] {
  width: auto;
  cursor: pointer;
}

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

.radio-option span {
  font-size: 1em;
  transition: var(--transition);
}

#videoUrlGroup input {
  border: 2px solid #4285F4;
}

#videoUrlGroup input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}

@media (max-width: 768px) {
  .form-section {
    padding: 15px;
    margin: 20px 0;
  }

  .info-box {
    flex-direction: column;
    gap: 10px;
  }
}

/* =============================================
   VIDEO PLAYLIST STYLES
   ============================================= */

.video-playlist {
  margin: 20px 0;
  padding: 20px;
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
  border-radius: 12px;
  border: 2px solid var(--border-color);
}

.video-playlist h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.2em;
}

.video-playlist h3 i {
  color: #ff0000;
  font-size: 1.3em;
}

.video-playlist iframe {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-playlist p {
  margin-top: 15px;
  padding: 12px;
  background: #e3f2fd;
  border-left: 4px solid #2196F3;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .video-playlist {
    padding: 15px;
  }

  .video-playlist iframe {
    height: 250px;
  }
}

/* =============================================
   AUTH LINKS Y MODALES
   ============================================= */

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.auth-link {
  color: var(--primary-color);
  text-align: center;
  font-size: 0.9em;
  text-decoration: none;
  transition: var(--transition);
}

.auth-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.auth-link-btn {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.auth-link-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 51, 51, 0.3);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s ease;
}

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

.modal-content h2 {
  margin-bottom: 15px;
  color: var(--text-dark);
  font-size: 1.5em;
}

.modal-content p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-content .close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: var(--transition);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-content .close:hover {
  color: var(--text-dark);
  background: #f0f0f0;
}

.modal-content .message {
  padding: 12px;
  border-radius: 8px;
  margin: 15px 0;
  font-size: 0.9em;
  display: none;
}

.modal-content .message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.modal-content .message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

@media (max-width: 768px) {
  .modal-content {
    padding: 20px;
    max-width: 90%;
  }

  .auth-links {
    gap: 10px;
  }

  .auth-link-btn {
    padding: 8px 16px;
    font-size: 0.85em;
  }
}
