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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0a0a0f;
  color: #e0e0e0;
  overflow-x: hidden;
}

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

main {
  position: relative;
  z-index: 1;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  color: #7c5cfc;
  font-weight: 600;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #888;
  max-width: 500px;
  line-height: 1.8;
  min-height: 3.6em;
  transition: opacity 0.3s;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  font-size: 1.5rem;
  color: #555;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Toys Grid */
.toys {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.toy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  width: 100%;
}

.toy-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
}

.toy-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(124,92,252,0.3);
  transform: translateY(-2px);
}

.toy-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.toy-card h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  color: #ccc;
}

.toy-card p {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1rem;
  min-height: 2em;
}

.toy-btn {
  background: rgba(124,92,252,0.15);
  color: #7c5cfc;
  border: 1px solid rgba(124,92,252,0.3);
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.toy-btn:hover {
  background: rgba(124,92,252,0.25);
}

/* Snake canvas */
#snakeCanvas {
  display: block;
  margin: 0 auto 0.5rem;
  background: #111;
  border-radius: 4px;
  image-rendering: pixelated;
}

.score {
  color: #888;
  font-size: 0.85rem;
}

/* Secret word */
.secret-word {
  color: #555;
  cursor: pointer;
  transition: color 0.3s;
  text-decoration: underline;
  text-decoration-color: transparent;
}

.secret-word:hover {
  color: #7c5cfc;
  text-decoration-color: #7c5cfc;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #1a1a2e;
  border: 1px solid rgba(124,92,252,0.3);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 400px;
  text-align: center;
}

.modal-box p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #ccc;
}

/* 404 page */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.not-found h1 {
  font-size: 5rem;
  color: #7c5cfc;
  font-weight: 300;
  margin-bottom: 1rem;
}

.not-found p {
  color: #888;
  font-size: 1.1rem;
  max-width: 400px;
  line-height: 1.8;
}

.not-found .maze {
  margin: 2rem 0;
}

@media (max-width: 600px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .toy-grid { grid-template-columns: 1fr; }
}
