@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

html {
  cursor: none !important;
}

html.clicking #magicCursor {
  background-image: url('/knights-click.png');
  transform: scale(0.9);
  filter: hue-rotate(60deg) brightness(1.3) saturate(1.8)
          drop-shadow(0 0 10px #00ffff);
}

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;
    overflow: hidden !important;
    user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  
}

html, body {
  -webkit-user-drag: none;
  user-drag: none;
}

body::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  background-image: url('/stars.gif'), url('/stars.gif');
  visibility: hidden;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
      url('/stars.gif'),
      url('/stars.gif'),
      url('/stars.gif');
  background-repeat: repeat, repeat, repeat;
  background-size: 500px, 900px, 1400px;  
  background-position:
      calc(50% + var(--px, 0px)) calc(50% + var(--py, 0px)),
      calc(50% + var(--px, 0px) * 0.6) calc(50% + var(--py, 0px) * 0.6),
      calc(50% + var(--px, 0px) * 0.3) calc(50% + var(--py, 0px) * 0.3);
  mix-blend-mode: screen;
  opacity: 0.32;
  z-index: 4;
  animation:
      starfieldForward 120s linear infinite,   
      warpPulse 10s ease-in-out infinite;      
}

@keyframes starfieldForward {
  0% {
    background-size: 500px, 900px, 1400px;
    background-position: 50% 50%, 50% 50%, 50% 50%;
  }
  100% {
    background-size: 650px, 1100px, 1650px;
    background-position: 50% 600px, 50% 350px, 50% 180px;   
  }
}

@keyframes warpPulse {
  0%   { filter: brightness(calc(1 + var(--warp-speed, 0)*0.1)) blur(calc(var(--warp-speed, 0)*0.8px)); }
  40%  { filter: brightness(calc(1.1 + var(--warp-speed, 0)*0.1)) blur(calc(0.4px + var(--warp-speed, 0)*0.8px)); }
  60%  { filter: brightness(calc(1.2 + var(--warp-speed, 0)*0.1)) blur(calc(0.8px + var(--warp-speed, 0)*1.2px)); }
  80%  { filter: brightness(calc(1.1 + var(--warp-speed, 0)*0.1)) blur(calc(0.4px + var(--warp-speed, 0)*0.8px)); }
  100% { filter: brightness(calc(1 + var(--warp-speed, 0)*0.1)) blur(calc(var(--warp-speed, 0)*0.8px)); }
}

a:hover { cursor: none; }

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://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExdm9uNGZpenF5anJhcHNremp5OGtucWlvcDk2NGE2NjZ3c2ZzZGVkYyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/XuBNdP9Pb7W9i/giphy.webp') 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; }
}


.custom-scroll-wrapper {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    max-height: 90vh;
}

.container {
    flex: 1 1 auto;
    min-width: 0;
    background: rgba(20, 10, 40, 0.8);
    border: 4px ridge #b142f5;
    border-right: none;
    padding: 20px;
    box-shadow: 0 0 20px #b142f5, inset 0 0 15px #4a0080;
    max-height: 90vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
}
.container::-webkit-scrollbar { display: none; }

.custom-scrollbar-track {
    flex: 0 0 16px;
    width: 16px;
    position: relative;
    background: #000;
    border: 2px ridge #b142f5;
    border-left: none;
    box-shadow: inset 0 0 10px #4a0080, 0 0 6px #b142f5;
    cursor: none;
    z-index: 11;
}


.popup-scrollbar-track {
    position: fixed !important;
    width: 16px;
    background: #000;
    border: none;
    border-left: 2px ridge #b142f5;
    box-shadow: inset 0 0 10px #4a0080, 0 0 6px #b142f5;
    cursor: none;
    z-index: 10001;
    visibility: hidden; 
}

.custom-scrollbar-thumb {
    position: absolute;
    left: 1px;
    right: 1px;
    min-height: 32px;
    background-color: #000;
    border: 2px solid #00ffff;
    border-radius: 6px;
    background-image: url('/runes.svg');
    background-size: 100% auto;
    background-repeat: repeat;
    cursor: none;
    transition: border-color 0.2s ease;
}
.custom-scrollbar-thumb:hover,
.custom-scrollbar-thumb.dragging { border-color: #ff77ff; }

.popup { scrollbar-width: none; }
.popup::-webkit-scrollbar { display: none; }

.custom-hscroll-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

pre.code-block {
    overflow-x: scroll;
    overflow-y: hidden;
    scrollbar-width: none;
}
pre.code-block::-webkit-scrollbar { display: none; }

.custom-scrollbar-htrack {
    display: block;
    height: 12px;
    width: 100%;
    position: relative;
    background: #000;
    border: 2px ridge #b142f5;
    border-top: none;
    box-shadow: inset 0 0 8px #4a0080, 0 0 4px #b142f5;
    cursor: none;
    box-sizing: border-box;
}

.custom-scrollbar-hthumb {
    position: absolute;
    top: 1px;
    bottom: 1px;
    min-width: 32px;
    background-color: #000;
    border: 2px solid #00ffff;
    border-radius: 6px;
    background-image: url('/runes.svg');
    background-size: auto 100%;
    background-repeat: repeat-x;
    cursor: none;
    transition: border-color 0.2s ease;
}
.custom-scrollbar-hthumb:hover,
.custom-scrollbar-hthumb.dragging { border-color: #ff77ff; }


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 {
    overflow-x: visible;
    border: 2px solid #00ffff;
    padding: 15px;
    margin: 15px 0;
    background: rgba(0, 255, 255, 0.05);
    box-shadow: 4px 4px 0px #4a0080;
    display: block;
    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; }
}

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;
    animation: crtFlicker 0.15s infinite;
}

.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;
}

@keyframes crtFlicker {
    0%   { filter: brightness(1); }
    50%  { filter: brightness(1.12); }
    100% { filter: brightness(1); }
}

.magic-particle {
    position: fixed;
    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: 99998;
}

.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: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 99999;
    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: fixed;
    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%;
    z-index: 9996; pointer-events: none; display: none; transform: none;
}

@keyframes flyAcross  { from { left: -150px; } to { left: 100%; } }
@keyframes flyToLeft  { from { left: 100%; }  to { left: -150px; } }
@keyframes flutter {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(var(--flutter-intensity)); }
  100% { transform: translateY(0); }
}
@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); }
}

.dragon-left {
    position: fixed; left: 100%; width: 120px;
    z-index: 9999; pointer-events: none; display: none; transform: none;
}

.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 24s 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%); }
}

.selectable {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    -webkit-user-drag: auto;
    user-drag: auto;
}

pre {
    background-color: rgba(0, 255, 255, 0.05);
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: auto;
    font-size: 16px;
    white-space: pre;
    scrollbar-width: none;
}
pre::-webkit-scrollbar { display: none; }

#magicCursor {
    position: fixed;
    z-index: 2147483646;
    isolation: isolate;
    top: 0; left: 0;
    will-change: left, top, filter;
    width: 32px; height: 32px;
    pointer-events: none;
    mix-blend-mode: normal !important;
    transform: translateZ(9999px);
    background-image: url('/knights-glove.png');
    background-size: contain;
    background-repeat: no-repeat;
    filter: hue-rotate(0deg) brightness(1.05) saturate(1.2)
            drop-shadow(0 0 1px rgba(0,0,0,0.2));
    mix-blend-mode: screen;
    opacity: 0.95;
    animation: magicPulse 3s ease-in-out infinite;
    transition: transform 0.1s ease-out;
}

@keyframes magicPulse {
  0%   { filter: hue-rotate(0deg) brightness(1.05) saturate(1.2); }
  70%  { filter: hue-rotate(0deg) brightness(1.05) saturate(1.2); }
  75%  { filter: hue-rotate(90deg) brightness(1.4) saturate(2.2); }
  80%  { filter: hue-rotate(180deg) brightness(1.5) saturate(2.5); }
  90%  { filter: hue-rotate(45deg) brightness(1.2) saturate(1.4); }
  100% { filter: hue-rotate(0deg) brightness(1.05) saturate(1.2); }
}

.shiny-dragon {
    filter: drop-shadow(0 0 6px gold) drop-shadow(0 0 12px orange) !important;
    animation: shinyPulse 1s ease-in-out infinite !important;
}

@keyframes shinyPulse {
  0%   { filter: drop-shadow(0 0 4px gold); }
  50%  { filter: drop-shadow(0 0 12px gold); }
  100% { filter: drop-shadow(0 0 4px gold); }
}

#dragonKillCounter {
    position: fixed;
    bottom: 20px; right: 20px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #b142f5;
    box-shadow: 0 0 12px #b142f5, inset 0 0 8px #4a0080;
    color: #ff77ff;
    font-family: 'VT323', monospace;
    font-size: 24px;
    z-index: 9999;
    border-radius: 6px;
    text-shadow: 2px 2px #4a0080;
    pointer-events: none;
}

a, a img, img, button, .lightbox img, lightbox, .box a, .selectable a {
    cursor: none !important;
}

body, * { cursor: none !important; }

#context-menu {
    position: fixed;
    top: 0; left: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid #0ff;
    padding: 6px 0;
    width: 180px;
    z-index: 9999;
    font-family: monospace;
    color: #0ff;
    box-shadow: 0 0 12px #0ff;
    backdrop-filter: blur(4px);
    transform-origin: top left;
    animation: menu-pop 120ms ease-out;
}

.hidden { display: none; }

.menu-item { padding: 8px 14px; transition: background 0.15s, color 0.15s; }
.menu-item:hover { background: #0ff; color: #000; cursor: none; }

@keyframes menu-pop {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

html.cursor-hidden #magicCursor { opacity: 0; }

.popup {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20,20,20,0.95);
    padding: 20px;
    border: 2px solid #888;
    border-radius: 10px;
    width: 400px;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
    z-index: 100;
    backdrop-filter: blur(6px);
    pointer-events: auto !important;
    scrollbar-width: none;
}
.popup::-webkit-scrollbar { display: none; }

.popup.visible { display: block; }
.popup, .popup * { cursor: none !important; }

.achievement.unclaimed { animation: glow 2s infinite alternate; }

@keyframes glow {
    from { box-shadow: 0 0 5px gold; }
    to   { box-shadow: 0 0 15px gold; }
}

.achievement.locked { filter: grayscale(100%); opacity: 0.5; }

.shop-item {
    background: #1a1a1a;
    box-shadow: 0 0 12px #b142f5;
    padding: 12px; margin-bottom: 15px;
    border: 1px solid #666; border-radius: 8px;
}
.shop-item h3 { margin: 0 0 5px 0; color: #ffd36b; }
.shop-item .cost { font-weight: bold; margin: 5px 0; color: #9cf; }
.shop-item button {
    background: #333; color: #fff;
    border: 1px solid #888; padding: 6px 12px;
    border-radius: 6px; cursor: none;
}
.shop-item button:hover { background: #444; }

#secretMenu.visible {
    display: block !important;
    background: rgba(0,0,0,0.6);
    padding: 10px;
    border: 2px solid #b142f5;
    border-radius: 6px;
    box-shadow: 0 0 12px #b142f5, inset 0 0 8px #4a0080;
}

.closePopup {
    position: absolute;
    top: 8px; right: 10px;
    background: #b142f5;
    color: white;
    border: 2px solid #ff77ff;
    padding: 2px 8px;
    font-size: 20px;
    cursor: none;
    z-index: 200;
}
.closePopup:hover { background: #d35cff; }

.achievement {
    background: #1a1a1a;
    padding: 12px; margin-bottom: 10px;
    border: 1px solid #666; border-radius: 8px;
    box-shadow: 0 0 12px #4a0080;
    color: #ffd36b;
    cursor: none;
}
.achievement h3 { margin: 0 0 5px 0; color: #ff77ff; }
.achievement.unclaimed { animation: glow 2s infinite alternate; cursor: none; }
.achievement.locked    { filter: grayscale(100%); opacity: 0.5; }

.achievements-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.mythic-dragon {
    filter: drop-shadow(0 0 10px #ff00ff) drop-shadow(0 0 25px #ff00ff);
    animation: mythicPulse 0.6s ease-in-out infinite;
}

@keyframes mythicPulse {
  0%   { filter: drop-shadow(0 0 10px #ff00ff); }
  50%  { filter: drop-shadow(0 0 30px #ff00ff); }
  100% { filter: drop-shadow(0 0 10px #ff00ff); }
}

#prestigeStar {
    position: fixed;
    top: 10px; right: 10px;
    padding: 6px 14px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0%, #ffffff, #ffd36b 40%, #b142f5 100%);
    color: #000;
    font-family: 'VT323', monospace;
    font-size: 22px;
    box-shadow: 0 0 12px #ffd36b, 0 0 24px #b142f5;
    text-shadow: 0 0 6px #fff;
    z-index: 100000;
    cursor: default;
}

#resetConfirmPopup.popup {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(5, 5, 20, 0.95);
    border: 2px solid #ff77ff;
    box-shadow: 0 0 20px #b142f5, 0 0 40px #00ffff;
    padding: 20px 24px;
    max-width: 420px;
    z-index: 100001;
    color: #fff;
    font-family: 'VT323', monospace;
}
#resetConfirmPopup h2 { margin-top: 0; margin-bottom: 10px; font-size: 26px; color: #ffd36b; text-shadow: 0 0 8px #ffd36b; }
#resetConfirmPopup p  { margin-bottom: 16px; font-size: 18px; }
#resetConfirmPopup .reset-buttons { display: flex; gap: 10px; justify-content: flex-end; }
#resetConfirmPopup .reset-buttons button {
    font-family: 'VT323', monospace;
    font-size: 18px; padding: 6px 14px;
    border: 1px solid #ff77ff;
    background: #1a0024; color: #ffddff;
    cursor: pointer;
    box-shadow: 0 0 8px #b142f5;
}
#resetConfirmPopup .reset-buttons button:hover { background: #ff77ff; color: #1a0024; }

.prestige-dragon.prestige-trail::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 120%; height: 120%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.7;
    animation: prestigeTrailPulse 1.4s ease-in-out infinite;
}

.prestige-dragon[data-prestige-index="1"]::after  { box-shadow: 0 0 12px #00ffcc; }
.prestige-dragon[data-prestige-index="2"]::after  { box-shadow: 0 0 14px #7b5cff; }
.prestige-dragon[data-prestige-index="3"]::after  { box-shadow: 0 0 16px #9df2ff; }
.prestige-dragon[data-prestige-index="4"]::after  { box-shadow: 0 0 18px #8b00ff; }
.prestige-dragon[data-prestige-index="5"]::after  { box-shadow: 0 0 20px #ffdf00; }
.prestige-dragon[data-prestige-index="6"]::after  { box-shadow: 0 0 22px #ff6bd5; }
.prestige-dragon[data-prestige-index="7"]::after  { box-shadow: 0 0 24px #00ff7f; }
.prestige-dragon[data-prestige-index="8"]::after  { box-shadow: 0 0 26px #4b9dff; }
.prestige-dragon[data-prestige-index="9"]::after  { box-shadow: 0 0 28px #ff9d4b; }
.prestige-dragon[data-prestige-index="10"]::after {
    box-shadow: 0 0 30px #ffffff;
    background: conic-gradient(from 0deg, red, orange, yellow, green, cyan, blue, magenta, red);
}

@keyframes prestigeTrailPulse {
  0%   { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
  50%  { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
}

.spoiler-box {
    margin: 20px 0; padding: 10px;
    background: rgba(0,0,0,0.6);
    border: 2px solid #b142f5;
    box-shadow: 0 0 12px #b142f5, inset 0 0 8px #4a0080;
    position: relative;
    color: #ffd6ff;
    width: 100%; box-sizing: border-box;
}

.spoiler-summary {
    list-style: none; cursor: none;
    font-size: 22px; color: #ff77ff;
    text-shadow: 0 0 6px #b142f5;
    padding: 4px 0;
}
.spoiler-summary::-webkit-details-marker { display: none; }
.spoiler-summary::before { content: "▶ "; }
.spoiler-box[open] > .spoiler-summary::before { content: "▼ "; }
.spoiler-summary:hover { color: #ffffff; text-shadow: 0 0 10px #ff77ff; }

.spoiler-content-box {
    margin-top: 6px; padding-left: 8px;
    border-left: 2px dashed #b142f5;
    animation: spoilerFadeIn 0.25s ease-out;
}

@keyframes spoilerFadeIn {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.inner-spoiler { margin-top: 10px; box-shadow: 0 0 8px #4a0080, inset 0 0 6px #00ffff; }

pre.code-block {
    position: relative; padding-top: 40px;
    max-width: 100%; width: 100%;
    white-space: pre; box-sizing: border-box;
}

.copy-btn {
    position: absolute; top: 6px; right: 8px;
    font-family: 'VT323', monospace; font-size: 16px;
    padding: 3px 10px;
    background: #1a0024;
    border: 2px solid #ff77ff; color: #ffddff;
    text-shadow: 0 0 6px #ff77ff;
    box-shadow: 0 0 10px #b142f5;
    cursor: none; z-index: 2;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.copy-btn:hover { background: #ff77ff; color: #1a0024; box-shadow: 0 0 14px #ff77ff; }

.warning-flash {
    display: block;
    margin-left: auto; margin-right: auto;
    background: #000;
    padding: 18px 24px; text-align: center;
    width: fit-content; max-width: 90%; box-sizing: border-box;
    border: 3px solid #b142f5;
    transform: perspective(500px) translateZ(25px);
    border-radius: 8px;
    box-shadow: 0 0 20px #b142f5, 0 0 40px #4a0080, inset 0 0 10px #4a0080;
    position: relative; overflow: hidden;
}

.warning-flash span {
    color: #ff0033; font-size: 30px; letter-spacing: 2px;
    text-shadow: 0 0 6px #ff0033, 0 0 12px #ff0033, 0 0 20px #ff0033;
    animation: openSignFlash 1.2s infinite alternate ease-in-out;
}

@keyframes openSignFlash {
  0%   { opacity: 0.4; filter: brightness(0.8); }
  50%  { opacity: 1;   filter: brightness(1.4); }
  100% { opacity: 0.4; filter: brightness(0.8); }
}

.warning-flash::after {
    content: "";
    position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 2px,
        rgba(0,0,0,0.15) 3px, rgba(0,0,0,0.15) 4px
    );
    opacity: 0.35; mix-blend-mode: multiply;
    animation: crtFlickerWarning 0.12s infinite;
}

@keyframes crtFlickerWarning {
  0%   { opacity: 0.3; }
  50%  { opacity: 0.45; }
  100% { opacity: 0.3; }
}

.warning-flash.crt-frame { display: block !important; }

.box pre, .box pre.code-block {
    display: block; width: 100%; max-width: 100%;
    overflow-x: auto; box-sizing: border-box;
}

.crt-counter {
    font-family: 'VT323', monospace; font-size: 2.4rem;
    color: #9ffcff; cursor: none;
    max-width: 70%; margin: 0 auto;
    letter-spacing: 0.18em;
    text-shadow: 0 0 4px #00ffff, 0 0 8px #00ffff, 0 0 14px #4a0080;
    padding: 8px 18px;
    border: 2px solid #00ffff; border-radius: 6px;
    background: rgba(5, 10, 20, 0.75);
    box-shadow: 0 0 14px #00ffff, 0 0 24px #4a0080, inset 0 0 10px rgba(0,255,255,0.25);
    position: relative; overflow: hidden;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, text-shadow 0.18s ease-out;
}

.crt-counter::after {
    content: "";
    position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px,
        rgba(0,0,0,0.18) 2px, rgba(0,0,0,0.18) 3px
    );
    opacity: 0.45; mix-blend-mode: multiply;
}

.crt-counter:hover {
    transform: scale(1.04);
    box-shadow: 0 0 18px #00ffff, 0 0 32px #b142f5, inset 0 0 12px rgba(0,255,255,0.35);
    text-shadow: 0 0 6px #00ffff, 0 0 12px #00ffff, 0 0 20px #b142f5;
}

.crt-counter.finish-flash { animation: locFinishFlash 0.35s ease-out; }

@keyframes locFinishFlash {
  0%  { transform: scale(1.0); box-shadow: 0 0 14px #00ffff, 0 0 24px #4a0080, inset 0 0 10px rgba(0,255,255,0.25); }
  40% { transform: scale(1.08); box-shadow: 0 0 24px #00ffff, 0 0 40px #b142f5, inset 0 0 16px rgba(0,255,255,0.5); }
  100%{ transform: scale(1.0); box-shadow: 0 0 14px #00ffff, 0 0 24px #4a0080, inset 0 0 10px rgba(0,255,255,0.25); }
}

@keyframes gentlePulse {
    0%   { text-shadow: 0 0 6px #ff77ff, 0 0 12px #b142f5; }
    50%  { text-shadow: 0 0 14px #ff77ff, 0 0 22px #b142f5; }
    100% { text-shadow: 0 0 6px #ff77ff, 0 0 12px #b142f5; }
}

.gentle-pulse {
    animation: gentlePulse 3s ease-in-out infinite;
}


@keyframes crtSoftFlicker {
    0%   { opacity: 0.92; }
    50%  { opacity: 1; }
    100% { opacity: 0.92; }
}

.crt-text {
    position: relative;
    display: inline-block;
    animation: crtSoftFlicker 0.8s ease-in-out infinite;
}


.crt-text::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.04) 0px,
        rgba(255,255,255,0.04) 2px,
        rgba(0,0,0,0.15) 3px,
        rgba(0,0,0,0.15) 4px
    );

    opacity: 0.25;
    mix-blend-mode: multiply;
}


.title-bar-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 876px; 
    width: 100%;
    box-sizing: border-box;
}


.title-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    background: linear-gradient(to right, #1a0b2e, #2d0f4a, #1a0b2e);
    border: 2px ridge #b142f5;
    border-bottom: none;
    box-shadow: 0 0 12px #b142f5, inset 0 0 8px #4a0080;
    cursor: none !important;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 11;
}

.title-bar::before {
    content: "◈ ◈ ◈";
    position: absolute;
    left: 10px;
    color: #b142f5;
    font-size: 10px;
    letter-spacing: 4px;
    text-shadow: 0 0 6px #ff77ff;
    opacity: 0.7;
}

.title-bar::after {
    content: "◈ ◈ ◈";
    position: absolute;
    right: 10px;
    color: #b142f5;
    font-size: 10px;
    letter-spacing: 4px;
    text-shadow: 0 0 6px #ff77ff;
    opacity: 0.7;
}

.title-bar-hint {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #ff77ff;
    letter-spacing: 1px;
    text-shadow: 0 0 8px #ff77ff, 0 0 16px #b142f5;
    animation: titleBarHintFlash 1.2s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes titleBarHintFlash {
    0%   { opacity: 0.4; text-shadow: 0 0 6px #ff77ff; }
    100% { opacity: 1;   text-shadow: 0 0 14px #ff77ff, 0 0 24px #b142f5; }
}

.title-bar-shell .custom-scroll-wrapper {
    margin: 0;
    max-width: 100%;
}

.custom-hscroll-wrapper {
    position: relative;
}

.copy-btn-hoisted {
    position: absolute !important;
    top: 6px !important;
    right: 8px !important;
    z-index: 5 !important;
}


#arcane-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #050510; 
  color: #00ffcc; 
  font-family: 'Courier New', Courier, monospace;
  z-index: 999999; 
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease-out;
}


#arcane-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  width: 90%;
  max-width: 500px;
}

.arcane-circle {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 30px auto;
}

.circle {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  box-sizing: border-box;
}

.circle.outer {
  width: 100%;
  height: 100%;
  border: 4px dashed #9d00ff; 
  animation: spin 8s linear infinite;
  box-shadow: 0 0 15px #9d00ff, inset 0 0 15px #9d00ff;
}

.circle.inner {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  border: 4px solid #00ffcc;
  border-style: dotted solid;
  animation: spin-reverse 4s linear infinite;
  box-shadow: 0 0 10px #00ffcc;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }

.terminal {
  text-align: left;
  background: rgba(0, 255, 204, 0.05);
  padding: 20px;
  border: 1px solid #00ffcc;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.2);
  min-height: 140px;
}

#boot-text p {
  margin: 5px 0;
  text-shadow: 0 0 5px #00ffcc;
  font-size: 14px;
}

.cursor {
  animation: blink 1s step-end infinite;
  text-shadow: 0 0 5px #00ffcc;
}

@keyframes blink { 50% { opacity: 0; } }

#arcane-disclaimer {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    color: #0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    font-family: 'Courier New', monospace;
    text-align: center;
}

.disclaimer-content {
    max-width: 50vh;
    max-height: 80vh;
    padding: 20px;
    border: 1px solid #333;
    background: rgba(10, 10, 10, 1);
    overflow: auto;
}


.disclaimer-list {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    line-height: 1.6;
    opacity: 1 !important;
}

#enter-btn {
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

#enter-btn:hover {
    background: #0f0;
    color: #000;
}



/*
body::after {
    will-change: background-size, background-position;

    background-position:
        calc(50% + var(--px, 0px)) calc(50% + var(--py, 0px)),
        calc(50% + var(--px, 0px) * 0.6) calc(50% + var(--py, 0px) * 0.6),
        calc(50% + var(--px, 0px) * 0.3) calc(50% + var(--py, 0px) * 0.3);
}*/


.dragon-active {
    will-change: left, top, transform;
    contain: layout style;      
}

.magic-particle {
    will-change: transform, opacity;
    contain: layout style paint;
}

#comboBarContainer {
    will-change: opacity;
}
#comboBarFill {
    will-change: width;
}


@keyframes crtFlicker {
    0%   { opacity: 0.97; }
    50%  { opacity: 1;    }
    100% { opacity: 0.97; }
}
.crt-frame {
    will-change: opacity;
}


@keyframes crtFlickerWarning {
    0%   { opacity: 0.30; }
    50%  { opacity: 0.45; }
    100% { opacity: 0.30; }
}


.blinky-ribbon {
    contain: layout style paint;
}
.blinky-track {
    will-change: transform;
}


.box {
    will-change: box-shadow;
}

.title-bar-shell {
    will-change: left, top;
}

.popup,
.settings-win {
    will-change: transform, opacity;
}

/*
img.no-theme {
    filter: none !important;
    isolation: isolate;
}

body.theme-dark-magic img.no-theme,
body.theme-holy-magic img.no-theme {
    filter: none !important;
}
*/
/*
@media (prefers-reduced-motion: reduce) {

    body::after,
    body::before {
        animation: none !important;
    }
    .blinky-track {
        animation: none !important;     
    }
    .crt-frame {
        animation: none !important;
    }
    .dragon-active,
    .dragon,
    .dragon-left {
        animation: none !important;
    }
    .magic-particle,
    .magic-burst {
        display: none !important;      
    }
    .gentle-pulse,
    .crt-text {
        animation: none !important;
    }
    .logo {
        animation: none !important;
    }
}
*/

#arcane-autoscroll-orb {
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  display: none;
  background:
    radial-gradient(circle at center,
      rgba(200, 120, 255, 0.95),
      rgba(120, 40, 200, 0.7),
      rgba(40, 10, 80, 0.15)
    );
  box-shadow:
    0 0 28px rgba(190, 120, 255, 0.95),
    0 0 60px rgba(150, 0, 255, 0.7),
    inset 0 0 26px rgba(255, 255, 255, 0.45);
  transform-origin: center;
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

#arcane-autoscroll-orb.orb-spawn {
  transform: scale(1.2);
}

#arcane-autoscroll-orb.orb-idle {
  animation: orbPulse 1.5s infinite ease-in-out;
}

@keyframes orbPulse {
  0%   { transform: scale(1.0); box-shadow: 0 0 24px rgba(190,120,255,0.9); }
  50%  { transform: scale(1.08); box-shadow: 0 0 40px rgba(220,160,255,1); }
  100% { transform: scale(1.0); box-shadow: 0 0 24px rgba(190,120,255,0.9); }
}

#arcane-fog {
  position: fixed;
  width: 160px;
  height: 160px;
  pointer-events: none;
  z-index: 16;
  opacity: 0.25;
  background: radial-gradient(circle,
    rgba(0,0,0,0.45),
    rgba(0,0,0,0.0) 70%
  );
  filter: blur(25px);
  transform-origin: center;
  animation: fogPulse 5s ease-in-out infinite;
  display: none;
}

@keyframes fogPulse {
  0%   { transform: scale(1); opacity: 0.2; }
  50%  { transform: scale(1.25); opacity: 0.35; }
  100% { transform: scale(1); opacity: 0.2; }
}

#arcane-tether {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999998;
  display: none;
}

#arcane-tether path {
  fill: none;
  stroke: rgba(180,255,255,0.4);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 18 10;
  filter:
    drop-shadow(0 0 6px rgba(200, 240, 255, 0.9))
    drop-shadow(0 0 14px rgba(160, 220, 255, 0.9));
}

#arcane-lightning {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999998;
}

#arcane-lightning-path {
  stroke: #b8f3ff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  opacity: 0;
  filter:
    drop-shadow(0 0 6px #b8f3ff)
    drop-shadow(0 0 14px rgba(184,243,255,0.9));
  transition: opacity 0.08s linear;
}

#arcane-shockwave {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999995;
  border: 2px solid rgba(255,200,255,0.9);
  box-shadow:
    0 0 10px rgba(255,200,255,0.9),
    0 0 24px rgba(200,140,255,0.9);
  opacity: 0;
  transform: scale(0.2);
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

#cdr{
  color: #ff77ff;
}

::selection {
    background: transparent !important;
    color: inherit !important;
    text-shadow: 0 0 6px rgba(255,255,255,0.8);
}

.magic-selection-overlay {
    position: absolute;
    pointer-events: none;
    border-radius: 14px;
    opacity: 0.95;

    background:
        radial-gradient(circle at 30% 40%, rgba(255,255,255,0.45), rgba(255,255,255,0) 70%),
        radial-gradient(circle at 70% 60%, rgba(200,150,255,0.35), rgba(0,0,0,0) 80%),
        radial-gradient(circle at 50% 50%, rgba(180,120,255,0.25), rgba(0,0,0,0) 100%);

    filter: blur(10px);
    mix-blend-mode: screen;

    animation:
        fogPulse 2.4s ease-in-out infinite alternate,
        fogDrift 14s linear infinite;
}

@keyframes fogPulse {
    0%   { opacity: 0.65; transform: scale(1); }
    100% { opacity: 1.0; transform: scale(1.12); }
}

@keyframes fogDrift {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

.magic-fog-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(255,255,255,0));
    opacity: 0.8;
    filter: blur(2px);
    mix-blend-mode: screen;
    animation: fogParticleFloat 1.6s ease-out forwards;
}

@keyframes fogParticleFloat {
    0%   { transform: translate(0,0) scale(1);   opacity: 0.8; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.4); opacity: 0; }
}
.taskbar-volume {
    display: flex;
    align-items: center;
    margin-left: 12px;
    position: relative;
}

.taskbar-volume-btn {
    font-size: 18px;
    background: none;
    border: none;
    color: var(--taskbar-fg, #d480ff);
    cursor: pointer;
}

.taskbar-volume-slider {
    position: absolute;
    bottom: 28px;
    right: 0;
    width: 110px;
    transform: rotate(-90deg);
    transform-origin: right bottom;
    background: transparent;
}
#fog-border-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  display: flex;
  justify-content: space-between;
}

.fog-side {
  width: 200px;
  height: 100%;
  position: relative;
  opacity: var(--fog-opacity);
  overflow: hidden;
}

.fog-side::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image: url('/your-fog-texture.png');
  background-size: cover;
  filter: blur(40px);
  opacity: 0.8;
  transform: translateY(0);
  animation: fog-drift 40s ease-in-out infinite alternate;
  mask-image: linear-gradient(
    to var(--fade-direction),
    black 0%,
    black 40%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to var(--fade-direction),
    black 0%,
    black 40%,
    transparent 100%
  );
}

.fog-left { --fade-direction: right; }
.fog-right { --fade-direction: left; }

@keyframes fog-drift {
  0% { transform: translateY(-4%); }
  100% { transform: translateY(4%); }
}


:root {
  --fog-core: rgba(180, 120, 255, 0.55);
  --fog-accent: rgba(90, 200, 255, 0.45);
  --fog-opacity: 0.65;
}
#boot-music-toggle {
    border: 1px solid var(--theme-primary);
    background: rgba(0,0,0,0.4);
    color: var(--theme-secondary);
    text-shadow: 0 0 4px var(--theme-glow1);
}

#boot-music-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--theme-secondary);
}

.warp-layer {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background-image: url('/stars.gif');
  background-repeat: repeat;
  background-size: 512px;
  mix-blend-mode: screen;
  z-index: 4;

  background-position: calc(50% + var(--px, 0px)) calc(50% + var(--py, 0px));

  -webkit-mask-image: radial-gradient(circle, transparent 10%, black 30%, black 70%, transparent 95%);
  mask-image: radial-gradient(circle, transparent 10%, black 30%, black 70%, transparent 95%);

  animation: warpStep var(--warp-duration, 120s) linear infinite;
  will-change: transform, opacity;
}

#warp-1 { animation-delay: 0s; }
#warp-2 { animation-delay: var(--warp-delay-2, -40s); }
#warp-3 { animation-delay: var(--warp-delay-3, -80s); }

@keyframes warpStep {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  20% {
    opacity: calc(0.2 + (var(--warp-speed, 0) * 0.08));
  }
  80% {
    opacity: calc(0.2 + (var(--warp-speed, 0) * 0.08));
  }
  100% {

    transform: scale(1.8); 
    opacity: 0;
    filter: brightness(calc(1 + var(--warp-speed, 0) * 0.4)) 
            blur(calc(var(--warp-speed, 0) * 0.6px));
  }
}

[id$="-link"] {
  position: absolute;
  opacity: 1;
}

.teleport-pet {
  filter: drop-shadow(0 0 1px #b142f5) drop-shadow(0 0 2px #00ffff);
  animation: petCRT 0.15s infinite;
  transform: scale(2);
  transform-origin: top left;
  image-rendering: pixelated;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.teleport-pet:hover { 
  transform: scale(2.05); 
}

@keyframes petCRT {
  0%   { filter: brightness(1) drop-shadow(0 0 1px #b142f5) drop-shadow(0 0 2px #00ffff); }
  50%  { filter: brightness(1.12) drop-shadow(0 0 1px #b142f5) drop-shadow(0 0 3px #00ffff); }
  100% { filter: brightness(1) drop-shadow(0 0 1px #b142f5) drop-shadow(0 0 2px #00ffff); }
}

.button-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: 31px;
    margin: 20px 0;
    position: relative;
    padding: 0;
}

.button-ribbon::before {
    content: "";
    position: absolute; inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 6px #00ffff;
    opacity: 0.4;
}

.button-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;
}

.button-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;
}

.button-track {
    white-space: nowrap;
    display: inline-block;
    animation: scrollButtons 24s linear infinite;
}

.button-set {
    display: inline-block;
    white-space: nowrap;
}

.button-set img {
    height: 31px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    image-rendering: pixelated;
}

@keyframes scrollButtons {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.arcane{
  filter: drop-shadow(0 0 1px #b142f5) drop-shadow(0 0 2px #00ffff);
    transform: scale(2);
    transform-origin: top left;
    image-rendering: pixelated;
    animation: bunnyCRT 0.15s infinite;
}