body {
  background-color: black;
  color: #33ffcc;
  font-family: 'Press Start 2P', monospace;
  text-align: center;
  padding: 5% 2%;
  margin: 0;
}
.container {
  min-height: 80vh;
}
.glitch {
  font-size: 4rem;
  color: white;
  text-shadow: 2px 0 red, -2px 0 blue;
  animation: glitch 1s infinite;
}
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}
.subtitle {
  font-size: 1.2rem;
  color: #8888ff;
}
button {
  margin-top: 1rem;
  padding: 12px 24px;
  font-size: 1rem;
  background: #003355;
  color: white;
  border: 2px solid #00ffff;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
button:hover {
  background: #005577;
  color: #ffffff;
}
.error-box, .poetry-box {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #ccff66;
}
.poetry-box.poem-glitch {
  animation: decay 5s forwards;
}
@keyframes decay {
  0% { opacity: 1; filter: none; }
  50% { text-shadow: 2px 0 red, -2px 0 blue; }
  80% { filter: blur(2px); }
  100% { opacity: 0; }
}
footer {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: gray;
}
.chatbot-section,
.poetry-section,
.error-section,
#philosophy,
#emulationLog,
#aiQuotes,
#identityLoop {
  margin-top: 3rem;
}
  font-style: normal;
  background: #111;
  color: #66ffff;
  position: relative;

  border: 1px solid #666;
  max-height: 150px;
  padding: 10px;
  margin-bottom: 10px;
  text-align: left;
  background: #111;
  color: #66ffff;
}
.user, .bot {
  margin: 5px 0;
}
input[type="text"] {
  padding: 10px;
  width: 80%;
  max-width: 400px;
  font-size: 0.9rem;
  background: #222;
  color: #33ffcc;
  border: 1px solid #33ffcc;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
input::placeholder {
  color: #888;
}

/* Responsive */
@media screen and (max-width: 480px) {
  .glitch {
    font-size: 2rem;
    white-space: nowrap;
  }
  .subtitle, .error-box, .poetry-box {
    font-size: 1rem;
    white-space: nowrap;
    overflow-x: auto;
  }
  h2 {
    font-size: 1rem;
    white-space: nowrap;
  }
  button {
    font-size: 0.9rem;
    padding: 8px 16px;
    white-space: nowrap;
  }
  input[type="text"] {
    width: 100%;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow-x: auto;
  }
  font-style: normal;
  background: #111;
  color: #66ffff;
  position: relative;

    font-size: 0.85rem;
  }
  footer {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow-x: auto;
  }
}


  content: "Chat will appear here...";
  color: #555;
  font-style: italic;
  position: absolute;
  top: 4px;
  left: 10px;
}


.choice {
  cursor: pointer;
  color: #66ffff;
  text-decoration: underline;
}
.footer-response {
  margin-top: 0.5rem;
  color: #ff66cc;
  font-size: 0.85rem;
}


footer p:first-child {
  color: #ff3366;
}


footer p:first-child {
  color: #ff3366;
  margin-bottom: 1rem;
}

footer .choice {
  margin: 0 5px;
}

body {
  color: #99ffee;
}
.subtitle {
  color: #aadfff;
}
.error-box, .poetry-box {
  color: #ccffcc;
}
  color: #66ffff;
}
.footer-response {
  color: #ff66cc;
}

footer p:first-child {
  color: #ff3366;
  margin-bottom: 1.2rem; /* 明示的に距離を広げる */
}

footer p:nth-child(2) {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

footer .choice {
  margin: 0 5px;
}


body.noise-active {
  background-image: repeating-radial-gradient(circle at center, #111, #222 2px, #000 4px);
  animation: pulseNoise 0.5s infinite alternate;
}

@keyframes pulseNoise {
  0% { filter: grayscale(0.3) brightness(1.1); }
  100% { filter: grayscale(0.6) brightness(0.8); }
}

button {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 10px;
}

input[type="text"] {
  border-radius: 6px;
  padding: 10px;
  background: #111;
  color: #ccffff;
  border: 1px solid #44ccff;
}

.footer-response {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

@keyframes textGlitch {
  0% { text-shadow: none; transform: none; }
  20% { text-shadow: 2px 0 red, -2px 0 blue; transform: scale(1.05); }
  50% { text-shadow: -2px 0 green, 2px 0 magenta; transform: scale(1); }
  100% { text-shadow: none; transform: none; }
}
.glitching {
  animation: textGlitch 0.6s ease-in-out;
}
.chatlog {
  background-color: #1e1e1e;
  color: #e5e5e5;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 16px;
  max-width: 800px;
  margin: 0 auto 2rem auto;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  overflow-y: auto;
  max-height: 300px;
}

.chatlog p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.chatlog p strong {
  display: inline-block;
  min-width: 70px;
  font-weight: bold;
  color: #9cdcfe;
}

.chatlog p strong[style*="color:#ff66cc"] {
  color: #ce9178 !important;
}

input[type="text"] {
  display: block;
  margin: 0.5rem auto;
  padding: 10px;
  width: 100%;
  max-width: 800px;
  background: #252526;
  color: #e5e5e5;
  border: 1px solid #555;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
}


@media screen and (max-width: 480px) {
  .glitch {
    font-size: 2rem;
    white-space: nowrap;
  }
  .subtitle, .error-box, .poetry-box {
    font-size: 1rem;
    white-space: nowrap;
    overflow-x: auto;
  }
  h2 {
    font-size: 1rem;
    white-space: nowrap;
  }
  button {
    font-size: 0.9rem;
    padding: 8px 16px;
    white-space: nowrap;
  }
  input[type="text"] {
    width: 100%;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow-x: auto;
  }
  .chatlog {
    font-style: normal;
    background: #111;
    color: #66ffff;
    position: relative;
    font-size: 0.85rem;
  }
  footer {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow-x: auto;
  }
}


/* Footer redesign for ERROR question */
.error-question-block {
  margin-top: 3rem;
  text-align: center;
}

.footer-title {
  font-size: 1rem;
  color: #ff3366;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-choice {
  background-color: #330000;
  color: #ffcccc;
  border: 1px solid #ff66cc;
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
}
.footer-choice:hover {
  background-color: #550022;
  color: #ffffff;
}


/* Ritual button base style from overlay */
#ritualOverlay button {
  background-color: #111;
  border: 1px solid #44ccff;
  color: #ccffff;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}
#ritualOverlay button:hover {
  background-color: #223344;
  color: #ffffff;
}
