:root {
  --bg: #0a0a0f;
  --surface: #14141f;
  --neon-pink: #ff1493;
  --neon-cyan: #00e5ff;
  --neon-green: #39ff14;
  --neon-gold: #ffd700;
  --text: #e0e0e0;
  --text-dim: #888;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
}

/* Title Screen */
.title-content {
  text-align: center;
  padding: 20px;
  max-width: 400px;
  width: 100%;
}

.game-title {
  margin-bottom: 10px;
}

.title-ja {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  line-height: 1.2;
}

.title-en {
  display: block;
  font-size: 1.1rem;
  color: var(--neon-gold);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 4px;
}

.title-icon {
  font-size: 4rem;
  margin: 15px 0;
  animation: bounce 2s ease-in-out infinite;
}

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

.subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 40px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  margin: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
}

.btn-secondary {
  background: var(--surface);
  color: var(--neon-cyan);
  border: 2px solid var(--neon-cyan);
}

.btn-secondary:hover {
  background: rgba(0, 229, 255, 0.1);
  transform: scale(1.05);
}

.btn-outline {
  background: transparent;
  color: var(--text-dim);
  border: 2px solid var(--text-dim);
}

.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
}

/* How to Play */
.how-to-play {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 20px 0;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.how-to-play h3 {
  font-size: 0.9rem;
  color: var(--neon-gold);
  margin-bottom: 10px;
  text-align: center;
}

.how-to-play ul {
  list-style: none;
  padding: 0;
}

.how-to-play li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.how-to-play li::before {
  content: '💪';
  position: absolute;
  left: 0;
  font-size: 0.7rem;
}

/* Patreon */
.patreon-link {
  margin-top: 20px;
}

.patreon-link a {
  color: var(--neon-pink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid rgba(255, 20, 147, 0.3);
  border-radius: 25px;
}

.patreon-link a:hover {
  background: rgba(255, 20, 147, 0.1);
  border-color: var(--neon-pink);
}

/* Game Screen */
#game-screen {
  justify-content: flex-start;
}

#game-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 10px 15px;
  background: rgba(10, 10, 15, 0.85);
  z-index: 10;
  backdrop-filter: blur(5px);
}

.hud-item {
  text-align: center;
}

.hud-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hud-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--neon-gold);
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Perfect Popup */
.popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--neon-gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
  z-index: 20;
  pointer-events: none;
  animation: popIn 0.6s ease-out forwards;
}

.popup.hidden {
  display: none;
}

@keyframes popIn {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.tap-hint {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: var(--text-dim);
  z-index: 10;
  animation: pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Result Screen */
.result-content {
  text-align: center;
  padding: 20px;
  max-width: 400px;
  width: 100%;
}

.result-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--neon-pink);
  margin-bottom: 5px;
  line-height: 1.3;
}

.result-icon {
  font-size: 3.5rem;
  margin: 10px 0;
}

.result-stats {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  margin: 15px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--neon-cyan);
}

.stat-unit {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.result-rank {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 10px 0 15px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

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

.result-buttons .btn {
  min-width: 220px;
}

/* Scrollbar hide */
::-webkit-scrollbar {
  display: none;
}
