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

body {
  background: #000;
  overflow: hidden;
  font-family: 'Courier New', monospace;
  color: #fff;
  cursor: crosshair;
}

#kanjiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

#content-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.content-section {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  max-width: 320px;
}

.content-section.revealed {
  opacity: 1;
  pointer-events: auto;
}

.content-section h1 {
  font-size: 2.2rem;
  color: #ff0000;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.3em;
}

.content-section h2 {
  font-size: 1.1rem;
  color: #ff0000;
  margin-bottom: 0.5em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.content-section p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0.3em 0;
}

.content-section .dim {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.content-section a {
  color: #ff0000;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
  transition: border-color 0.2s;
}

.content-section a:hover {
  border-color: #ff0000;
}

.cta-link {
  display: inline-block;
  margin-top: 0.8em;
  padding: 0.4em 1em;
  border: 1px solid #ff0000 !important;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.cta-link:hover {
  background: #ff0000;
  color: #000;
}

#hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  animation: pulse 2s ease-in-out infinite;
  transition: opacity 1s;
}

#hint.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
    cursor: default;
  }

  #kanjiCanvas {
    position: fixed;
    height: 100vh;
  }

  #content-layer {
    position: relative;
    height: auto;
    min-height: 100vh;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12vh 1.5rem 4rem;
    gap: 2rem;
  }

  .content-section {
    position: relative;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.8);
    padding: 1.5rem;
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 4px;
    max-width: 100%;
    width: 100%;
  }

  #hint {
    display: none;
  }
}
