/**the nightmare CSS*/

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body {
    background-color: #1a0b2e;
    background-image: 
        radial-gradient(circle at center, rgba(56, 32, 98, 0.3) 0%, rgba(26, 11, 46, 0.3) 100%), 
        url('/stars.gif');
    background-size: cover, 600px; 
    background-repeat: no-repeat, repeat;
    background-attachment: fixed;
    color: #e0d8f0;
    font-family: 'VT323', monospace;
    font-size: 22px;
    margin: 0;
    padding: 0px;
    cursor: url('/knights-glove.png'), auto;
    overflow: hidden !important;
}


html::before {
  content:"";
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  pointer-events:none;
  background:url('https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExdm9uNGZpenF5anJhcHNremp5OGtucWlvcDk2NGE2NjZ3c2ZzZGVkYyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/XuBNdP9Pb7W9i/giphy.webp') repeat;
  opacity:0.06;
  mix-blend-mode:screen;
  z-index: 5;
}

html::after {
  content:"";
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  pointer-events:none;

  background:url('https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/3d6c17cd-68dd-4f5c-a9ef-efd0d0b2c4a2/dg3js33-3bed1924-3440-4bed-b442-d6f255541c90.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7InBhdGgiOiIvZi8zZDZjMTdjZC02OGRkLTRmNWMtYTllZi1lZmQwZDBiMmM0YTIvZGczanMzMy0zYmVkMTkyNC0zNDQwLTRiZWQtYjQ0Mi1kNmYyNTU1NDFjOTAucG5nIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmZpbGUuZG93bmxvYWQiXX0.Lrjahi2Ic5We-s9la-oaMF3G5Cq2wnYZk5v0fKOg8z8') repeat;
  opacity:0.20;
  mix-blend-mode:overlay;

  animation: scanMove 2s linear infinite;

  z-index: 6;
}

@keyframes scanMove {
  0%   { background-position: 0 0; }
  100% { background-position: 0 40px; }
}


.container {
    max-width: 860px;
    margin: 0 auto;
    background: rgba(20, 10, 40, 0.8);
    border: 4px ridge #b142f5;
    padding: 20px;
    box-shadow: 0 0 20px #b142f5, inset 0 0 15px #4a0080;
    position: relative;
    z-index: 10;
    max-height: 90vh; 
    overflow-y: auto; 
    overflow-x: hidden;
}

.container::-webkit-scrollbar {
    width: 16px;
}

.container::-webkit-scrollbar-track {
    background: rgba(20, 10, 40, 0.7);
    border: 2px ridge #b142f5;
    box-shadow:
        inset 0 0 10px #4a0080,
        0 0 6px #b142f5;
}

.container::-webkit-scrollbar-thumb {
    background: #000;
    border: 2px solid #00ffff;
    border-radius: 6px;

    /* Pixel-art runes */
    background-image: url('/runes.svg');
    background-size: 100% auto;
    background-repeat: repeat-y;

    position: relative;
    overflow: visible; /* allows sparks to drift outward */
}

.container::-webkit-scrollbar-thumb:hover {
    border-color: #ff77ff;
}

@keyframes driftSpark {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-10px, -20px) scale(0.2);
    }
}

.container::-webkit-scrollbar-thumb:active::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    pointer-events: none;

    background: radial-gradient(circle, #fff, #7df, transparent);
    box-shadow: 0 0 6px #7df;

    animation: driftSpark 0.6s ease-out forwards;
}



h1, h2, h3 {
    color: #ff77ff;
    text-shadow: 3px 3px #4a0080;
    text-align: center;
    letter-spacing: 2px;
}

a {
    color: #00ffff;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px #00ffff;
    text-decoration: underline dashed;
}

nav {
    text-align: center;
    border-bottom: 2px dashed #b142f5;
    padding-bottom: 10px;
    margin-bottom: 25px;
    background: rgba(177, 66, 245, 0.1);
    padding-top: 10px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 40px;
    padding-right: 40px;
}

nav a {
    margin: 0 15px;
    font-size: 26px;
}

.box {
    border: 2px solid #00ffff;
    padding: 15px;
    margin: 15px 0;
    background: rgba(0, 255, 255, 0.05);
    box-shadow: 4px 4px 0px #4a0080;
    display: block;
}

hr {
    border: 1px dashed #b142f5;
}

.chat-box { 
    height: 250px; 
    overflow-y: scroll; 
    border: 3px inset #b142f5; 
    padding: 10px; 
    background: #050011; 
}

.chat-input { 
    width: 100%; 
    box-sizing: border-box; 
    font-family: 'VT323', monospace; 
    font-size: 20px; 
    background: #111; 
    color: #00ffff; 
    border: 2px solid #b142f5; 
    padding: 5px;
}

button { 
    font-family: 'VT323', monospace; 
    font-size: 20px; 
    background: #b142f5; 
    color: #fff; 
    border: 3px outset #ff77ff; 
    cursor: pointer; 
    padding: 5px 15px;
    text-shadow: 1px 1px #000;
}

button:active { 
    border: 3px inset #ff77ff; 
    background: #8a2be2;
}

.warning-box {
    border: 2px solid #ff0055;
    background: rgba(255, 0, 85, 0.1);
    padding: 10px;
    margin-bottom: 20px;
}

.crt-frame {
    position: relative;
    display: inline-block;
    padding: 5px 5px;
    background: black;
    border: 4px ridge #b142f5;
    box-shadow: 0 0 20px #b142f5;
    overflow: hidden;
    transform: perspective(500px) translateZ(25px);
    border-radius: 8px;
}

.crt-frame::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0px,
        rgba(0,0,0,0) 2px,
        rgba(0,0,0,0.25) 3px,
        rgba(0,0,0,0.25) 4px
    );
    opacity: 0.6;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.crt-frame::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to right,
        rgba(255,0,0,0.12),
        rgba(0,0,255,0.12)
    );
    mix-blend-mode: screen;
    opacity: 0.25;
    pointer-events: none;
}

.crt-frame {
    animation: crtFlicker 0.15s infinite;
}

@keyframes crtFlicker {
    0%   { filter: brightness(1); }
    50%  { filter: brightness(1.12); }
    100% { filter: brightness(1); }
}

.magic-particle {
  position: absolute;
  background: radial-gradient(circle, #ff77ff, #b142f5 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  filter: blur(1px);
  z-index: 9998;
}

.box {
  border: 2px solid #00ffff;
  padding: 15px;
  margin: 15px 0;
  background: rgba(0, 255, 255, 0.05);
  box-shadow: 4px 4px 0px #4a0080;
  animation: boxPulse 4s ease-in-out infinite;
}

@keyframes boxPulse {
  0%   { box-shadow: 0 0 8px #4a0080, inset 0 0 8px #00ffff; }
  50%  { box-shadow: 0 0 18px #b142f5, inset 0 0 12px #ff77ff; }
  100% { box-shadow: 0 0 8px #4a0080, inset 0 0 8px #00ffff; }
}

.art-thumb {
    border: 2px solid #b142f5;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.art-thumb:hover {
    transform: scale(1.05);
}

.art-ref {
  margin: 0 auto;
  filter:
    drop-shadow(0 0 4px #b142f5)
    drop-shadow(0 0 8px #00ffff);
  animation: logoCRT 0.15s infinite;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.art-ref:hover {
    transform: scale(1.05);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9997;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox:target {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid #b142f5;
    box-shadow: 0 0 20px #b142f5;
}

.lightbox-close {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.logo {
  display: block;
  width: 60%;
  margin: 0 auto;

  filter:
    drop-shadow(0 0 4px #b142f5)
    drop-shadow(0 0 8px #00ffff);

  animation: logoCRT 0.15s infinite;
}

@keyframes logoCRT {
  0%   { filter: brightness(1)
           drop-shadow(0 0 4px #b142f5)
           drop-shadow(0 0 8px #00ffff); }

  50%  { filter: brightness(1.12)
           drop-shadow(0 0 6px #b142f5)
           drop-shadow(0 0 10px #00ffff); }

  100% { filter: brightness(1)
           drop-shadow(0 0 4px #b142f5)
           drop-shadow(0 0 8px #00ffff); }
}

.magic-burst {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    z-index: 9999;

    background: radial-gradient(circle, #fff 0%, #aef 40%, #7df 70%, transparent 100%);
    box-shadow: 0 0 6px #7df, 0 0 12px #4cf;

    animation: burst 0.8s ease-out forwards;
}

@keyframes burst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--x), var(--y)) scale(0.2);
    }
}
.portal {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;

    background: radial-gradient(circle, #7df, #00f, #000);
    box-shadow: 0 0 20px #7df, 0 0 60px #00f;

    transform: translate(-50%, -50%) scale(0);

    animation: portalGrow 0.4s ease-out forwards;
}

@keyframes portalGrow {
    to {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
    }
}
.fade-out {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s ease;
}

.synth-container { text-align:center; padding:20px; }


.sitroom-body {
    background-color: #050505;
    color: #00ff41;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.sitroom-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#globeViz {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.terminal-box {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid rgba(0, 255, 65, 0.3);
    padding: 15px;
    pointer-events: auto;
    backdrop-filter: blur(4px);
}

.glow-text {
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.scanline {
    width: 100%;
    height: 100px;
    z-index: 100;
    background: linear-gradient(0deg, rgba(0, 255, 65, 0) 0%, rgba(0, 255, 65, 0.1) 50%, rgba(0, 255, 65, 0) 100%);
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% { bottom: 100%; }
    100% { bottom: -100px; }
}

.sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-cmd {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: #00ff41;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
}

.btn-cmd:hover {
    background: rgba(0, 255, 65, 0.2);
}

.btn-cmd.active {
    background: rgba(0, 255, 65, 0.3);
    border-color: #00ff41;
}

.logs {
    font-size: 10px;
    height: 150px;
    overflow-y: auto;
    opacity: 0.8;
}

.dragon {
  position: fixed;
  left: -150px;
  width: 20%; /* Adjust as needed */
  z-index: 9996;
  pointer-events: none;
  display: none;
  transform: none;
}

@keyframes flyAcross {
  from { left: -150px; }
  to { left: 100%; }
}

@keyframes flutter {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(var(--flutter-intensity)); }
  100% { transform: translateY(0); }
}

@keyframes flyToLeft {
  from { left: 100%; }
  to { left: -150px; }
}

.dragon-left {
  position: fixed;
  left: 100%;
  width: 120px;
  z-index: 9999;
  pointer-events: none;
  display: none;
  transform: none;
}

@keyframes drift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(10px, -20px); }
  50%  { transform: translate(-10px, 10px); }
  75%  { transform: translate(15px, -15px); }
  100% { transform: translate(0, 0); }
}

.magic-particle,
.magic-burst,
.portal {
  position: fixed;
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
}

.blinky-ribbon {
    width: 100%;
    overflow: hidden;
    border: 2px solid #00ffff;
    background: rgba(0, 255, 255, 0.05);
    box-shadow: 0 0 12px #4a0080, inset 0 0 8px #00ffff;
    height: 30px;
    margin: 20px 0;
    position: relative;
    padding: 0;
}

.blinky-ribbon::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 6px #00ffff;
    opacity: 0.4;
}

.blinky-ribbon::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0px,
        rgba(0,0,0,0) 2px,
        rgba(0,0,0,0.25) 3px,
        rgba(0,0,0,0.25) 4px
    );
    opacity: 0.4;
    mix-blend-mode: multiply;
}

.blinky-ribbon .crt-frame {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    animation: none !important;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
}



.blinky-track {
    white-space: nowrap;
    display: inline-block;
    animation: scrollBlinkies 12s linear infinite;
}

.blinky-set {
    display: inline-block;
    white-space: nowrap;
}

.blinky-set img {
    width: 150px;
    height: 20px;
    margin-right: 0;
    display: inline-block;
    vertical-align: middle;
    image-rendering: pixelated;
}



@keyframes scrollBlinkies {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
