/* Shared components, loaded after style.css and before each page's own sheet.
   - Header/title cluster: home + creator pages.
   - Meta-row / links / more-creator cards: game + creator pages.
   Kept out of the page sheets so the creator page needn't pull in all of
   home.css and game.css for these few pieces. */

/* Header + title. h1 is scoped `header h1` on purpose: the game page's title
   lives in `.content`, not a <header>, and must stay solid white — a bare `h1`
   here would give it the transparent-fill gradient. */
.container {
  max-width: 960px;
  margin: 0 auto;
}

header {
  position: relative;
  text-align: center;
  margin-bottom: 1.5rem;
  padding-top: 2rem;
}

header::before {
  content: '';
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(192, 132, 252, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #e9d5ff, #c084fc, #a78bfa, #e9d5ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 8s ease infinite;
  margin-bottom: 0.4rem;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.subtitle a {
  color: var(--text);
  text-decoration: none;
}

.subtitle a:hover {
  color: var(--accent);
}

.contribute {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.contribute a {
  color: var(--accent);
  text-decoration: none;
}

.contribute a:hover {
  color: var(--accent-hover);
}

/* Meta-row + links + share button (game + creator). */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.extra-link {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.extra-link:visited { color: var(--text); }
.extra-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  border: none;
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 2rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(192, 132, 252, 0.3);
}

.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(192, 132, 252, 0.4);
}

/* Card grid: game's "more from creator" strip + the creator page's "more works". */
.more-creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.more-creator-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s;
}

.more-creator-thumb {
  position: relative;
  overflow: hidden;
  height: 100px;
}

.more-creator-thumb .card-badge {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
}

.more-creator-thumb .card-badge-left {
  right: auto;
  left: 0.3rem;
}

.more-creator-card:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.3);
}

.more-creator-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.more-creator-title {
  display: block;
  padding: 0.5rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
}

.more-creator-placeholder {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, var(--surface), var(--card));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* h1 fragments split out of home.css's @media blocks, kept scoped to header h1
   and placed after the base rule so the cascade is unchanged. */
@media (max-width: 640px) {
  header h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  header h1 { animation: none; }
}
