:root {
  --primary: #7b61ff;
  --secondary: #ff6b9d;
  --accent: #ffd166;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --success: #06d6a0;
  --warning: #ffd166;
  --danger: #ff6b9d;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: var(--light);
}

/* Estilos comunes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-create {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 30px rgba(123, 97, 255, 0.3);
}

/* Header y navegación */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 5%;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === MENÚ HAMBURGUESA === */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* === NAVEGACIÓN === */
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
}

.nav-cta:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

/* === VERSIONES DE LOGIN === */
.user-section-desktop {
  display: flex;
  align-items: center;
}

.user-section-mobile {
  display: none;
}

/* === USER INFO - VERSIÓN ÚNICA === */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 15px;
  background: rgba(123, 97, 255, 0.1);
  border-radius: 50px;
  border: 2px solid rgba(123, 97, 255, 0.2);
  transition: all 0.3s;
}

.user-info:hover {
  background: rgba(123, 97, 255, 0.15);
  border-color: rgba(123, 97, 255, 0.3);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
}

.user-plan {
  font-size: 0.7rem;
  color: var(--primary);
  background: rgba(123, 97, 255, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 500;
}

/* === BOTÓN LOGOUT - CORREGIDO === */
.logout-btn {
  background: white;
  color: var(--primary);
  border: none;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.logout-btn:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

/* === GOOGLE BUTTON === */
#userSection {
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g_id_signin {
  margin: 0;
  padding: 0;
}

/* === HERO SECTION === */
.hero {
  padding: 12rem 5% 8rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: 4rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Preview Section */
.previews {
  padding: 5rem 5%;
  background: white;
  text-align: center;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--dark);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.preview-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  cursor: pointer;
}

.preview-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.preview-image {
  height: 250px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
}

.preview-content {
  padding: 2rem;
}

.preview-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.preview-desc {
  color: #666;
  margin-bottom: 1.5rem;
}

/* Pricing Section */
.pricing {
  padding: 6rem 5%;
  text-align: center;
  background: white;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 3rem auto;
}

.pricing-card {
  background: white;
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  position: relative;
  border: 2px solid transparent;
}

.pricing-card.free {
  border-color: var(--success);
}

.pricing-card.premium {
  border-color: var(--primary);
  transform: scale(1.05);
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.premium:hover {
  transform: scale(1.05) translateY(-10px);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 600;
}

.pricing-badge.premium {
  background: var(--primary);
}

.pricing-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin: 1.5rem 0;
}

.price .free {
  color: var(--success);
}

.features {
  text-align: left;
  margin: 2rem 0;
}

.feature {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.feature i {
  color: var(--success);
}

.feature.premium i {
  color: var(--primary);
}

/* === LOGIN REQUIRED === */
.login-required {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 500px;
  margin: 100px auto;
}

.login-icon {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.login-required h2 {
  color: var(--dark);
  margin-bottom: 15px;
}

.login-required p {
  color: #666;
  margin-bottom: 30px;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

/* === BOTONES DESHABILITADOS === */
.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}

.btn-disabled::after {
  content: "🔒 Inicia sesión primero";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.btn-disabled:hover::after {
  opacity: 1;
}

/* === ANIMACIONES === */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== RESPONSIVE MÓVIL ===== */
@media (max-width: 768px) {
  /* Mostrar menú hamburguesa */
  .menu-toggle {
    display: block;
  }

  /* Ocultar login desktop */
  .user-section-desktop {
    display: none !important;
  }

  /* Mostrar login móvil */
  .user-section-mobile {
    display: block;
    width: 100%;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
  }

  /* Menú desplegable */
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: white;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    transition: left 0.3s ease;
    display: flex !important;
    box-shadow: var(--shadow);
    overflow-y: auto;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  .nav-cta {
    margin: 1rem 0;
    width: 100%;
    text-align: center;
  }

  /* User info en móvil - MÁS GRANDE */
  .user-section-mobile .user-info {
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    width: 100%;
  }

  .user-section-mobile .user-avatar {
    width: 40px;
    height: 40px;
  }

  .user-section-mobile .user-name {
    font-size: 1rem;
  }

  .user-section-mobile .logout-btn {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .user-section-mobile .g_id_signin {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  /* Hero section */
  .hero {
    padding-top: 100px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .pricing-card.premium {
    transform: scale(1);
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .logo {
    font-size: 1.3rem;
  }
  
  .user-section-mobile .logout-btn {
    width: 40px;
    height: 40px;
  }
}