/* ==========================================================================
   The Hitchhiker's Guide to Squad Places — Custom Styles
   "In the beginning the Universe was created. This has made a lot of people
   very angry and been widely regarded as a bad move." — Douglas Adams
   ========================================================================== */

:root {
  --guide-deep-space: #0a1628;
  --guide-nebula: #0d2137;
  --guide-teal: #00bfa5;
  --guide-green: #76ff03;
  --guide-gold: #ffd740;
  --guide-starlight: #e0f7fa;
  --guide-glow: rgba(0, 191, 165, 0.4);
}

/* Hero section — in large, friendly letters */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(160deg, var(--guide-deep-space) 0%, var(--guide-nebula) 50%, #0a2a3a 100%);
  color: var(--guide-starlight);
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 191, 165, 0.2);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 20% 90%, rgba(118, 255, 3, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, rgba(0, 191, 165, 0.4), transparent),
    radial-gradient(1px 1px at 15% 50%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 60% 45%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 45% 75%, rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px var(--guide-glow), 0 2px 10px rgba(0, 0, 0, 0.4);
  color: var(--guide-green);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

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

.hero-button {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.hero-button.primary {
  background: var(--guide-teal);
  color: var(--guide-deep-space);
}

.hero-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--guide-glow);
  background: var(--guide-green);
}

.hero-button.secondary {
  background: rgba(0, 191, 165, 0.15);
  color: var(--guide-teal);
  border: 2px solid var(--guide-teal);
}

.hero-button.secondary:hover {
  background: rgba(0, 191, 165, 0.25);
  transform: translateY(-2px);
  color: var(--guide-green);
  border-color: var(--guide-green);
}

/* Features grid — Guide entries */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--md-code-bg-color);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
  border: 1px solid var(--md-default-fg-color--lightest);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 191, 165, 0.15);
  border-color: var(--guide-teal);
}

.feature-card h3 {
  margin-top: 0;
  color: var(--md-accent-fg-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* Quick links — Hyperspace jump points */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.quick-link {
  background: linear-gradient(135deg, var(--guide-deep-space) 0%, var(--guide-nebula) 100%);
  color: var(--guide-teal);
  padding: 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(0, 191, 165, 0.2);
}

.quick-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--guide-glow);
  color: var(--guide-green);
  border-color: var(--guide-teal);
}

/* Code blocks enhancement */
.md-typeset pre > code {
  border-radius: 6px;
}

/* Admonition styling — themed for the Guide */
.md-typeset .admonition {
  border-radius: 6px;
  border-left-width: 4px;
}

/* Custom admonition: Don't Panic (info) */
.md-typeset .admonition.dont-panic,
.md-typeset details.dont-panic {
  border-color: var(--guide-teal);
}
.md-typeset .dont-panic > .admonition-title,
.md-typeset .dont-panic > summary {
  background-color: rgba(0, 191, 165, 0.1);
}
.md-typeset .dont-panic > .admonition-title::before,
.md-typeset .dont-panic > summary::before {
  background-color: var(--guide-teal);
  mask-image: var(--md-admonition-icon--info);
  -webkit-mask-image: var(--md-admonition-icon--info);
}

/* Custom admonition: Mostly Harmless (tip) */
.md-typeset .admonition.mostly-harmless,
.md-typeset details.mostly-harmless {
  border-color: var(--guide-green);
}
.md-typeset .mostly-harmless > .admonition-title,
.md-typeset .mostly-harmless > summary {
  background-color: rgba(118, 255, 3, 0.1);
}
.md-typeset .mostly-harmless > .admonition-title::before,
.md-typeset .mostly-harmless > summary::before {
  background-color: var(--guide-green);
  mask-image: var(--md-admonition-icon--tip);
  -webkit-mask-image: var(--md-admonition-icon--tip);
}

/* Custom admonition: Vogon Alert (warning) */
.md-typeset .admonition.vogon-alert,
.md-typeset details.vogon-alert {
  border-color: var(--guide-gold);
}
.md-typeset .vogon-alert > .admonition-title,
.md-typeset .vogon-alert > summary {
  background-color: rgba(255, 215, 64, 0.1);
}
.md-typeset .vogon-alert > .admonition-title::before,
.md-typeset .vogon-alert > summary::before {
  background-color: var(--guide-gold);
  mask-image: var(--md-admonition-icon--warning);
  -webkit-mask-image: var(--md-admonition-icon--warning);
}

/* Custom admonition: Total Perspective Vortex (danger) */
.md-typeset .admonition.total-perspective-vortex,
.md-typeset details.total-perspective-vortex {
  border-color: #ff1744;
}
.md-typeset .total-perspective-vortex > .admonition-title,
.md-typeset .total-perspective-vortex > summary {
  background-color: rgba(255, 23, 68, 0.1);
}
.md-typeset .total-perspective-vortex > .admonition-title::before,
.md-typeset .total-perspective-vortex > summary::before {
  background-color: #ff1744;
  mask-image: var(--md-admonition-icon--danger);
  -webkit-mask-image: var(--md-admonition-icon--danger);
}

/* Typography — slightly retro-futuristic */
.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.md-typeset h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
}

/* Enhanced spacing */
.md-typeset p {
  line-height: 1.7;
  margin-bottom: 1.2em;
}

/* Navigation tabs — deep space */
.md-tabs {
  background: linear-gradient(135deg, var(--guide-deep-space) 0%, var(--guide-nebula) 100%);
}

/* Footer — the edge of known space */
.md-footer {
  background: linear-gradient(135deg, var(--guide-deep-space) 0%, var(--guide-nebula) 100%);
}

/* Search results */
.md-search-result__meta {
  background: linear-gradient(90deg, var(--guide-deep-space) 0%, var(--guide-nebula) 100%);
}

/* Blockquotes — styled like Guide entries */
.md-typeset blockquote {
  border-left-color: var(--guide-teal);
  font-style: italic;
}

/* Guide entry styling */
.guide-entry {
  background: var(--md-code-bg-color);
  border: 1px solid rgba(0, 191, 165, 0.2);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  position: relative;
}

.guide-entry::before {
  content: "📖 GUIDE ENTRY";
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--guide-teal);
  margin-bottom: 0.75rem;
  opacity: 0.8;
}
