*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: #1a1a2e;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

/* Hub styles */
.hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hub__title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hub__subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  opacity: 0.85;
  margin-bottom: 40px;
}

.hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 800px;
}

.hub__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  text-decoration: none;
  color: #fff;
  min-height: 140px;
  border: 2px solid rgba(255,255,255,0.1);
}

.hub__card:hover,
.hub__card:active {
  transform: scale(1.05);
  background: rgba(255,255,255,0.25);
}

.hub__card-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hub__card-name {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.hub__card-desc {
  font-size: 0.75rem;
  opacity: 0.75;
  text-align: center;
  margin-top: 4px;
}

.hub__coming-soon {
  opacity: 0.3;
  pointer-events: none;
}

/* Game chrome — shared across all games */
.game-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  z-index: 100;
  pointer-events: none;
}

.game-header__btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, background 0.15s ease;
  padding: 0;
}

.game-header__btn:hover,
.game-header__btn:active {
  transform: scale(1.1);
  background: rgba(0,0,0,0.55);
}

.game-header__btn svg {
  width: 24px;
  height: 24px;
}

.game-header__btns {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 480px) {
  .hub__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .hub__card {
    min-height: 120px;
    padding: 16px 10px;
  }
}
