/* style.css - Ethereal Void Theme */

:root {
  --void-bg: #030008;
  --nebula-purple: #4a00e0;
  --nebula-pink: #8e2de2;
  --starlight: #e0f2fe;
  --glass-bg: rgba(20, 10, 40, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #00f2fe;
}

/* Base Body Styles */
body {
  margin: 0;
  padding: 0;
  background-color: var(--void-bg);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(74, 0, 224, 0.2), transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(142, 45, 226, 0.2), transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  perspective: 1000px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--void-bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--nebula-purple), var(--nebula-pink));
  border-radius: 5px;
}

/* Typography & Links */
h1, h2, h3 {
  font-weight: 300;
  letter-spacing: 2px;
  background: linear-gradient(45deg, var(--starlight), var(--nebula-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s infinite alternate;
}

a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

a:hover {
  text-shadow: 0 0 8px var(--accent);
}

abbr {
  border-bottom: 1px dotted var(--nebula-pink);
  text-decoration: none;
  cursor: help;
}

/* Layout Container */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Starry Background Effect using pseudo elements on wrapper */
.page-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 50px 160px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 90px 40px, #fff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 200px 200px;
  z-index: -1;
  opacity: 0.3;
  animation: stars 100s linear infinite;
}

@keyframes stars {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2000px); }
}

@keyframes shimmer {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(30deg); }
}

/* Glassmorphism Sections */
section, .main > div, .sidebar > div > div {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(142, 45, 226, 0.1);
  transform-style: preserve-3d;
  transition: transform 0.5s ease, box-shadow 0.3s ease;
}

section:hover, .main > div:hover {
  transform: translateY(-5px) rotateX(2deg) rotateY(-2deg);
  box-shadow: 0 10px 40px rgba(74, 0, 224, 0.4), inset 0 0 30px rgba(142, 45, 226, 0.2);
}

/* Header & Intro */
header {
  text-align: center;
  padding: 4rem 0;
  position: relative;
}

header h1 {
  font-size: 4rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-shadow: 0 0 20px rgba(142,45,226,0.8);
}

header h2 {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Main Content Area */
.main {
  grid-column: 1 / 2;
}

/* Sidebar Components */
.sidebar {
  grid-column: 2 / 3;
}

@media (max-width: 900px) {
  .sidebar { grid-column: 1 / 2; }
}

.sidebar .wrapper {
  position: sticky;
  top: 2rem;
}

.sidebar h3 {
  font-size: 1.2rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
}

.sidebar a.design-name {
  font-weight: bold;
  font-size: 1.1rem;
}

/* Animations for entries */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.main > div {
  animation: slideUpFade 0.8s ease-out forwards;
  opacity: 0;
}

.explanation { animation-delay: 0.2s; }
.participation { animation-delay: 0.4s; }
.benefits { animation-delay: 0.6s; }
.requirements { animation-delay: 0.8s; }

/* Floating Elements (Extra Divs) */
.extra1, .extra2, .extra3 {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -2;
  pointer-events: none;
  animation: float 20s infinite ease-in-out alternate;
}

.extra1 {
  width: 300px; height: 300px;
  background: var(--nebula-purple);
  top: 10%; left: -100px;
}

.extra2 {
  width: 400px; height: 400px;
  background: var(--nebula-pink);
  bottom: -50px; right: -100px;
  animation-delay: -5s;
}

.extra3 {
  width: 200px; height: 200px;
  background: var(--accent);
  top: 40%; left: 50%;
  animation-delay: -10s;
  opacity: 0.3;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -50px) scale(1.2); }
  100% { transform: translate(-30px, 30px) scale(0.9); }
}

/* Footer styling */
footer {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
  padding: 2rem;
}

footer a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 20px;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

footer a:hover {
  background: var(--accent);
  color: var(--void-bg);
  box-shadow: 0 0 15px var(--accent);
}

/* Fun with Scroll Driven Animations (where supported) */
@supports (animation-timeline: view()) {
  .main > div {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 50%;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: scale(0.8) translateY(100px) rotateX(-20deg);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0) rotateX(0);
    }
  }
}
