:root {
  --nyan-gold: #ffd700;
  --nyan-pink: #ff66b2;
  --nyan-purple: #bc00ff;
  --glass: rgba(0, 0, 0, 0.6);
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
  user-select: none; touch-action: none;
}

body {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  background-color: #121212;
  color: #fff;
  overflow: hidden; height: 100vh;
}

#app {
  width: 100vw; height: 100vh;
  background: url('bg.png') center/cover no-repeat;
  position: relative;
}

.back-link {
  position: absolute; top: 15px; left: 15px; z-index: 100;
  background: var(--nyan-gold); color: #000;
  padding: 8px 15px; border-radius: 20px; font-weight: 900;
  text-decoration: none; box-shadow: 0 4px 15px rgba(255,215,0,0.4);
  font-size: 0.9rem;
}

.game-container {
  width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center;
  position: relative;
}

#gameCanvas {
  max-width: 100%; max-height: 100%;
  box-shadow: 0 0 50px rgba(188, 0, 255, 0.3);
}

.score-board {
  position: absolute; top: 58px; width: 100%;
  text-align: center; z-index: 10;
  pointer-events: none;
}

.current-score {
  font-size: 3rem; font-weight: 900; color: var(--nyan-gold);
  text-shadow: 0 0 15px rgba(255,215,0,0.8);
}

.best-score { font-size: 1rem; opacity: 0.8; }

.run-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
}

.run-meta span {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  padding: 5px 8px;
}

.overlay {
  position: absolute; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  z-index: 50; backdrop-filter: blur(5px);
}

.hidden { display: none !important; }

h1, h2 {
  font-size: 4rem; font-weight: 900; margin-bottom: 20px;
  background: linear-gradient(to bottom, #fff, var(--nyan-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.5);
  filter: drop-shadow(0 4px 15px rgba(188, 0, 255, 0.8));
}

p {
  width: min(420px, calc(100% - 32px));
  margin: 0 auto 30px;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.45;
  text-align: center;
  opacity: 0.88;
}

.main-btn {
  background: var(--nyan-pink); color: #fff;
  border: none; padding: 15px 40px; border-radius: 50px;
  font-size: 1.5rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 5px 20px rgba(255, 102, 178, 0.5);
  transition: transform 0.2s;
}

.main-btn:active { transform: scale(0.95); }

.main-btn.secondary {
  background: var(--nyan-gold);
  color: #111;
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.35);
}

.main-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.share-btn {
  background: #121212; color: #fff; border: 1px solid #555;
  padding: 10px 25px; border-radius: 50px; margin-top: 15px;
  font-weight: 600; cursor: pointer;
}

.buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final-score {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.final-score.small {
  min-height: 22px;
  font-size: 0.95rem;
  color: var(--nyan-gold);
}

@media (max-width: 600px) {
  h1, h2 {
    font-size: 3rem;
  }

  .current-score {
    font-size: 2.35rem;
  }

  .main-btn {
    width: min(280px, calc(100vw - 40px));
    padding: 14px 22px;
    font-size: 1.15rem;
  }
}


/* --- GLOBAL NYANTREPRENEUR OVERRIDES --- */
.back-link, .hub-btn {
  position: absolute !important; top: 15px !important; left: 15px !important; z-index: 9999 !important;
  background: rgba(18, 18, 18, 0.8) !important; color: #ffd700 !important;
  padding: 8px 16px !important; border-radius: 20px !important; font-weight: 800 !important;
  text-decoration: none !important; font-size: 0.8rem !important;
  border: 1px solid rgba(255, 215, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
  transition: all 0.2s ease !important;
}
