:root{
  --bg:#050505;
  --fg:#f2f2f2;
  --muted:#9a9a9a;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family: Helvetica, Arial, sans-serif;
  overflow:hidden;
}
body::before{
  content:"";
  position:fixed;
  inset:-30%;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  opacity:0.07;
}
.wrap{position:relative;width:100%;height:100%;}

.monolith{
  position:absolute;
  right:-10%;
  top:50%;
  transform:translateY(-50%);
  height:85vh;
  max-height:1200px;
  opacity:0.9;
  cursor:default;
}
.monolith img{
  height:100%;
  width:auto;
  display:block;
  user-select:none;
  -webkit-user-drag:none;
  image-rendering:auto;
  -ms-interpolation-mode:bicubic;
}
/* Rare visual anomaly */
.anomaly .monolith{
  opacity:0.78;
  filter:contrast(1.08) brightness(0.92);
}
.anomaly .title{
  opacity:0.84;
  letter-spacing:0.12em;
}

.title{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  font-size:clamp(64px, 12vw, 180px);
  font-weight:900;
  letter-spacing:0.08em;
}

.status{
  position:absolute;
  bottom:28px;
  left:28px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:13px;
  color:var(--muted);
  line-height:1.5;
}

.signal{
  position:absolute;
  bottom:28px;
  right:56px;
  width:min(420px, calc(100% - 120px));
  padding:14px 16px;
  border:1px solid rgba(242,242,242,0.08);
  background:rgba(255,255,255,0.02);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:13px;
  line-height:1.45;
  color:rgba(242,242,242,0.88);
  opacity:0;
  transform:translateY(6px);
  transition:opacity 900ms ease, transform 900ms ease;
}
.signal.show{opacity:0.86;transform:translateY(0)}
.signal .label{
  display:block;
  font-size:11px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:rgba(154,154,154,0.8);
  margin-bottom:10px;
}
.signal .meta{
  margin-top:10px;
  font-size:11px;
  color:rgba(154,154,154,0.75);
  display:flex;
  justify-content:space-between;
  gap:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.xlink{
  position:absolute;
  bottom:30px;
  right:24px;
  width:18px;
  height:18px;
  opacity:0.22;
  transition:opacity 220ms ease;
}
.xlink:hover{opacity:0.55}
.xlink img{width:100%;height:100%}

@media (max-width:640px){
  .monolith{right:-30%;height:80vh}
  .title{letter-spacing:0.05em}
  .status{bottom:auto;top:28px}
  .signal{right:48px;bottom:64px;width:min(420px, calc(100% - 96px))}
}

/* ========== INTERACTIVE FEATURES STYLES ========== */

/* 1. Cursor Trail */
.cursor-particle{
  position:fixed;
  width:4px;
  height:4px;
  background:rgba(242,242,242,0.3);
  border-radius:50%;
  pointer-events:none;
  z-index:9999;
  animation:cursorFade 1s ease-out forwards;
}
@keyframes cursorFade{
  0%{opacity:1;transform:scale(1)}
  100%{opacity:0;transform:scale(0)}
}

/* 2. Background Particles */
.bg-particle{
  position:fixed;
  width:2px;
  height:2px;
  background:rgba(242,242,242,0.15);
  border-radius:50%;
  pointer-events:none;
  z-index:1;
  animation:particleFloat 3s ease-out forwards;
}
@keyframes particleFloat{
  0%{opacity:0;transform:translateY(0)}
  50%{opacity:1}
  100%{opacity:0;transform:translateY(-100px)}
}

/* 3. Scan Line Effect */
.scan-line{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:2px;
  background:linear-gradient(to bottom, transparent, rgba(242,242,242,0.3), transparent);
  pointer-events:none;
  z-index:9998;
  animation:scanDown 2s ease-out forwards;
}
@keyframes scanDown{
  0%{top:0;opacity:1}
  100%{top:100%;opacity:0}
}

/* 4. Title Glitch Effect */
.title.glitch{
  animation:glitch 0.2s;
}
@keyframes glitch{
  0%,100%{transform:translate(-50%,-50%)}
  20%{transform:translate(calc(-50% + 2px),calc(-50% - 2px))}
  40%{transform:translate(calc(-50% - 2px),calc(-50% + 2px))}
  60%{transform:translate(calc(-50% + 2px),calc(-50% + 2px))}
  80%{transform:translate(calc(-50% - 2px),calc(-50% - 2px))}
}

/* 5. Title Glow Animation */
.title{
  animation:titleGlow 4s ease-in-out infinite;
}
@keyframes titleGlow{
  0%,100%{text-shadow:0 0 10px rgba(242,242,242,0.1)}
  50%{text-shadow:0 0 20px rgba(242,242,242,0.2)}
}

/* 6. Monolith Breathing */
.monolith{
  animation:breathing 6s ease-in-out infinite;
}
@keyframes breathing{
  0%,100%{transform:translateY(-50%) scale(1)}
  50%{transform:translateY(-50%) scale(1.01)}
}

/* 7. Konami Code Activation */
.konami-activated{
  animation:konamiPulse 0.5s;
}
@keyframes konamiPulse{
  0%,100%{filter:brightness(1)}
  50%{filter:brightness(1.2) hue-rotate(90deg)}
}

/* 8. Combo Click Activation */
.combo-activated{
  animation:comboFlash 0.3s;
}
@keyframes comboFlash{
  0%,100%{filter:contrast(1)}
  50%{filter:contrast(1.3)}
}

/* 9. Time-based Modes */
.night-mode .monolith{opacity:0.7}
.evening-mode .monolith{opacity:0.85}

/* 10. Signal Strength Indicators */
.signal[data-signal-strength="strong"]{
  border-color:rgba(242,242,242,0.2);
  box-shadow:0 0 10px rgba(242,242,242,0.1);
}
.signal[data-signal-strength="moderate"]{
  border-color:rgba(242,242,242,0.12);
}
.signal[data-signal-strength="weak"]{
  border-color:rgba(242,242,242,0.06);
  opacity:0.7;
}

/* 11. Tweet Expand */
.signal.expanded{
  width:min(600px, calc(100% - 120px));
  max-height:80vh;
  overflow-y:auto;
}
.signal.expanded #signalText{
  white-space:pre-wrap;
  word-wrap:break-word;
}

/* 12. Debug Mode */
.debug-mode *{
  outline:1px solid rgba(255,0,0,0.1);
}
.debug-mode::after{
  content:"DEBUG MODE";
  position:fixed;
  top:10px;
  right:10px;
  font-size:10px;
  color:rgba(255,0,0,0.5);
  z-index:10000;
  font-family:ui-monospace;
}

/* 13. Ambient Night Mode */
.ambient-night{
  filter:brightness(0.95) contrast(1.05);
}

/* 14. Smooth Transitions */
.monolith, .title, .status, .signal{
  transition:opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

/* 15. Status Typing Effect */
.status{
  transition:opacity 0.3s ease;
}

/* 16. Pattern Visualization */
body[data-pattern-count]::before{
  opacity:calc(0.07 + var(--pattern-count, 0) * 0.001);
}

/* 17. Parallax Scroll Support */
@media (prefers-reduced-motion: no-preference){
  .monolith{
    will-change:transform;
  }
}
