:root {
  color-scheme: dark;
  --green: #00ff48;
  --pink: #ff00cc;
  --yellow: #fff000;
  --blue: #00178f;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--green);
  background:
    radial-gradient(circle at 15% 20%, #ff00cc 0 2px, transparent 3px) 0 0 / 42px 42px,
    radial-gradient(circle at 75% 60%, #00e5ff 0 2px, transparent 3px) 0 0 / 67px 67px,
    #000;
  font-family: "MS PGothic", "Yu Gothic", sans-serif;
  overflow-x: hidden;
}

.secret-stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.045) 4px, transparent 5px);
  animation: scan 9s linear infinite;
}

.secret-header {
  padding: .7rem;
  color: #fff;
  background: repeating-linear-gradient(135deg, #000 0 16px, #9d0000 16px 32px);
  border-bottom: 8px ridge #c0c0c0;
  text-align: center;
  text-shadow: 3px 3px #000;
}
.secret-header h1 {
  margin: .35rem 0;
  color: var(--yellow);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(2rem, 8vw, 5.2rem);
  letter-spacing: .05em;
  -webkit-text-stroke: 2px #f00;
  animation: alarm 1s steps(2, jump-none) infinite;
}
.classified {
  margin: 0;
  color: #000;
  background: var(--yellow);
  font-weight: 900;
  letter-spacing: .25em;
}
.warning { margin: .35rem 0 0; }
.warning strong { color: var(--yellow); font-size: 1.15em; }

.secret-shell {
  width: min(920px, calc(100% - 18px));
  margin: 1rem auto 3rem;
}

.system-window,
.nonsense-panel,
.door-room,
.important-file {
  margin: 1.2rem 0;
  border: 7px ridge #c0c0c0;
  box-shadow: 9px 9px 0 #2b002b;
}
.window-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .3rem .55rem;
  color: #fff;
  background: linear-gradient(90deg, #000080, #1084d0);
  font-family: ui-monospace, monospace;
  font-weight: 900;
}
.system-body {
  padding: 1rem;
  background: #050505;
  font-family: ui-monospace, "Courier New", monospace;
}
.access-status {
  padding: .55rem;
  color: #000;
  background: var(--green);
  border: 4px inset #fff;
  font-weight: 900;
  text-align: center;
}
.secret-status {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
}
.secret-status div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  border: 2px solid var(--green);
}
.secret-status dt,
.secret-status dd { margin: 0; padding: .3rem .45rem; }
.secret-status dt { color: #000; background: var(--green); font-weight: 900; }
.secret-status dd { color: var(--yellow); }

.loading-wrap {
  height: 34px;
  margin-top: 1rem;
  padding: 4px;
  background: #222;
  border: 4px inset #fff;
}
.loading-bar {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--green) 0 18px, #fff000 18px 36px, #ff00cc 36px 54px);
  transition: width .25s linear;
}
.loading-text { margin: .35rem 0 0; text-align: center; }

.nonsense-panel,
.door-room,
.important-file {
  padding: 1rem;
  color: #000;
  background: #fff4a8;
}
h2 {
  margin: 0 0 .8rem;
  padding: .4rem;
  color: #fff;
  background: linear-gradient(90deg, #f00, #ff00cc, #000080);
  border: 5px double var(--yellow);
  text-align: center;
  text-shadow: 2px 2px #000;
}
.nonsense-display {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 180px;
  padding: .8rem;
  background: #fff;
  border: 5px dashed #f00;
}
.secret-tigger {
  width: 100%;
  filter: drop-shadow(5px 5px 0 #ff00cc);
  animation: tigger 1.2s ease-in-out infinite alternate;
}
#secretMessage { font-size: clamp(1.1rem, 3vw, 1.55rem); font-weight: 900; }

button,
a { font: inherit; }
button { cursor: pointer; }
.danger-button,
.gray-button,
.secret-nav a,
.secret-nav button {
  display: block;
  width: fit-content;
  margin: .9rem auto 0;
  padding: .7rem 1rem;
  border: 6px outset #fff;
  box-shadow: 5px 5px 0 #000;
  font-weight: 900;
  text-decoration: none;
}
.danger-button { color: #fff; background: #f00; animation: alarm .8s steps(2, jump-none) infinite; }
.gray-button { color: #000; background: #c0c0c0; }
button:active, a:active { border-style: inset; transform: translate(3px, 3px); box-shadow: 2px 2px 0 #000; }

.door-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.fake-door {
  min-height: 190px;
  padding: .7rem;
  color: #fff;
  border: 9px ridge #c0c0c0;
  box-shadow: 6px 6px 0 #000;
  font-size: 1.25rem;
  font-weight: 900;
  text-shadow: 2px 2px #000;
  transition: transform .15s ease;
}
.fake-door span { display: block; margin-top: .5rem; font-size: .75rem; }
.fake-door:hover { transform: translateY(-7px) rotate(2deg); }
.door-red { background: repeating-linear-gradient(90deg, #570000 0 18px, #b00000 18px 36px); }
.door-blue { background: repeating-linear-gradient(90deg, #00085c 0 18px, #004ac6 18px 36px); }
.door-gold { color: #000; background: repeating-linear-gradient(90deg, #a56b00 0 18px, #ffe600 18px 36px); text-shadow: 1px 1px #fff; }
.door-result {
  min-height: 3.2rem;
  padding: .7rem;
  color: var(--green);
  background: #000;
  border: 4px inset #fff;
  font-family: ui-monospace, monospace;
  font-weight: 900;
  text-align: center;
}

.important-file table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
th, td { padding: .45rem; border: 3px solid #000; text-align: left; }
th { color: #fff; background: #000080; }
#downloadResult { min-height: 1.5rem; text-align: center; font-weight: 900; }

.secret-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  background: #c0c0c0;
  border: 7px ridge #fff;
}
.secret-nav a { color: #fff; background: #000080; }
.secret-nav button { color: #000; background: var(--yellow); }

footer {
  padding: 1rem;
  color: #fff;
  background: #000;
  border-top: 6px double var(--pink);
  text-align: center;
  font-size: .8rem;
}

.erased body,
html.erased body { filter: grayscale(1) contrast(.25); }
html.erased::after {
  content: "証拠を消去しました（消えていません）";
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(0,0,0,.92);
  font-family: ui-monospace, monospace;
  font-size: clamp(1.2rem, 5vw, 3rem);
  font-weight: 900;
  text-align: center;
}

@keyframes scan { to { transform: translateY(20px); } }
@keyframes alarm { 50% { opacity: .3; filter: hue-rotate(120deg); } }
@keyframes tigger { to { transform: translateY(-10px) rotate(4deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 650px) {
  .secret-status { grid-template-columns: 1fr; }
  .door-grid { grid-template-columns: 1fr; }
  .fake-door { min-height: 130px; }
  .nonsense-display { grid-template-columns: 100px 1fr; }
  .secret-status div { grid-template-columns: 7rem 1fr; }
}
