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

body {
  background: #0a0a12;
  color: #c0c0d4;
  font-family: 'Courier New', Courier, monospace;
  display: flex;
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

#sidebar {
  width: 210px;
  min-width: 210px;
  background: #0e0e1c;
  border-right: 1px solid #1e1e38;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#logo {
  padding: 0.9rem 0.8rem 0.8rem;
  border-bottom: 1px solid #1e1e38;
  text-align: center;
}

.logo-after {
  font-size: 1.25rem;
  font-weight: bold;
  letter-spacing: 0.4rem;
  color: #44ddff;
  text-shadow: 0 0 12px rgba(0,220,255,0.7), 0 0 24px rgba(0,220,255,0.3);
  animation: afterPulse 2.4s ease-in-out infinite;
}

.logo-dork {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 0.12rem;
  color: #ff0066;
  text-shadow: 0 0 16px rgba(255,0,100,0.8), 0 0 32px rgba(255,0,100,0.4);
  line-height: 1.05;
  animation: dorkCycle 5s ease-in-out infinite;
}

.logo-sub {
  font-size: 0.58rem;
  color: #44445a;
  margin-top: 0.25rem;
  letter-spacing: 0.06rem;
}

#module-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

#module-list::-webkit-scrollbar { width: 4px; }
#module-list::-webkit-scrollbar-track { background: transparent; }
#module-list::-webkit-scrollbar-thumb { background: #2a2a4a; border-radius: 2px; }

.module-btn {
  background: #13132a;
  border: 1px solid #202040;
  color: #7878a0;
  padding: 0.42rem 0.6rem;
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  text-align: left;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.module-btn:hover {
  background: #1c1c3c;
  color: #ccccee;
  border-color: #4040aa;
}

.module-btn.active {
  background: #0d0d2a;
  color: #44ddff;
  border-color: #00aaff;
  animation: activePulse 1.8s ease-in-out infinite;
}

.mod-name {
  font-weight: bold;
  font-size: 0.8rem;
}

.mod-desc {
  font-size: 0.66rem;
  color: #44445a;
  font-style: italic;
}

.module-btn.active .mod-desc { color: #226688; }

#credits {
  padding: 0.55rem 0.75rem;
  border-top: 1px solid #1a1a30;
  font-size: 0.57rem;
  color: #2e2e44;
  text-align: center;
  line-height: 1.65;
}

#screen-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #07070e;
  border-left: 1px solid rgba(0, 180, 255, 0.1);
}

#screen {
  display: block;
  width: 100%;
  height: 100%;
}

/* CRT vignette */
#screen-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 46%, transparent 30%, rgba(0,0,12,0.72) 100%);
  pointer-events: none;
  z-index: 1;
}

/* CRT scanlines */
#screen-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.07) 2px,
    rgba(0,0,0,0.07) 3px
  );
  pointer-events: none;
  z-index: 2;
}

/* Animations */

@keyframes afterPulse {
  0%, 100% { text-shadow: 0 0 12px rgba(0,220,255,0.7), 0 0 24px rgba(0,220,255,0.3); }
  50%       { text-shadow: 0 0 22px rgba(0,220,255,1),   0 0 44px rgba(0,220,255,0.55), 0 0 70px rgba(0,220,255,0.15); }
}

@keyframes dorkCycle {
  0%   { color: #ff0066; text-shadow: 0 0 18px rgba(255,0,102,0.9),  0 0 36px rgba(255,0,102,0.45); }
  25%  { color: #ff5500; text-shadow: 0 0 18px rgba(255,85,0,0.9),   0 0 36px rgba(255,85,0,0.45);  }
  50%  { color: #cc00ff; text-shadow: 0 0 18px rgba(204,0,255,0.9),  0 0 36px rgba(204,0,255,0.45); }
  75%  { color: #ff00aa; text-shadow: 0 0 18px rgba(255,0,170,0.9),  0 0 36px rgba(255,0,170,0.45); }
  100% { color: #ff0066; text-shadow: 0 0 18px rgba(255,0,102,0.9),  0 0 36px rgba(255,0,102,0.45); }
}

@keyframes activePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0,180,255,0.4),  inset 0 0 6px rgba(0,180,255,0.08); }
  50%       { box-shadow: 0 0 20px rgba(0,180,255,0.72), inset 0 0 10px rgba(0,180,255,0.18); }
}
