/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #1a1a2e;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

canvas {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  touch-action: none;
}

/* ── Orientation warning ─────────────────────────────────── */
.orientation-warning {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #1a1a2e;
  z-index: 9999;
  color: white;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
}

@media (max-width: 950px) and (orientation: portrait) {
  .orientation-warning { display: flex; }
  #ui-root, #touch-controls, canvas, .mute-btn, .fullscreen-btn { display: none !important; }
}

/* ── UI overlay root ─────────────────────────────────────── */
#ui-root {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10;
  pointer-events: none;
}
#ui-root > * { pointer-events: auto; }

/* ── Title screen ────────────────────────────────────────── */
.title-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  background: rgba(26, 26, 46, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  gap: 16px;
  animation: fadeIn 0.4s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0;
}

@media (max-height: 450px) {
  .title-screen {
    justify-content: flex-start;
  }
}

.title-screen h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #ffe66d;
  text-shadow: 3px 3px 0 #e63946, 6px 6px 0 rgba(0,0,0,0.3);
  line-height: 1.1;
  animation: float 3s ease-in-out infinite;
}

.title-screen h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  margin-bottom: 10px;
}

.story-intro {
  font-size: clamp(0.85rem, 2.2vw, 1.1rem);
  color: #f1c40f;
  max-width: 520px;
  line-height: 1.7;
  font-style: italic;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
  padding: 12px 20px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  border-left: 3px solid #e63946;
}

.title-screen .tagline {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  color: #a8dadc;
  max-width: 500px;
  line-height: 1.5;
  font-weight: 700;
}

.nickname-container {
  margin: 10px 0;
  width: 100%;
  max-width: 300px;
}

#nickname-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.3);
  color: #fff;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

#nickname-input:focus {
  border-color: #ffe66d;
}

/* ── Mode Selection ──────────────────────────────────────── */
.mode-cards-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  max-width: 900px;
  margin: 20px 0;
  padding: 0 20px;
}

.mode-card {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  min-width: 220px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mode-card:hover {
  transform: translateY(-5px);
  border-color: #ffe66d;
  background: rgba(255,230,109,0.1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.mode-card.disabled {
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed;
}

.mode-card.disabled:hover {
  transform: none;
  border-color: rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.4);
  box-shadow: none;
}

.mode-frozen {
  margin-top: 10px;
  font-size: 0.7rem;
  font-weight: 900;
  color: #e63946;
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mode-card h3 {
  font-size: 1.4rem;
  color: #ffe66d;
  margin-bottom: 12px;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.mode-card p {
  font-size: 0.95rem;
  color: #a8dadc;
  line-height: 1.4;
  margin: 0;
}

.title-screen .controls-info {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.8;
  margin-top: 8px;
}

.title-screen .controls-info kbd {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 0.8rem;
}

.play-btn {
  margin-top: 20px;
  padding: 16px 48px;
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 0 #9b1b24, 0 6px 20px rgba(0,0,0,0.3);
}
.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #9b1b24, 0 8px 28px rgba(0,0,0,0.4);
}
.play-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #9b1b24, 0 3px 10px rgba(0,0,0,0.3);
}

.global-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 0.8rem;
  color: #a8dadc;
  opacity: 0.6;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: bold;
}

.lore-ticker {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: #ffeaa7;
  background: rgba(0,0,0,0.7);
  padding: 6px 20px;
  border-radius: 4px;
  max-width: 90%;
  text-align: center;
  border: 1px solid rgba(241, 196, 15, 0.2);
  animation: fadeInOut 8s infinite;
  pointer-events: none;
  font-style: italic;
  letter-spacing: 0.5px;
  z-index: 105;
}

.lore-ticker::before {
  content: "📰 ";
}

.play-btn-mp {
  background: #2980b9;
  box-shadow: 0 4px 0 #1a5276, 0 6px 20px rgba(0,0,0,0.3);
  margin-top: 10px;
}
.play-btn-mp:hover {
  box-shadow: 0 6px 0 #1a5276, 0 8px 28px rgba(0,0,0,0.4);
}
.play-btn-mp:active {
  box-shadow: 0 2px 0 #1a5276, 0 3px 10px rgba(0,0,0,0.3);
}

.play-btn-public {
  background: #2ecc71;
  box-shadow: 0 4px 0 #27ae60, 0 6px 20px rgba(0,0,0,0.3);
  margin-top: 10px;
  animation: pulse-glow 2s infinite;
}
.play-btn-public:hover {
  animation: none;
  box-shadow: 0 6px 0 #27ae60, 0 8px 28px rgba(0,0,0,0.4);
}
.play-btn-public:active {
  box-shadow: 0 2px 0 #27ae60, 0 3px 10px rgba(0,0,0,0.3);
}

/* --- Lobby Screen --- */
.lobby-screen {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  min-width: 400px;
  color: white;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 100;
  animation: fadeIn 0.3s ease;
}

.lobby-timer {
  font-size: 1.5rem;
  font-weight: bold;
  color: #f1c40f;
  margin: 20px 0;
}

.lobby-players-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
  max-height: 300px;
  overflow-y: auto;
}

.lobby-player-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lobby-player-item .player-name {
  font-weight: bold;
}

.lobby-player-item .player-status {
  font-size: 0.8rem;
  opacity: 0.7;
}

.lobby-room-code {
  font-size: 1.2rem;
  font-weight: bold;
  color: #3498db;
  margin-bottom: 10px;
}

.lobby-btn-secondary {
  background: #34495e;
  box-shadow: 0 4px 0 #2c3e50;
  margin-bottom: 10px;
  font-size: 1rem;
}

.lobby-btn-secondary:hover {
  background: #2c3e50;
  box-shadow: 0 6px 0 #1a252f;
}

/* ── HUD ─────────────────────────────────────────────────── */
.hud {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

#hud-timer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.hud-stat {
  background: rgba(0,0,0,0.45);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 800;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}

.hud-ammo {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}

.ammo-box {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  position: relative;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ammo-box.filled {
  border-color: #ffe66d;
  background: rgba(255, 230, 109, 0.3);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 230, 109, 0.4);
}

.ammo-box.filled::after {
  content: '🐦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
}

.hud-bottom-center {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.charge-bar-container {
  width: 100%;
  height: 20px;
  background: rgba(0,0,0,0.6);
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.charge-bar-fill {
  width: 100%;
  height: 100%;
  background: #2ecc71;
  transition: width 0.1s linear, background 0.3s ease;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.charge-bar-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  letter-spacing: 2px;
  pointer-events: none;
}

.hud-center-msg {
  position: absolute;
  top: 65%; /* Moved below cursor */
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  animation: popIn 0.3s ease, subtle-flicker 0.15s infinite;
}

.hud-zone-warning {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(230,57,70,0.85);
  padding: 8px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  animation: pulse 1s ease infinite;
}

.hud-kill-feed {
  position: absolute;
  top: 60px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 320px;
}

.kill-feed-entry {
  background: rgba(0,0,0,0.7);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  animation: slideInRight 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
  border-left: 4px solid rgba(255,255,255,0.2);
}

.kf-name {
  color: #3498db;
  font-weight: 800;
}

.kf-name-self {
  color: #2ecc71;
  font-weight: 900;
}

.kf-bird {
  color: #ffe66d;
  font-weight: 800;
}

.kf-danger {
  color: #e63946;
  font-weight: 800;
}

.kf-disconnect {
  color: #95a5a6;
  font-style: italic;
}

/* ── End screen ──────────────────────────────────────────── */
.end-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  background: rgba(26,26,46,0.88);
  text-align: center;
  gap: 12px;
  animation: fadeIn 0.5s ease;
}

.end-screen h1 {
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffe66d;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}

.end-screen .result-text {
  font-size: 1.3rem;
  color: #a8dadc;
}

.end-screen .stat-line {
  font-size: 1rem;
  color: #888;
}

.end-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin-top: 10px;
}

.end-controls button {
  width: 100%;
  margin: 0;
}

.rankings-list {
  margin: 15px 0;
  width: 100%;
  max-width: 420px;
  background: rgba(0,0,0,0.4);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Custom scrollbar for the rankings list */
.rankings-list::-webkit-scrollbar {
  width: 6px;
}
.rankings-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}
.rankings-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
}

.ranking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ranking-item.is-local {
  background: rgba(255, 230, 109, 0.2);
  border: 1px solid rgba(255, 230, 109, 0.3);
}

.ranking-item .rank {
  font-weight: 900;
  width: 30px;
  color: #888;
}

.ranking-item .name {
  flex-grow: 1;
  text-align: left;
  font-weight: 700;
  padding-left: 10px;
}

.ranking-item.is-local .name {
  color: #ffe66d;
}

.ranking-item .status {
  font-size: 0.75rem;
  font-weight: 800;
  color: #e63946;
}

.ranking-item .status[data-alive="true"] {
  color: #27ae60;
}

/* ── Name Tags ───────────────────────────────────────────── */
.name-tag {
  position: absolute;
  top: 0; left: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255,255,255,0.1);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
  transition: opacity 0.1s;
  z-index: 5;
}

/* ── Mute & Fullscreen Buttons ───────────────────────────── */
.mute-btn, .fullscreen-btn {
  position: fixed;
  bottom: 20px;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  pointer-events: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.2s;
}

.mute-btn {
  left: 20px;
}

.fullscreen-btn {
  left: 74px; /* 20px + 44px + 10px padding */
  font-size: 1.4rem;
}

.mute-btn:hover, .fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.1);
  border-color: #ffe66d;
}

.mute-btn:active, .fullscreen-btn:active {
  transform: scale(0.95);
}

.mute-btn.muted {
  opacity: 0.6;
}

@keyframes subtle-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

@keyframes float-centered {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 10px)); }
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  90% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 4px 0 #27ae60, 0 0 10px rgba(46, 204, 113, 0.3); }
  50% { box-shadow: 0 4px 0 #27ae60, 0 0 30px rgba(46, 204, 113, 0.8); }
  100% { box-shadow: 0 4px 0 #27ae60, 0 0 10px rgba(46, 204, 113, 0.3); }
}

/* Removed redundant vibe-jam-badge class */

.credits-container {
  position: absolute;
  bottom: 60px; /* Above the Vibe Jam badge which is fixed in the bottom-right */
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 105;
}

.twitter-link {
  font-size: 0.8rem;
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.85;
  font-weight: 700;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.twitter-link:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.65);
  transform: translateY(-2px);
  border-color: #ffe66d;
}

.hud-powerup {
  position: absolute;
  top: 75%; /* Moved below cursor */
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  pointer-events: none;
  background: rgba(0,0,0,0.5);
  padding: 12px 24px;
  border-radius: 30px;
  display: none;
  z-index: 100;
  animation: float-centered 2s infinite ease-in-out, subtle-flicker 0.2s infinite;
  border: 2px solid rgba(255,255,255,0.2);
}

.auto-restart-label {
  font-size: 1.1rem;
  font-weight: 900;
  color: #a8dadc;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(168, 218, 220, 0.4);
  margin: 15px 0;
  animation: pulse-restart 1.5s infinite ease-in-out;
}

@keyframes pulse-restart {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

.landing-logo {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 150px;
  height: auto;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.5));
  z-index: 100;
}

/* ── Touch controls (mobile) ──────────────────────────────── */
.touch-controls {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 50;
  pointer-events: none;
}

.touch-joystick-zone {
  position: absolute;
  left: 0;
  top: 0;
  width: 40%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
}

.touch-camera-zone {
  position: absolute;
  right: 0;
  top: 0;
  width: 60%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
}

.touch-joystick-base {
  display: none;
  position: fixed;
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.touch-joystick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.5);
  transition: none;
}

.touch-buttons {
  position: absolute;
  right: 130px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  pointer-events: auto;
  z-index: 2;
}

.touch-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.touch-btn:active {
  transform: scale(0.9);
  filter: brightness(1.3);
}

.touch-btn-jump {
  background: rgba(46, 204, 113, 0.5);
  margin-top: 10px; /* create a gap between jump and shoot */
}

.touch-btn-fire {
  background: rgba(230, 57, 70, 0.5);
  width: 72px;
  height: 72px;
}

.touch-btn-bird {
  background: rgba(52, 152, 219, 0.5);
}

/* ── Mobile responsive ────────────────────────────────────── */
@media (max-width: 950px) {
  .title-screen {
    justify-content: flex-start;
    padding-top: 40px;
    padding-bottom: 80px;
  }

  .title-screen h1 {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .story-intro {
    font-size: 0.8rem;
    padding: 8px 14px;
    max-width: 90vw;
  }

  .title-screen .tagline {
    font-size: 0.85rem;
  }

  .play-btn {
    font-size: 0.9rem;
    padding: 12px 24px;
    width: 80vw;
    max-width: 320px;
  }

  .nickname-container input {
    width: 70vw;
    max-width: 280px;
  }

  .controls-info {
    font-size: 0.7rem;
  }

  .landing-logo {
    width: 80px;
    top: 10px;
    right: 10px;
  }

  .global-counter {
    font-size: 0.65rem;
    top: 10px;
    left: 10px;
  }

  .lore-ticker {
    font-size: 0.65rem;
    padding: 4px 12px;
    max-width: 95%;
  }

  .vibe-jam-badge {
    font-size: 0.6rem;
  }

  .credits-container {
    bottom: 50px;
    right: 15px;
  }

  .twitter-link {
    font-size: 0.65rem;
    padding: 4px 10px;
  }

  /* HUD adjustments */
  .hud-top {
    padding: 6px 10px;
  }

  .hud-stat {
    font-size: 0.8rem;
  }

  #hud-timer {
    font-size: 1rem;
  }

  .charge-bar-container {
    height: 14px;
  }

  .hud-bottom-center {
    width: 200px;
    bottom: 15px;
  }

  .hud-ammo {
    margin-bottom: 6px;
    gap: 8px;
  }

  .hud-powerup {
    font-size: 0.7rem;
    padding: 4px 10px;
    top: 45px;
    left: 10px;
    transform: none;
    animation: subtle-flicker 0.2s infinite; /* remove float on mobile */
    border-radius: 4px;
    background: rgba(0,0,0,0.6);
  }

  .hud-kill-feed {
    top: 45px;
    right: 10px;
    gap: 4px;
  }

  .kill-feed-entry {
    font-size: 0.6rem;
    padding: 3px 10px;
    border-left-width: 3px;
  }

  .mode-card {
    min-width: 120px;
    padding: 12px;
  }

  .mode-card h3 {
    font-size: 0.9rem;
  }

  .mode-card p {
    font-size: 0.7rem;
  }
}
