/* oracle.css - The Glorious 90s CSS Styling for the Y2K Oracle */

/* Variables - Maximum Y2K Overload Colors */
:root {
  --navy: #000033;
  --magenta: #FF00FF;
  --cyan: #00FFFF;
  --lime: #00FF00;
  --yellow: #FFFF00;
  --base-font-size: 16px;
  --body-line-height: 1.45;
  --bg-pattern: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%23ff00ff" stroke-width="1" stroke-opacity="0.3"/><circle cx="40" cy="40" r="1" fill="%2300FFFF"/></pattern></defs><rect width="40" height="40" fill="url(%23grid)"/></svg>');
}

/* Base Body and Layout */
body {
  background-color: var(--navy);
  background-image: var(--bg-pattern);
  background-repeat: repeat;
  color: var(--lime);
  font-family: 'Courier New', Courier, monospace;
  font-size: var(--base-font-size);
  line-height: var(--body-line-height);
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* CRT Scanline Filter */
.crt-scanlines {
  filter: contrast(120%) brightness(110%);
}

.crt-scanlines::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 9999;
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  opacity: 0.4;
  animation: crtFlicker 0.15s infinite;
}

/* Typography & Neon Glows */
h1,
h2,
h3,
h4,
.oracle-title {
  font-family: Impact, Charcoal, sans-serif;
  letter-spacing: 2px;
  line-height: 1.1;
}

.small-text {
  font-size: 0.9rem;
  line-height: 1.45;
  letter-spacing: 0.2px;
}

.neon-text {
  text-shadow: 0 0 10px var(--magenta);
}

.neon-text.cyan {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan), 0 0 20px var(--cyan);
}

.neon-text.yellow {
  color: var(--yellow);
  text-shadow: 2px 2px 0px #ff0000, 0 0 10px var(--yellow);
}

.lime-green {
  color: var(--lime);
  text-shadow: 0 0 4px var(--lime);
}

/* Glitch Animation for Titles */
.glitch-text {
  position: relative;
  color: var(--yellow);
  font-size: 4rem;
  text-transform: uppercase;
  animation: glitch-anim 2s infinite linear alternate-reverse;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  left: 3px;
  text-shadow: -2px 0 red;
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -3px;
  text-shadow: -2px 0 cyan;
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim-3 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% {
    clip: rect(10px, 9999px, 44px, 0);
  }

  20% {
    clip: rect(65px, 9999px, 89px, 0);
  }

  40% {
    clip: rect(32px, 9999px, 54px, 0);
  }

  60% {
    clip: rect(78px, 9999px, 95px, 0);
  }

  80% {
    clip: rect(12px, 9999px, 23px, 0);
  }

  100% {
    clip: rect(89px, 9999px, 105px, 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip: rect(65px, 9999px, 100px, 0);
  }

  20% {
    clip: rect(12px, 9999px, 34px, 0);
  }

  40% {
    clip: rect(89px, 9999px, 110px, 0);
  }

  60% {
    clip: rect(23px, 9999px, 56px, 0);
  }

  80% {
    clip: rect(45px, 9999px, 88px, 0);
  }

  100% {
    clip: rect(15px, 9999px, 43px, 0);
  }
}

@keyframes glitch-anim-3 {
  0% {
    clip: rect(45px, 9999px, 78px, 0);
  }

  20% {
    clip: rect(88px, 9999px, 120px, 0);
  }

  40% {
    clip: rect(23px, 9999px, 67px, 0);
  }

  60% {
    clip: rect(12px, 9999px, 45px, 0);
  }

  80% {
    clip: rect(90px, 9999px, 140px, 0);
  }

  100% {
    clip: rect(34px, 9999px, 55px, 0);
  }
}

@keyframes crtFlicker {
  0% {
    opacity: 0.35;
  }

  50% {
    opacity: 0.45;
  }

  100% {
    opacity: 0.35;
  }
}

/* Links */
a {
  color: #5555ff;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  color: var(--magenta);
  text-decoration: underline;
  cursor: pointer;
}

.blinking-underline:hover {
  animation: blink 0.5s step-end infinite;
}

@keyframes blink {
  50% {
    text-decoration-color: transparent;
  }
}

/* Tables and Boxes */
.angelfire-table {
  border: 3px solid var(--magenta);
  background: rgba(0, 0, 50, 0.8);
  box-shadow: 0 0 15px var(--magenta) inset;
}

.angelfire-table td {
  border: 1px solid var(--cyan);
}

.angelfire-box {
  border: 2px dashed var(--magenta);
  padding: 15px;
  background: black;
  box-shadow: 4px 4px 0px var(--cyan);
  margin-bottom: 20px;
}

.angelfire-table-wrapper {
  background: rgba(0, 0, 50, 0.9);
  border: 4px ridge var(--cyan);
  box-shadow: 0 0 20px var(--cyan);
}

/* Marquees */
.marquee-90s {
  background: var(--magenta);
  color: var(--yellow);
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-weight: bold;
  padding: 5px;
  border: 2px solid white;
}

.footer-marquee {
  background: #000033;
  /* Deep navy to match body */
  color: #FFFF00;
  /* Bright yellow — high contrast on navy */
  border: 3px double #00FFFF;
  /* Cyan border for pop */
  padding: 3px;
  text-shadow: 0 0 8px #FFFF00;
  /* Keep the glow */
}

/* Oracle Text Area and Buttons */
.angelfire-textarea {
  width: 100%;
  background: black;
  color: var(--lime);
  border: 3px dotted var(--cyan);
  padding: 10px;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: bold;
  resize: vertical;
}

.angelfire-textarea:focus {
  outline: none;
  box-shadow: 0 0 15px var(--cyan);
}

.summon-prophecy {
  background: url('https://media.giphy.com/media/l41lPqwN3iIQD42ow/giphy.gif') center center;
  background-size: cover;
  border: 4px outset var(--magenta);
  color: white;
  font-family: Impact;
  font-size: 1.8rem;
  padding: 15px 30px;
  cursor: pointer;
  text-shadow: 2px 2px 0 solid black;
  box-shadow: 0 0 10px var(--magenta);
  transition: transform 0.1s;
}

.summon-prophecy .btn-text {
  background: rgba(0, 0, 0, 0.6);
  padding: 5px;
  display: inline-block;
  border-radius: 5px;
}

.summon-prophecy:hover {
  transform: scale(1.05);
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan), 0 0 10px white;
}

.summon-prophecy:active {
  transform: scale(0.95);
  border-style: inset;
}

.glitch-flash:active {
  animation: flashglitch 0.2s 2 alternate;
}

@keyframes flashglitch {
  0% {
    filter: invert(0%);
  }

  100% {
    filter: invert(100%) hue-rotate(90deg);
  }
}

/* Prophecy Response */
.prophecy-area {
  min-height: 150px;
}

.scroll-box {
  border: 3px double var(--yellow);
  background: #001100;
  padding: 20px;
}

.typewriter-text {
  font-size: 1.4rem;
  font-weight: bold;
  text-shadow: 0 0 5px var(--lime);
}

.typewriter-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2rem;
  background: var(--lime);
  animation: cursorBlink 0.5s step-end infinite;
  vertical-align: bottom;
  margin-left: 2px;
}

@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

/* Small Button and Toast */
.angelfire-btn {
  background: var(--navy);
  color: var(--cyan);
  border: 2px outset var(--cyan);
  padding: 5px 10px;
  font-family: inherit;
  cursor: pointer;
  font-weight: bold;
}

.angelfire-btn:active {
  border-style: inset;
}

.toast-90s {
  background: var(--magenta);
  color: white;
  padding: 5px;
  border: 1px solid yellow;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Hit Counter */
.counter-box {
  background: black;
  color: red;
  border: 2px inset gray;
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  display: inline-block;
  padding: 5px 15px;
  letter-spacing: 5px;
}

/* Canvas for random sparkles */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5000;
}

.music-credit {
  margin: 0;
  padding: 0 16px 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--lime);
  text-shadow: 0 0 4px var(--lime);
}

.music-credit a {
  color: var(--cyan);
}

.music-credit a:hover {
  color: var(--yellow);
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {

  body {
    font-size: clamp(15px, 3.7vw, 16px);
    line-height: 1.5;
    overflow-x: hidden;
  }

  .main-content {
    margin-top: 14px !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  .top-nav,
  .top-nav tbody,
  .top-nav tr {
    display: block;
    width: 100%;
  }

  .top-nav td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid var(--cyan) !important;
    padding: 10px 5px !important;
  }

  .top-nav td:last-child {
    border-bottom: none !important;
  }

  .top-nav .nav-link {
    display: block;
    font-size: 0.92rem;
    letter-spacing: 0.35px;
    line-height: 1.35;
    padding: 2px 0;
  }

  .header-area {
    margin-bottom: 12px !important;
  }

  .oracle-title {
    font-size: clamp(2rem, 8.6vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: 0.8px;
    word-break: break-word;
  }

  .spinning-8ball {
    width: 30px;
    height: 30px;
    vertical-align: middle;
  }

  .marquee-90s {
    font-size: 0.82rem;
    line-height: 1.35;
    padding: 7px 6px;
  }

  .angelfire-table-wrapper {
    margin: 0;
    border-width: 3px;
  }

  .sidebar-left,
  .center-pane,
  .sidebar-right {
    padding: 10px !important;
  }

  .sidebar-left {
    order: 2;
  }

  .center-pane {
    order: 1;
  }

  .sidebar-right {
    order: 3;
  }

  h2 {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
    letter-spacing: 0.9px;
  }

  h3,
  h4 {
    font-size: clamp(1.02rem, 4.8vw, 1.25rem);
    letter-spacing: 0.6px;
  }

  .angelfire-textarea {
    font-size: 0.98rem;
    line-height: 1.45;
    letter-spacing: 0.15px;
    min-height: 110px;
  }

  .typewriter-text {
    font-size: clamp(1rem, 4.8vw, 1.15rem);
    line-height: 1.5;
  }

  .scroll-box {
    padding: 14px;
  }

  .hit-counter .counter-box {
    font-size: 1.2rem;
    letter-spacing: 2px;
    padding: 6px 10px;
  }

  .summon-prophecy {
    font-size: clamp(0.98rem, 4.6vw, 1.15rem);
    padding: 10px 12px;
    width: 100%;
    max-width: 320px;
  }

  .music-player audio {
    width: 100%;
    height: 34px;
  }

  .angelfire-box {
    padding: 10px;
    margin-bottom: 14px;
  }

  .footer-marquee {
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 8px 6px;
  }

  .music-credit {
    padding: 0 12px 16px;
    font-size: 0.8rem;
    line-height: 1.4;
  }
}

/* Modern iPhone and Pixel widths cluster around 390px to 430px */
@media screen and (min-width: 390px) and (max-width: 430px) {
  .main-content {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .top-nav td {
    padding: 12px 8px !important;
  }

  .oracle-title {
    font-size: 2.2rem;
  }

  .summon-prophecy {
    max-width: 360px;
  }
}

@media screen and (max-width: 480px) {
  .oracle-title {
    font-size: 1.9rem;
  }

  .marquee-90s {
    font-size: 0.75rem;
  }

  .summon-prophecy {
    font-size: 0.95rem;
  }

  .angelfire-textarea {
    min-height: 100px;
  }

  .small-text {
    font-size: 0.82rem;
  }

  .counter-box {
    max-width: 100%;
    font-size: 1rem;
    letter-spacing: 1px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .music-credit {
    font-size: 0.76rem;
    padding-bottom: 14px;
  }
}