/* Anarcho-Solarpunk Terminal Theme for The Multiverse School */
/* Extracted from Next.js redesign - exact colors, animations, and design */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --background: oklch(0.08 0 0);
  --foreground: oklch(0.85 0.15 145);
  --card: oklch(0.1 0 0);
  --card-foreground: oklch(0.85 0.15 145);
  --primary: oklch(0.75 0.2 145);
  --primary-foreground: oklch(0.08 0 0);
  --secondary: oklch(0.15 0 0);
  --muted: oklch(0.2 0 0);
  --muted-foreground: oklch(0.6 0.1 145);
  --accent: oklch(0.7 0.18 180);
  --accent-foreground: oklch(0.08 0 0);
  --border: oklch(0.25 0.05 145);
  
  /* custom punk colors */
  --glitch-1: oklch(0.7 0.18 180); /* teal */
  --glitch-2: oklch(0.75 0.25 330); /* pink */
  --terminal-green: oklch(0.85 0.15 145);
  
  /* Fallbacks for older browsers */
  --background-fallback: rgb(20, 20, 20);
  --foreground-fallback: rgb(158, 206, 106);
  --accent-fallback: rgb(106, 206, 178);
}

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

body {
  background: var(--background, var(--background-fallback));
  color: var(--foreground, var(--foreground-fallback));
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* GLITCH ANIMATIONS - Exact from redesign */
@keyframes glitch {
  0%, 100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100vh);
  }
}

@keyframes flicker {
  0%, 100% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  93% {
    opacity: 0.8;
  }
  94% {
    opacity: 1;
  }
  96% {
    opacity: 0.9;
  }
  97% {
    opacity: 1;
  }
}

@keyframes textShadowGlitch {
  0%, 100% {
    text-shadow: -1px 0 var(--glitch-1), 1px 0 var(--glitch-2);
  }
  25% {
    text-shadow: 2px 0 var(--glitch-1), -2px 0 var(--glitch-2);
  }
  50% {
    text-shadow: -1px 0 var(--glitch-2), 1px 0 var(--glitch-1);
  }
  75% {
    text-shadow: 1px 0 var(--glitch-1), -1px 0 var(--glitch-2);
  }
}

.glitch-text {
  animation: textShadowGlitch 0.3s infinite;
}

.flicker {
  animation: flicker 4s infinite;
}

.scanlines::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, 0.03) 2px,
    rgba(0, 255, 65, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* LAYOUT */
.page-container {
  min-height: 100vh;
  padding: 1rem;
}

.page-content {
  max-width: 56rem;
  margin: 0 auto;
}

/* HEADER */
.page-header {
  margin-bottom: 3rem;
}

.brand-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.brand-title:hover {
  animation: textShadowGlitch 0.3s infinite;
}

.accent-dot {
  color: var(--accent);
}

.brand-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted-foreground);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.header-divider {
  height: 1px;
  background: var(--border);
  opacity: 0.5;
}

/* NAVIGATION */
.nav-container {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--accent);
}

/* SECTION HEADER */
.section-header {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* CLASS LIST */
.class-list {
  margin-bottom: 2rem;
}

.class-item {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.class-item:hover {
  background: rgba(255, 255, 255, 0.05);
  padding-left: 0.5rem;
}

.class-item:hover .class-title {
  animation: textShadowGlitch 0.3s infinite;
}

.class-item-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .class-item-header {
    flex-direction: row;
    align-items: baseline;
    gap: 1rem;
  }
}

.class-title {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--foreground);
}

.status-badge {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.status-live { color: var(--accent); }
.status-enrolling { color: var(--accent); }
.status-soon { color: var(--muted-foreground); }
.status-open { color: var(--primary); }

.class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .class-meta {
    font-size: 1rem;
  }
}

.class-date {
  letter-spacing: 0.05em;
}

.separator {
  opacity: 0.5;
}

.class-audience {
  font-style: italic;
}

/* FOOTER */
.page-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* UTILITY CLASSES */
.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--muted-foreground);
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .page-container {
    padding: 0.5rem;
  }
  
  .page-header {
    margin-bottom: 2rem;
  }
  
  .class-item {
    padding: 0.75rem 0;
  }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  .glitch-text,
  .flicker {
    animation: none;
  }
  
  .scanlines::after {
    display: none;
  }
}

/* Focus states for keyboard navigation */
a:focus,
button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
