/* ============================
   Intro Section Styling
=============================== */
#intro {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  animation: fadeInScale 1.5s ease-out forwards;
}

#intro h1 {
  color: var(--accent-color);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.subnote {
  color: var(--text-color);
  font-size: 1rem;
  margin: 0.5rem 0 1.5rem;
  opacity: 0.75;
  height: 1.4em;
  position: relative;
}

/* ============================
   Typewriter Effect
=============================== */
.typewriter {
  display: inline-block;
  overflow: hidden;
  border-right: 0.15em solid var(--accent-color);
  white-space: nowrap;
  letter-spacing: 0.02em;
  animation: typing 4s steps(84, end), blink 0.7s step-end infinite;
  width: 82ch;
}

/* Typewriter animation */
@keyframes typing {
  from { width: 0; }
  to { width: 82ch; }
}

/* Blinking cursor */
@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent-color); }
}

/* ============================
   Start Button Style
=============================== */
.game-btn {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  padding: 0.4rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  box-shadow: none;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.game-btn:hover {
  background: var(--accent-color);
  color: var(--bg-color);
  opacity: 1;
}

/* ============================
   Theme Toggle Button
=============================== */
#theme-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 2000;
}

/* Icon Button Style */
.icon-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-color);
  opacity: 0.6;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.icon-btn:hover {
  opacity: 1;
  background: var(--bg-color);
  box-shadow: 0 0 6px var(--accent-color);
}

/* ============================
   Responsive Styles (Mobile)
=============================== */
@media (max-width: 768px) {
  #intro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    text-align: center;
    z-index: 10;
    animation: fadeInScale 1.5s ease-out forwards;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;

    padding: 1rem;
    max-width: 95%;
    width: 100%;
    font-family: var(--font-main);
    opacity: 1;
  }

  #intro h1 {
    font-size: 2.3rem;
    color: var(--accent-color);
  }

  .subnote {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.75;
    line-height: 1.5;
  }

  #openBtn {
    font-size: 1.1rem;
    padding: 0.6rem 1.4rem;
    margin-top: 0.5rem;
  }

  .typewriter {
    animation: none;
    border-right: none;
    white-space: normal;
    width: auto;
  }

  .game-btn {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
  }

  .icon-btn {
    font-size: 1rem;
  }
}
