@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Playfair+Display:wght@400;600;700&family=Source+Sans+Pro:wght@300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  background: linear-gradient(135deg, #0a0f2e 0%, #1a1f4e 25%, #2a2f6e 50%, #1a1f4e 75%, #0a0f2e 100%);
  min-height: 100vh;
  color: #e6f2ff;
  position: relative;
  overflow-x: hidden;
}

/* Fondo de estrellas animadas */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffd700, transparent),
    radial-gradient(2px 2px at 40px 70px, #87ceeb, transparent),
    radial-gradient(1px 1px at 90px 40px, #ffd700, transparent),
    radial-gradient(1px 1px at 130px 80px, #87ceeb, transparent),
    radial-gradient(2px 2px at 160px 30px, #ffd700, transparent),
    radial-gradient(1px 1px at 200px 90px, #87ceeb, transparent),
    radial-gradient(2px 2px at 240px 50px, #ffd700, transparent),
    radial-gradient(1px 1px at 280px 10px, #87ceeb, transparent),
    radial-gradient(1px 1px at 320px 70px, #ffd700, transparent),
    radial-gradient(2px 2px at 360px 40px, #87ceeb, transparent);
  background-repeat: repeat;
  background-size: 400px 200px;
  animation: sparkle 4s ease-in-out infinite alternate;
}

@keyframes sparkle {
  0% { opacity: 0.3; }
  50% { opacity: 0.8; }
  100% { opacity: 0.5; }
}

/* Estrellas fugaces */
body::after {
  content: '';
  position: fixed;
  top: -50px;
  left: -50px;
  width: 2px;
  height: 2px;
  background: linear-gradient(45deg, transparent, #ffd700, transparent);
  box-shadow: 0 0 10px #ffd700;
  animation: shootingStar 8s linear infinite;
  z-index: -1;
}

@keyframes shootingStar {
  0% {
    transform: translateX(-100px) translateY(-100px) rotate(45deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px)) rotate(45deg);
    opacity: 0;
  }
}

/* Segunda estrella fugaz con delay */
.shooting-star-2 {
  position: fixed;
  top: 20%;
  left: -50px;
  width: 1px;
  height: 1px;
  background: linear-gradient(45deg, transparent, #87ceeb, transparent);
  box-shadow: 0 0 8px #87ceeb;
  animation: shootingStar 12s linear infinite 6s;
  z-index: -1;
}

/* Contenedor principal */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 215, 0, 0.2);
  border-right: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: 
    0 0 50px rgba(255, 215, 0, 0.1),
    inset 0 0 50px rgba(15, 23, 42, 0.3);
}

/* Header */
header {
  text-align: center;
  padding: 40px 0;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  margin-bottom: 40px;
  position: relative;
}

header::before {
  content: '✦';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(-50%);
  background: linear-gradient(135deg, #0a0f2e, #1a1f4e);
  padding: 10px 20px;
  color: #ffd700;
  font-size: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.5);
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ffd700, #ffed4a, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-top: 10px;
  letter-spacing: 2px;
  line-height: 1.2;
}

/* Main content */
main {
  flex: 1;
  padding: 20px 0;
}

/* Párrafos generales */
p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #cbd5e1;
  text-align: justify;
  font-weight: 300;
}

/* Párrafo de homepage */
.homepage-description {
  background: rgba(30, 41, 59, 0.6);
  padding: 30px;
  border-radius: 15px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  backdrop-filter: blur(5px);
}

.homepage-description::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(255, 215, 0, 0.3), transparent, rgba(135, 206, 235, 0.3), transparent);
  border-radius: 15px;
  z-index: -1;
  animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Título h2 para certificados */
h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #ffd700;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

/* Imagen del certificado */
.certificate-image {
  text-align: center;
  margin: 40px 0;
}

.certificate-image img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  border: 3px solid #ffd700;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 215, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-image img:hover {
  transform: scale(1.02);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(255, 215, 0, 0.5);
}

/* Warning para certificados inexistentes */
.warning {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.3));
  border: 2px solid rgba(220, 38, 38, 0.5);
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
  text-align: center;
  font-size: 1.2rem;
  color: #fecaca;
  backdrop-filter: blur(5px);
  box-shadow: 
    0 8px 25px rgba(220, 38, 38, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.warning::before {
  content: '⚠';
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
  color: #ffd700;
}

/* Código dentro del warning */
.warning code {
  background: rgba(15, 23, 42, 0.8);
  color: #ffd700;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-weight: 600;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Efectos responsive */
@media (max-width: 768px) {
  .container {
    margin: 0 10px;
    padding: 15px;
  }
  
  h1 {
    font-size: 2.2rem;
    letter-spacing: 1px;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .homepage-description {
    padding: 20px;
  }
  
  p {
    font-size: 1rem;
    text-align: left;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .homepage-description {
    padding: 15px;
  }
}