/*
    error-page.css — PYTHOS
    Socratic, Hellenic & Mathematical Error Page Architecture
    Features the Pythos Oracle holding inscribed stone tablets.
*/

:root {
  --athenian-black: #060c18;
  --athenian-navy: #0b1728;
  --athenian-panel: #11233d;
  --athenian-panel-elevated: #182e4e;
  --athenian-border: #22426d;

  --delphic-gold: #e5b84c;
  --delphic-gold-bright: #ffd56b;
  --delphic-gold-glow: rgba(229, 184, 76, 0.45);

  --celestial-azure: #38bdf8;
  --celestial-azure-glow: rgba(56, 189, 248, 0.45);

  --terracotta-red: #e06c4b;
  --terracotta-glow: rgba(224, 108, 75, 0.45);

  --olive-green: #4ade80;
  --olive-green-glow: rgba(74, 222, 128, 0.4);

  --stone-parchment: #f6f3ea;
  --stone-text-muted: #94a3b8;
  --stone-text-dim: #64748b;

  --font-heading: 'Cinzel', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --active-accent: var(--delphic-gold);
  --active-glow: var(--delphic-gold-glow);
}

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

html, body {
  min-height: 100vh;
  background-color: var(--athenian-black);
  color: var(--stone-parchment);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Celestial background starlight */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(1.5px 1.5px at 15% 20%, rgba(255, 255, 255, 0.7) 100%, transparent),
    radial-gradient(2px 2px at 45% 10%, rgba(229, 184, 76, 0.8) 100%, transparent),
    radial-gradient(1px 1px at 80% 30%, rgba(56, 189, 248, 0.8) 100%, transparent),
    radial-gradient(1.5px 1.5px at 70% 80%, rgba(255, 255, 255, 0.6) 100%, transparent),
    radial-gradient(2px 2px at 25% 75%, rgba(229, 184, 76, 0.6) 100%, transparent),
    radial-gradient(800px 500px at 50% 10%, rgba(17, 35, 61, 0.7) 0%, transparent 80%),
    radial-gradient(600px 600px at 50% 90%, rgba(11, 23, 40, 0.9) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Classical Greek Fret / Meander Top Accent Border */
.hellenic-fret-border {
  height: 6px;
  width: 100%;
  background: linear-gradient(90deg, 
    var(--delphic-gold) 0%, 
    var(--celestial-azure) 50%, 
    var(--delphic-gold) 100%
  );
  box-shadow: 0 0 16px var(--active-glow);
  position: relative;
  z-index: 10;
}

.error-viewport {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px;
  max-width: 1240px;
  margin: 0 auto;
}

/* Header */
.error-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 24px 0;
  border-bottom: 1px solid rgba(229, 184, 76, 0.2);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.2s ease;
}

.brand-link:hover {
  transform: translateY(-1px);
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--delphic-gold);
  box-shadow: 0 0 12px var(--delphic-gold-glow);
  object-fit: cover;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--delphic-gold-bright);
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  color: var(--stone-text-muted);
  text-transform: uppercase;
}

.header-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(17, 35, 61, 0.85);
  border: 1px solid var(--athenian-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--delphic-gold-bright);
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--active-accent);
  box-shadow: 0 0 8px var(--active-accent);
  animation: pulse-gem 2s infinite ease-in-out;
}

@keyframes pulse-gem {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Stage Layout */
.stage-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin: 40px 0;
  flex-wrap: wrap;
}

/* Pythos Podium */
.character-podium {
  position: relative;
  flex: 1 1 380px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.character-halo {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--active-glow) 0%, transparent 70%);
  filter: blur(30px);
  z-index: 1;
  pointer-events: none;
}

.character-art-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.character-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.65));
  transition: transform 0.3s ease;
}

.character-img:hover {
  transform: scale(1.02);
}

/* Stone Tablet / Card Board */
.held-tablet-board {
  position: relative;
  flex: 1 1 500px;
  max-width: 580px;
  background: linear-gradient(145deg, #13243d 0%, #0d192c 100%);
  border: 2px solid var(--athenian-border);
  border-top-color: var(--active-accent);
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.6),
    0 0 24px var(--active-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 3;
}

.tablet-marquee-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(229, 184, 76, 0.3);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.tablet-badge {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--active-accent);
}

.tablet-telemetry {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--stone-text-muted);
}

.tablet-telemetry span {
  color: var(--stone-parchment);
  font-weight: 700;
}

/* Error Code Presentation */
.error-code-header {
  margin-bottom: 18px;
}

.error-num-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.error-num {
  font-family: var(--font-heading);
  font-size: 4.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--active-accent);
  text-shadow: 0 0 24px var(--active-glow);
  letter-spacing: -1px;
}

.error-roman {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--stone-text-muted);
  letter-spacing: 2px;
}

.error-label {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  margin-top: 4px;
}

/* Oracle Speech Bubble */
.oracle-speech-bubble {
  position: relative;
  background: rgba(6, 12, 24, 0.75);
  border: 1px solid rgba(229, 184, 76, 0.35);
  border-left: 4px solid var(--active-accent);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 20px 0 28px 0;
}

.oracle-speaker-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--active-accent);
  margin-bottom: 8px;
}

.speech-quote {
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.6;
  color: #e2e8f0;
  font-style: italic;
}

/* Action Buttons */
.tablet-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-pythos-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--delphic-gold) 0%, #c49430 100%);
  color: #060c18;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--delphic-gold-glow);
  transition: all 0.2s ease;
}

.btn-pythos-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--delphic-gold-glow);
  background: linear-gradient(135deg, var(--delphic-gold-bright) 0%, var(--delphic-gold) 100%);
}

.btn-pythos-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(17, 35, 61, 0.85);
  color: var(--stone-parchment);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 1px;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--athenian-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pythos-secondary:hover {
  background: rgba(24, 46, 78, 0.95);
  border-color: var(--delphic-gold);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Footer */
.error-footer {
  border-top: 1px solid rgba(229, 184, 76, 0.2);
  padding: 24px 0 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--stone-text-muted);
}

.footer-nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
}

.footer-nav-links a {
  color: var(--delphic-gold-bright);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .stage-container {
    gap: 24px;
    margin: 20px 0;
  }
  .error-num {
    font-size: 3.6rem;
  }
  .held-tablet-board {
    padding: 24px 20px;
  }
  .error-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .error-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
