@import url('https://fonts.googleapis.com/css2?family=Comic+Neue&display=swap');

:root {
  --cosmic-blue: hsl(240, 80%, 15%);
  --nebula-purple: hsl(270, 60%, 25%);
  --starlight: hsl(50, 100%, 90%);
  --void-black: hsl(0, 0%, 5%);
  --galactic-pink: hsl(340, 80%, 60%);
  --aurora-cyan: hsl(190, 80%, 70%);
  --meteor-white: hsl(0, 0%, 98%);
  --nebula-glow: hsl(200, 70%, 80%);
  --cosmic-gold: hsl(50, 100%, 75%);
  --deep-space: hsl(220, 60%, 10%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  --scroll-progress: 0;
}

html::before {
  content: '';
  position: fixed;
  top: -100px;
  left: -100px;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 30% 30%, hsla(180, 100%, 60%, 0.1), transparent 40%),
    radial-gradient(circle at 70% 70%, hsla(260, 80%, 70%, 0.15), transparent 40%),
    radial-gradient(circle at 50% 50%, hsla(340, 80%, 60%, 0.1), transparent 50%);
  z-index: -2;
  animation: cosmosDrift 30s ease-in-out infinite alternate;
}

body {
  min-height: 100vh;
  font-family: 'Comic Neue', cursive, sans-serif;
  background: 
    linear-gradient(135deg, var(--cosmic-blue) 0%, var(--nebula-purple) 40%, var(--void-black) 70%),
    linear-gradient(45deg, transparent 45%, hsla(0, 0%, 100%, 0.03) 45%, hsla(0, 0%, 100%, 0.03) 55%, transparent 55%);
  background-size: 400% 400%;
  animation: voidPulse 25s ease-in-out infinite alternate;
  color: var(--meteor-white);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, hsla(190, 80%, 70%, 0.08) 0%, transparent 30%),
    radial-gradient(circle at 80% 20%, hsla(340, 80%, 60%, 0.08) 0%, transparent 30%),
    radial-gradient(ellipse at center, transparent 45%, hsla(270, 60%, 25%, 0.5) 50%, transparent 55%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      hsla(0, 0%, 100%, 0.02) 2px,
      hsla(0, 0%, 100%, 0.02) 4px
    );
  pointer-events: none;
  z-index: 1;
}

@keyframes voidPulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 50% 50%; }
}

@keyframes cosmosDrift {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

.page-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  z-index: 2;
  isolation: isolate;
}

.intro {
  text-align: center;
  margin-bottom: 3rem;
  filter: drop-shadow(0 0 20px hsla(180, 100%, 60%, 0.3));
}

.intro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 4px;
  background: 
    linear-gradient(90deg, transparent, var(--galactic-pink), transparent),
    linear-gradient(90deg, transparent, var(--aurora-cyan), transparent);
  background-size: 200% 100%;
  animation: holoLine 4s ease-in-out infinite;
  box-shadow: 0 0 30px hsla(200, 80%, 70%, 0.5);
}

@keyframes holoLine {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

header h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  background: linear-gradient(45deg, var(--starlight), var(--cosmic-gold), var(--meteor-white));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  text-shadow: 
    0 0 10px hsla(200, 80%, 70%, 0.5),
    0 0 30px hsla(340, 80%, 60%, 0.3),
    0 0 60px hsla(180, 100%, 60%, 0.2);
  letter-spacing: 0.2em;
  animation: titleGlow 6s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--nebula-glow));
  position: relative;
  transition: transform 0.3s ease;
}

header h1:hover {
  transform: scale(1.05) rotate(1deg);
  filter: drop-shadow(0 0 30px var(--nebula-glow)) drop-shadow(0 0 60px var(--galactic-pink));
}

@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 10px var(--nebula-glow)) drop-shadow(0 0 20px var(--galactic-pink)) drop-shadow(0 0 40px var(--starlight)); }
  50% { filter: drop-shadow(0 0 15px var(--aurora-cyan)) drop-shadow(0 0 30px var(--cosmic-gold)) drop-shadow(0 0 50px var(--meteor-white)); }
}

header h2 {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--starlight);
  opacity: 0.8;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-top: 1rem;
}

header h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nebula-glow), transparent);
  box-shadow: 0 0 20px var(--nebula-glow);
}

header abbr {
  position: relative;
  color: var(--cosmic-gold);
}

header abbr::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cosmic-gold);
  box-shadow: 0 0 10px var(--cosmic-gold);
}

#zen-summary, #zen-preamble {
  margin-top: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem;
  background: 
    radial-gradient(ellipse at center, 
      hsla(240, 60%, 20%, 0.6) 0%, 
      hsla(300, 60%, 25%, 0.4) 50%, 
      transparent 70%
    );
  border: 1px solid hsla(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 0 20px hsla(180, 100%, 60%, 0.2),
    inset 0 0 30px hsla(200, 80%, 70%, 0.1),
    0 25px 50px -15px rgba(0, 0, 0, 0.5);
  transform: translateY(0);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  animation: cardFloat 8s ease-in-out infinite alternate;
}

#zen-summary:hover, #zen-preamble:hover {
  transform: translateY(-10px);
  box-shadow: 
    0 0 40px hsla(180, 100%, 60%, 0.4),
    inset 0 0 40px hsla(200, 80%, 70%, 0.2),
    0 35px 60px -20px rgba(0, 0, 0, 0.6);
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0) rotateX(2deg) rotateY(-2deg); }
  50% { transform: translateY(-10px) rotateX(1deg) rotateY(1deg); }
}

#zen-summary p, #zen-preamble p {
  line-height: 1.7;
  font-size: 1.1rem;
  color: var(--meteor-white);
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

#zen-preamble {
  animation: cardFloat 10s ease-in-out infinite alternate 2s;
}

.main {
  width: 100%;
  flex: 1;
}

.supporting {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.explanation, .participation, .benefits, .requirements {
  background: 
    conic-gradient(
      from 0deg at center,
      hsla(180, 100%, 60%, 0.1) 0%,
      hsla(260, 80%, 70%, 0.1) 90°,
      hsla(340, 80%, 60%, 0.1) 180°
    );
  border: 1px solid hsla(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(15px);
  box-shadow: 
    0 0 30px hsla(180, 100%, 60%, 0.3),
    0 0 60px hsla(270, 80%, 70%, 0.1),
    inset 0 0 40px hsla(340, 80%, 60%, 0.1);
  transform: perspective(1000px) rotateX(0deg);
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.7s ease;
  position: relative;
  overflow: hidden;
}

.explanation::before,
.participation::before,
.benefits::before,
.requirements::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent,
    var(--galactic-pink),
    var(--cosmic-gold),
    transparent
  );
  animation: dataLine 4s ease-in-out infinite;
}

@keyframes dataLine {
  0% { background-position: 0% 0%; transform: scaleY(0); opacity: 0; }
  20% { transform: scaleY(1); opacity: 1; }
  100% { background-position: 0% 100%; transform: scaleY(1); opacity: 1; }
}

.explanation:hover,
.participation:hover,
.benefits:hover,
.requirements:hover {
  transform: perspective(1000px) rotateX(-5deg);
  box-shadow: 
    0 0 50px hsla(180, 100%, 60%, 0.5),
    0 0 80px hsla(270, 80%, 70%, 0.2),
    inset 0 0 60px hsla(340, 80%, 60%, 0.2);
}

.explanation h3,
.participation h3,
.benefits h3,
.requirements h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  color: var(--cosmic-gold);
  text-shadow: 0 0 10px var(--cosmic-gold);
}

.explanation h3::after,
.participation h3::after,
.benefits h3::after,
.requirements h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--galactic-pink), var(--aurora-cyan));
  box-shadow: 0 0 15px var(--nebula-glow);
}

.explanation p,
.participation p,
.benefits p,
.requirements p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--meteor-white);
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.explanation p:last-child,
.participation p:last-child,
.benefits p:last-child,
.requirements p:last-child {
  margin-bottom: 0;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid hsla(255, 255, 255, 0.1);
  margin-top: auto;
}

footer a {
  color: var(--meteor-white);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid hsla(255, 255, 255, 0.2);
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

footer a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, hsla(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

footer a:hover::before {
  left: 0;
}

footer a:hover {
  background: linear-gradient(45deg, var(--galactic-pink), var(--aurora-cyan));
  box-shadow: 
    0 0 30px var(--galactic-pink),
    0 0 50px var(--aurora-cyan),
    0 0 70px var(--nebula-glow);
  transform: translateY(-3px);
}

.sidebar {
  position: sticky;
  top: 2rem;
  align-self: flex-start;
  max-width: 300px;
  width: 100%;
}

.sidebar .wrapper {
  background: 
    radial-gradient(ellipse at 30% 30%, hsla(260, 80%, 70%, 0.3) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 70%, hsla(340, 80%, 60%, 0.3) 0%, transparent 40%);
  border: 1px solid hsla(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 
    0 0 40px hsla(180, 100%, 60%, 0.3),
    0 0 80px hsla(270, 80%, 70%, 0.2),
    inset 0 0 60px hsla(340, 80%, 60%, 0.2);
  transform: perspective(1000px) rotateY(0deg);
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.7s ease;
}

.sidebar .wrapper:hover {
  transform: perspective(1000px) rotateY(5deg);
  box-shadow: 
    0 0 60px hsla(180, 100%, 60%, 0.4),
    0 0 100px hsla(270, 80%, 70%, 0.3),
    inset 0 0 80px hsla(340, 80%, 60%, 0.3);
}

.design-selection h3,
.design-archives h3,
.zen-resources h3 {
  font-size: 1.1rem;
  color: var(--cosmic-gold);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  padding-bottom: 1rem;
}

.design-selection h3::after,
.design-archives h3::after,
.zen-resources h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--galactic-pink), var(--aurora-cyan));
  box-shadow: 0 0 15px var(--nebula-glow);
}

.design-selection nav ul,
.design-archives nav ul,
.zen-resources ul {
  list-style: none;
}

.design-name {
  color: var(--starlight);
  text-decoration: none;
  display: block;
  padding: 8px 0;
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
}

.design-name::before {
  content: '→';
  margin-right: 10px;
  color: var(--galactic-pink);
  transition: transform 0.3s ease;
}

.design-name:hover::before {
  transform: translateX(5px);
  color: var(--aurora-cyan);
}

.design-name:hover {
  color: var(--aurora-cyan);
  text-shadow: 0 0 10px var(--aurora-cyan);
}

.designer-name {
  display: block;
  font-size: 0.85rem;
  color: hsla(255, 255, 255, 0.6);
  margin-top: 2px;
}

.designer-name:hover {
  color: var(--cosmic-gold);
}

.archives a,
.resources a,
.select a,
.view-all a {
  color: var(--meteor-white);
  text-decoration: none;
  display: block;
  padding: 6px 0;
  transition: all 0.3s ease;
}

.archives a:hover,
.resources a:hover,
.select a:hover,
.view-all a:hover {
  color: var(--nebula-glow);
}

.participation a,
.requirements a {
  color: var(--aurora-cyan);
}

.participation a:hover,
.requirements a:hover {
  color: var(--cosmic-gold);
}

.indicator {
  margin-left: 5px;
  color: var(--galactic-pink);
}

.extra1, .extra2, .extra3, .extra4, .extra5, .extra6 {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, var(--nebula-glow) 0%, transparent 70%);
  border-radius: 50%;
  animation: starTwinkle 4s ease-in-out infinite;
  box-shadow: 0 0 20px var(--nebula-glow);
  pointer-events: none;
}

.extra1 { top: 10%; left: 5%; animation-delay: 0s; }
.extra2 { top: 20%; right: 10%; animation-delay: 1s; }
.extra3 { bottom: 30%; left: 15%; animation-delay: 2s; }
.extra4 { bottom: 15%; right: 20%; animation-delay: 3s; }
.extra5 { top: 60%; left: 60%; animation-delay: 0.5s; }
.extra6 { bottom: 50%; right: 5%; animation-delay: 1.5s; }

@keyframes starTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

@media (max-width: 768px) {
  .supporting {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
  }
  
  .sidebar {
    position: relative;
    max-width: none;
  }
  
  .sidebar .wrapper {
    padding: 1.5rem;
  }
  
  .intro {
    padding: 0 1rem;
  }
  
  header h1 {
    font-size: 2.5rem;
  }
  
  .explanation,
  .participation,
  .benefits,
  .requirements {
    padding: 1.5rem;
  }
  
  footer {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1rem;
  }
  
  .page-wrapper {
    padding: 1rem;
  }
  
  .sidebar .wrapper {
    padding: 1rem;
  }
}