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

body {
  background: #0a0a0f;
  overflow: hidden;
  font-family: 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
  color: #fff;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

/* Overlays */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background: rgba(5, 5, 15, 0.92);
  backdrop-filter: blur(8px);
}

/* Title */
.title-content, .result-content {
  text-align: center;
  max-width: 500px;
  padding: 20px;
  width: 90%;
}

.game-title {
  font-size: 3rem;
  background: linear-gradient(135deg, #ff2d95, #00e5ff, #bf5af2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(255, 45, 149, 0.5));
  margin-bottom: 4px;
}

.game-subtitle {
  font-size: 1.2rem;
  color: #00e5ff;
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.title-desc {
  margin-bottom: 20px;
  font-size: 1rem;
}

.en-small {
  font-size: 0.75rem;
  color: #888;
  display: block;
  margin-top: 2px;
}

.controls-info {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 45, 149, 0.3);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}

.key-guide {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 10px 0;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid #00e5ff;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: bold;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.timing-info {
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.8;
}

.perfect-text { color: #ffd700; }
.great-text { color: #00e5ff; }
.good-text { color: #bf5af2; }
.miss-text { color: #ff4466; }

/* Buttons */
.neon-btn {
  background: linear-gradient(135deg, #ff2d95, #bf5af2);
  color: #fff;
  border: none;
  padding: 14px 50px;
  font-size: 1.3rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  margin: 8px;
  box-shadow: 0 0 25px rgba(255, 45, 149, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 2px;
}

.neon-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255, 45, 149, 0.6);
}

.neon-btn:active {
  transform: scale(0.97);
}

.share-btn {
  background: linear-gradient(135deg, #1d9bf0, #00e5ff);
  box-shadow: 0 0 25px rgba(29, 155, 240, 0.4);
}

.share-btn:hover {
  box-shadow: 0 0 40px rgba(29, 155, 240, 0.6);
}

/* Brand */
.brand-links {
  margin-top: 20px;
}

.patreon-link {
  color: #ff424d;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 16px;
  border: 1px solid rgba(255, 66, 77, 0.4);
  border-radius: 20px;
  transition: all 0.3s;
}

.patreon-link:hover {
  background: rgba(255, 66, 77, 0.15);
  border-color: #ff424d;
}

/* Result */
.result-title {
  font-size: 2rem;
  color: #ff2d95;
  margin-bottom: 15px;
}

.rank-display {
  font-size: 5rem;
  font-weight: bold;
  margin: 10px 0;
  text-shadow: 0 0 30px currentColor;
}

.rank-S { color: #ffd700; }
.rank-A { color: #00e5ff; }
.rank-B { color: #bf5af2; }
.rank-C { color: #ff8c00; }
.rank-D { color: #ff4466; }

.result-stats {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 45, 149, 0.2);
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-row:last-child {
  border-bottom: none;
}

.timing-breakdown {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}

.timing-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 3px 0;
}

.result-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 15px;
}

/* Mobile */
@media (max-width: 600px) {
  .game-title { font-size: 2.2rem; }
  .game-subtitle { font-size: 1rem; }
  .key { width: 40px; height: 40px; font-size: 1.1rem; }
  .neon-btn { padding: 12px 36px; font-size: 1.1rem; }
  .rank-display { font-size: 4rem; }
}
