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

html,body{
  width:100%;height:100%;overflow:hidden;
  background:#060708;
  font-family:'Share Tech Mono',monospace;
}

canvas#dust{position:fixed;inset:0;z-index:0;pointer-events:none}

.scanlines{
  position:fixed;inset:0;z-index:100;pointer-events:none;
  background:repeating-linear-gradient(
    0deg,
    transparent 0px,transparent 2px,
    rgba(0,0,0,0.12) 2px,rgba(0,0,0,0.12) 4px
  );
}

.vignette{
  position:fixed;inset:0;z-index:99;pointer-events:none;
  background:radial-gradient(ellipse 70% 60% at 50% 50%,transparent 50%,rgba(0,0,0,0.85) 100%);
}

.rust-stain{
  position:fixed;border-radius:50%;pointer-events:none;z-index:1;
  filter:blur(60px);mix-blend-mode:screen;
}
.rust-stain.a{width:600px;height:400px;top:-10%;left:-5%;background:rgba(139,60,30,0.18)}
.rust-stain.b{width:500px;height:350px;bottom:-8%;right:-4%;background:rgba(120,45,20,0.14)}
.rust-stain.c{width:300px;height:250px;top:40%;left:60%;background:rgba(180,80,30,0.08)}

.center{
  position:relative;z-index:10;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  width:100%;height:100%;
}

.dial{
  position:relative;
  width:min(520px,85vw);height:min(520px,85vw);
  display:flex;align-items:center;justify-content:center;
}

.dial-ring{
  position:absolute;inset:0;border-radius:50%;
  border:2px solid rgba(180,75,47,0.25);
  box-shadow:0 0 30px rgba(180,75,47,0.08),inset 0 0 30px rgba(180,75,47,0.05);
  animation:ring-pulse 4s ease-in-out infinite;
}
.dial-ring:nth-child(2){inset:30px;border-color:rgba(180,75,47,0.15);animation-delay:0.8s}
.dial-ring:nth-child(3){inset:60px;border-color:rgba(180,75,47,0.10);animation-delay:1.6s}

@keyframes ring-pulse{
  0%,100%{opacity:0.5;transform:scale(1)}
  50%{opacity:1;transform:scale(1.015)}
}

.waves{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.wave{
  position:absolute;
  border:1.5px solid rgba(209,255,69,0.12);
  border-radius:50%;
  animation:wave-expand 5s ease-out infinite;
  opacity:0;
}
.wave:nth-child(1){animation-delay:0s}
.wave:nth-child(2){animation-delay:1.25s}
.wave:nth-child(3){animation-delay:2.5s}
.wave:nth-child(4){animation-delay:3.75s}

@keyframes wave-expand{
  0%{width:80px;height:80px;opacity:0.6}
  100%{width:600px;height:600px;opacity:0}
}

.freq-ticks{
  position:absolute;inset:0;
  animation:rotate-slow 120s linear infinite;
}
.tick{
  position:absolute;
  width:1px;height:12px;
  background:rgba(180,75,47,0.35);
  top:0;left:50%;
  transform-origin:0 calc(min(260px,42.5vw));
}

@keyframes rotate-slow{to{transform:rotate(360deg)}}

.title{
  position:relative;z-index:2;
  font-family:'Orbitron',sans-serif;
  font-weight:900;
  font-size:clamp(1.8rem,5.5vw,4rem);
  letter-spacing:0.35em;
  text-transform:uppercase;
  color:#e8e2d6;
  text-align:center;
  line-height:1.4;
  text-shadow:
    0 0 10px rgba(209,255,69,0.3),
    0 0 40px rgba(209,255,69,0.12),
    0 0 80px rgba(180,75,47,0.15);
  animation:text-flicker 8s ease-in-out infinite;
}

@keyframes text-flicker{
  0%,100%{opacity:1}
  92%{opacity:1}93%{opacity:0.7}94%{opacity:1}96%{opacity:0.85}97%{opacity:1}
}

.freq{
  margin-top:1.2rem;
  font-family:'Share Tech Mono',monospace;
  font-size:clamp(0.65rem,1.8vw,0.95rem);
  letter-spacing:0.6em;
  color:rgba(209,255,69,0.45);
  text-transform:uppercase;
  position:relative;z-index:2;
}

.signal-dot{
  margin-top:2.5rem;
  width:8px;height:8px;border-radius:50%;
  background:rgba(209,255,69,0.9);
  box-shadow:0 0 6px rgba(209,255,69,0.6),0 0 20px rgba(209,255,69,0.3);
  animation:blink 2s steps(1) infinite;
  position:relative;z-index:2;
}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}

.action-bar{
  position:fixed;
  left:50%;
  bottom:48px;
  transform:translateX(-50%);
  z-index:120;
  display:flex;
  align-items:center;
  gap:0.55rem;
  flex-wrap:wrap;
  justify-content:center;
  width:min(94vw,700px);
}

.action-link,
.button,
#toggle-paper{
  appearance:none;
  font-size:clamp(0.62rem,1.5vw,0.78rem);
  font-family:inherit;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:rgba(209,255,69,0.84);
  text-decoration:none;
  border:1px solid rgba(209,255,69,0.28);
  border-radius:999px;
  padding:0.46rem 0.9rem;
  background:rgba(6,7,8,0.72);
  transition:all .2s ease;
  box-shadow:0 0 10px rgba(209,255,69,0.12);
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
}

.action-link:hover,
.button:hover,
#toggle-paper:hover{
  color:rgba(209,255,69,1);
  border-color:rgba(209,255,69,0.6);
  box-shadow:0 0 16px rgba(209,255,69,0.24);
  transform:translateY(-1px);
}

.status{
  position:fixed;bottom:0;left:0;right:0;z-index:50;
  padding:0.6rem 1.2rem;
  display:flex;justify-content:space-between;align-items:center;
  font-size:0.7rem;letter-spacing:0.15em;
  color:rgba(180,75,47,0.45);
  border-top:1px solid rgba(180,75,47,0.1);
  background:rgba(6,7,8,0.8);
}
.status span{white-space:nowrap}

.glitch-line{
  position:fixed;left:0;right:0;height:1px;z-index:90;
  background:rgba(209,255,69,0.12);
  pointer-events:none;
  animation:glitch-slide 12s linear infinite;
  opacity:0;
}
@keyframes glitch-slide{
  0%{top:-2%;opacity:0}2%{opacity:0.6}4%{opacity:0}100%{top:102%;opacity:0}
}
.glitch-line:nth-child(2){animation-delay:4s;background:rgba(180,75,47,0.15)}
.glitch-line:nth-child(3){animation-delay:8s;background:rgba(209,255,69,0.08)}

.corner{position:fixed;z-index:50;width:30px;height:30px;pointer-events:none}
.corner::before,.corner::after{content:'';position:absolute;background:rgba(180,75,47,0.3)}
.corner.tl{top:20px;left:20px}
.corner.tl::before{top:0;left:0;width:30px;height:1px}
.corner.tl::after{top:0;left:0;width:1px;height:30px}
.corner.tr{top:20px;right:20px}
.corner.tr::before{top:0;right:0;width:30px;height:1px}
.corner.tr::after{top:0;right:0;width:1px;height:30px}
.corner.bl{bottom:40px;left:20px}
.corner.bl::before{bottom:0;left:0;width:30px;height:1px}
.corner.bl::after{bottom:0;left:0;width:1px;height:30px}
.corner.br{bottom:40px;right:20px}
.corner.br::before{bottom:0;right:0;width:30px;height:1px}
.corner.br::after{bottom:0;right:0;width:1px;height:30px}

.noise{
  position:fixed;inset:0;z-index:98;pointer-events:none;
  opacity:0.04;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat:repeat;background-size:150px;
}

#canvas-container{
  position:fixed;inset:0;z-index:105;
  opacity:0;
  pointer-events:none;
}

#toggle-paper{
  position:relative;
  z-index:120;
  cursor:pointer;
}

#toggle-paper:active{
  transform:translateY(1px);
}

.winbox.ddd-winbox{
  border-radius:8px 8px 0 0;
  box-shadow:0 10px 28px rgba(0,0,0,0.6),0 0 24px rgba(180,75,47,0.3);
  border:1px solid rgba(180,75,47,0.55);
  backdrop-filter:blur(2px);
}

.winbox.ddd-winbox .wb-header{
  color:#e8e2d6;
  text-shadow:0 0 8px rgba(209,255,69,0.2);
  border-bottom:1px solid rgba(180,75,47,0.45);
  background:
    linear-gradient(90deg, rgba(90,38,21,0.95) 0%, rgba(52,24,14,0.95) 65%, rgba(28,14,10,0.95) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 3px);
}

.winbox.ddd-winbox .wb-title{
  font-family:'Share Tech Mono',monospace;
  letter-spacing:0.08em;
  font-size:12px;
  text-transform:uppercase;
}

.winbox.ddd-winbox .wb-control span{opacity:0.85}
.winbox.ddd-winbox .wb-control span:hover{opacity:1;background-color:rgba(209,255,69,0.12)}

.winbox.ddd-winbox .wb-body{
  margin:2px;
  background:#0d1011;
  border-top:1px solid rgba(209,255,69,0.16);
}

.winbox.ddd-winbox .wb-body iframe{
  filter:saturate(0.9) contrast(1.04);
  background:#0d1011;
}

.winbox.ddd-winbox.focus{
  box-shadow:0 14px 34px rgba(0,0,0,0.72),0 0 30px rgba(209,255,69,0.16),0 0 24px rgba(180,75,47,0.35);
}

.winbox.ddd-winbox:not(.focus){
  border-color:rgba(120,56,34,0.45);
  filter:saturate(0.9);
}

@media (max-width:640px){
  .action-bar{bottom:58px;gap:0.45rem}
  .action-link,.button,#toggle-paper{padding:0.42rem 0.72rem;letter-spacing:0.11em}
}
