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

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #ec489a;
  --text-light: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #1f2937;
  
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
}

body {
  font-family: 'Orbitron', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  position: relative;
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.fade-in {
  opacity: 1;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url(../Fotos/Fondo.jpg) no-repeat center center fixed;
  background-size: cover;
  filter: brightness(0.3);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 100%);
  opacity: 0.6;
  z-index: -1;
}

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

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.side-left, .side-right {
  position: fixed;
  top: 0;
  width: 60px;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
}

.side-left {
  left: 0;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.side-right {
  right: 0;
  background: linear-gradient(270deg, var(--primary), transparent);
}

#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  backdrop-filter: blur(10px);
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-circle {
  width: 80px;
  height: 80px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top: 3px solid var(--primary);
  border-right: 3px solid var(--secondary);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-progress {
  width: 200px;
  height: 2px;
  background: rgba(99, 102, 241, 0.2);
  margin-top: 20px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.loader-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  animation: progress 2s ease forwards;
}

@keyframes progress {
  to { width: 100%; }
}

#loader-text {
  margin-top: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulse 2s ease infinite;
}

.page-container {
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
  padding-top: 100px;
}

.main-container {
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(20px);
  max-width: 1200px;
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all var(--transition-base);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  position: sticky;
  top: -100px;
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-md);
}

.navbar.visible {
  top: 0;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--primary);
}

.logo a {
  font-size: 1.8rem;
  font-weight: 800;
  text-decoration: none;
}

.logo-text {
  color: var(--text-light);
}

.logo-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--text-light);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.user-menu-container {
  position: relative;
  z-index: 1000;
}

.user-button {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: var(--gradient-primary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

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

.user-menu {
  position: absolute;
  right: 0;
  top: 120%;
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  width: 180px;
  overflow: hidden;
  z-index: 1001;
  backdrop-filter: blur(10px);
}

.user-menu.hidden {
  display: none;
}

.user-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.user-menu a:hover {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
}

.logout {
  color: #f87171;
}

.hero {
  position: relative;
  height: 500px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin-bottom: 2.5rem;
  border: solid rgba(99, 102, 241, 0.5);
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.8) 0%, rgba(99, 102, 241, 0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 2rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero-content h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

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

.hero-content p {
  margin-bottom: 2rem;
  font-size: 1.125rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  display: inline-block;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all var(--transition-base);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.section-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  transition: transform var(--transition-base);
}

.section-card:hover .card-icon {
  transform: scale(1.1);
}

.section-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.section-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.comments {
  margin-top: 3rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.comments h3 {
  text-align: left;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
  padding-bottom: 0.8rem;
}

.comment-form {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.comment-input {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.comment-input textarea {
  flex: 1;
  min-height: 40px;
  padding: 0.75rem;
  border: none;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
  background: transparent;
  color: var(--text-light);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
  resize: none;
  outline: none;
}

.comment-input textarea:focus {
  border-color: var(--primary);
}

.comment-input button {
  background: transparent;
  border: none;
  padding: 0.5rem 1.5rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm);
}

.comment-input button:hover {
  color: var(--text-light);
  background: rgba(99, 102, 241, 0.2);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.comments-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary);
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-light);
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
}

.stats-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-item {
  background: rgba(99, 102, 241, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--primary);
  font-size: 0.875rem;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.comments-list::-webkit-scrollbar {
  width: 6px;
}

.comments-list::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-radius: 10px;
}

.comments-list::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.comment {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  animation: fadeInUp 0.3s ease;
}

.comment:last-child {
  border-bottom: none;
}

.comment-body {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-body .author {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
}

.comment-date {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.comment-body .text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 0.3rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  padding: 20px 0;
}

.pagination-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary);
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-info {
  color: var(--text-light);
}

.no-comments,
.loading-comments,
.error-comments {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
  border: 1px dashed rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
}

.error-comments {
  color: #f87171;
  border-color: #f87171;
}

.cart-link-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  background: rgba(99, 102, 241, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.cart-link-nav:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.carrito-contador {
  background: var(--gradient-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  margin-left: 50px;
}

.cart-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-family: 'Orbitron', sans-serif;
  z-index: 10001;
  animation: slideInRight 0.3s ease;
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  transition: all var(--transition-slow);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  opacity: 0.7;
  transform: translateY(20px);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transition: left 0.8s ease;
}

.footer.visible::before {
  left: 100%;
}

.footer.visible {
  opacity: 1;
  transform: translateY(0);
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary);
  animation: glowPulse 3s infinite ease-in-out;
  margin-top: 2rem;
}

.footer-links {
  margin-top: 0.6rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.footer-links a:hover::after {
  width: 100%;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

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

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes glowPulse {
  0% { box-shadow: 0 -4px 20px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 -4px 30px rgba(99, 102, 241, 0.4); }
  100% { box-shadow: 0 -4px 20px rgba(99, 102, 241, 0.2); }
}

#access-check {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.3s ease;
}

.check-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.check-text {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

body.access-allowed #access-check {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .page-container {
    padding-top: 80px;
  }
  
  .main-container {
    padding: 1.5rem;
  }
  
  .hero {
    height: 450px;
  }
  
  .hero-content h2 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 1rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .hero {
    height: 400px;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .section-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .comment-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .comment-input {
    width: 100%;
  }
  
  .comments-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .stats-container {
    justify-content: center;
  }
  
  .footer-links {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 1rem;
  }
  
  .hero {
    height: 350px;
  }
  
  .hero-content h2 {
    font-size: 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
  
  .section-card {
    padding: 1.5rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}