@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #fbf9f6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #2c3d51;
}

.fun-text {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #F22952, #ff7043);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

canvas { will-change: transform; }

/* Home page */
header {
  padding: 2rem 1.5rem 1rem;
  max-width: 800px;
  margin: auto;
}

header h1 {
  margin: 0;
}

main {
  max-width: 800px;
  margin: auto;
  padding: 1rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

a.game-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  background: #fff;
}

a.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
}

a.game-card img {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.game-card.coming-soon {
  pointer-events: none;
  opacity: 0.5;
}

.game-card.coming-soon .placeholder {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #e8e4de;
}

.game-card .info {
  padding: 0.75rem 1rem;
}

.game-card .info h2 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #2c3d51;
  margin: 0 0 0.2rem;
}

.game-card .info p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

section:has(script[data-name="bmc-button"]) {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1.5rem 0;
}

footer {
  text-align: center;
  padding: 1rem 1.5rem 2.5rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #999;
}

footer div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

footer a {
  color: #999;
  text-decoration: none;
}

footer a:hover {
  color: #666;
}

/* Game page shared layout */
#site-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

#breadcrumb {
  flex: 1;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #555;
}

#breadcrumb a {
  text-decoration: none;
}

#shareBtn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #2c3d51;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

#shareBtn:hover {
  background: rgba(44, 61, 81, 0.08);
}

#hint {
  margin: 0;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #95a5a6;
  line-height: 1.6;
  flex-shrink: 0;
}

#hint.hidden {
  visibility: hidden;
}
