:root {
  --gc-primary: #6366f1;
  --gc-primary-light: #818cf8;
  --gc-accent: #22d3ee;
  --gc-bg: #070b14;
  --gc-surface: rgba(255, 255, 255, 0.04);
  --gc-surface-hover: rgba(255, 255, 255, 0.07);
  --gc-card: rgba(17, 24, 39, 0.72);
  --gc-text: #f8fafc;
  --gc-muted: #94a3b8;
  --gc-border: rgba(148, 163, 184, 0.14);
  --gc-glow: rgba(99, 102, 241, 0.35);
  --gc-radius: 16px;
  --gc-radius-sm: 10px;
  --gc-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  --gc-font: "SF Pro Display", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body.gc-body {
  margin: 0;
  font-family: var(--gc-font);
  color: var(--gc-text);
  background: var(--gc-bg);
  -webkit-font-smoothing: antialiased;
}

.gc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.85);
  border-bottom: 1px solid var(--gc-border);
  backdrop-filter: blur(16px);
}

.gc-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gc-brand {
  font-weight: 700;
  font-size: 16px;
  color: var(--gc-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.gc-nav a {
  margin-left: 20px;
  color: var(--gc-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.gc-nav a.active,
.gc-nav a:hover {
  color: var(--gc-primary-light);
}

.gc-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.gc-footer {
  text-align: center;
  color: var(--gc-muted);
  font-size: 13px;
  padding: 32px 20px;
  border-top: 1px solid var(--gc-border);
}

.gc-page {
  position: relative;
  isolation: isolate;
  font-family: var(--gc-font);
  color: var(--gc-text);
  margin-top: -12px;
  padding-bottom: 24px;
}

.gc-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 100%, rgba(168, 85, 247, 0.1), transparent 50%),
    var(--gc-bg);
  pointer-events: none;
}

.gc-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 80%);
  pointer-events: none;
}

/* ── Hero ── */
.gc-hero {
  position: relative;
  padding: 48px 0 40px;
  text-align: center;
}

.gc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gc-accent);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.gc-hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gc-accent);
  box-shadow: 0 0 10px var(--gc-accent);
  animation: gc-pulse 2s ease-in-out infinite;
}

@keyframes gc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.gc-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #c7d2fe 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gc-hero-desc {
  margin: 0 auto 28px;
  max-width: 480px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gc-muted);
}

.gc-hero-stats {
  display: inline-flex;
  gap: 24px;
  padding: 14px 28px;
  background: var(--gc-surface);
  border: 1px solid var(--gc-border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.gc-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.gc-hero-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.gc-hero-stat-label {
  font-size: 12px;
  color: var(--gc-muted);
}

/* ── Grid & Cards ── */
.gc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.gc-card {
  position: relative;
  background: var(--gc-card);
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius);
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  animation: gc-fade-up 0.6s ease both;
}

.gc-card:nth-child(1) { animation-delay: 0.05s; }
.gc-card:nth-child(2) { animation-delay: 0.1s; }
.gc-card:nth-child(3) { animation-delay: 0.15s; }
.gc-card:nth-child(4) { animation-delay: 0.2s; }
.gc-card:nth-child(n+5) { animation-delay: 0.25s; }

@keyframes gc-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.gc-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--gc-shadow), 0 0 40px var(--gc-glow);
}

.gc-card-cover {
  position: relative;
  height: 168px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gc-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 11, 20, 0.85) 100%);
  pointer-events: none;
}

.gc-card-cover--casual { background: linear-gradient(135deg, #1e3a5f 0%, #312e81 50%, #4c1d95 100%); }
.gc-card-cover--puzzle { background: linear-gradient(135deg, #134e4a 0%, #115e59 50%, #0f766e 100%); }
.gc-card-cover--arcade { background: linear-gradient(135deg, #7c2d12 0%, #9a3412 50%, #c2410c 100%); }
.gc-card-cover--default { background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%); }

.gc-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gc-card:hover .gc-card-cover img {
  transform: scale(1.06);
}

.gc-placeholder {
  font-size: 56px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.gc-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.gc-card-body {
  padding: 20px;
}

.gc-card-body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gc-card-body h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.gc-card-body h2 a:hover {
  color: var(--gc-primary-light);
}

.gc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--gc-muted);
}

.gc-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gc-muted);
}

.gc-play-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gc-play-count::before {
  content: "▶";
  font-size: 8px;
  opacity: 0.7;
}

.gc-desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gc-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--gc-primary) 0%, #4f46e5 100%);
  color: #fff;
  border-radius: var(--gc-radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.gc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
  filter: brightness(1.08);
}

.gc-btn::after {
  content: "→";
  transition: transform 0.2s;
}

.gc-btn:hover::after {
  transform: translateX(3px);
}

.gc-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--gc-muted);
  background: var(--gc-surface);
  border: 1px dashed var(--gc-border);
  border-radius: var(--gc-radius);
}

.gc-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* ── Play Page ── */
.gc-test-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 14px;
  line-height: 1.5;
}

.gc-test-banner strong {
  color: #fbbf24;
}

.gc-test-banner code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 12px;
}

.gc-test-banner a {
  margin-left: auto;
  color: #fbbf24;
  text-decoration: none;
  font-weight: 600;
}

.gc-test-banner a:hover {
  text-decoration: underline;
}

.gc-btn-test {
  margin-top: 8px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

.gc-btn-test:hover {
  background: rgba(251, 191, 36, 0.2);
}

.gc-play-header {
  margin-bottom: 28px;
}

.gc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px 12px;
  color: var(--gc-muted);
  text-decoration: none;
  font-size: 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.gc-back:hover {
  color: #fff;
  background: var(--gc-surface);
}

.gc-play-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.gc-play-title-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gc-play-host-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.gc-play-title-row h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gc-play-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gc-tag {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gc-primary-light);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
}

.gc-play-desc {
  margin: 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gc-muted);
}

.gc-play-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.gc-play-stage {
  position: relative;
  background: #0a0f1a;
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius);
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

.gc-play-stage::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.gc-iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
  display: block;
  background: #070b14;
  vertical-align: top;
}

.gc-leaderboard {
  background: var(--gc-card);
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius);
  padding: 20px;
  backdrop-filter: blur(16px);
  position: sticky;
  top: 20px;
}

.gc-leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.gc-leaderboard h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.gc-leaderboard-count {
  font-size: 12px;
  color: var(--gc-muted);
  padding: 3px 8px;
  background: var(--gc-surface);
  border-radius: 6px;
}

.gc-leaderboard ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gc-leaderboard li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: var(--gc-radius-sm);
  font-size: 14px;
  background: var(--gc-surface);
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.gc-leaderboard li:hover {
  background: var(--gc-surface-hover);
  border-color: var(--gc-border);
}

.gc-leaderboard li.gc-rank-1 {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.06));
  border-color: rgba(251, 191, 36, 0.25);
}

.gc-leaderboard li.gc-rank-2 {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(100, 116, 139, 0.06));
  border-color: rgba(148, 163, 184, 0.2);
}

.gc-leaderboard li.gc-rank-3 {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.12), rgba(146, 64, 14, 0.06));
  border-color: rgba(180, 83, 9, 0.2);
}

.gc-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-weight: 700;
  font-size: 13px;
  color: var(--gc-muted);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}

.gc-rank-1 .gc-rank { color: #fbbf24; background: rgba(251, 191, 36, 0.15); }
.gc-rank-2 .gc-rank { color: #cbd5e1; background: rgba(148, 163, 184, 0.15); }
.gc-rank-3 .gc-rank { color: #d97706; background: rgba(217, 119, 6, 0.15); }

.gc-player {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.gc-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gc-accent);
}

.gc-empty-row {
  text-align: center;
  color: var(--gc-muted) !important;
  font-size: 13px;
  padding: 24px 12px !important;
  background: transparent !important;
  border: none !important;
}

@media (max-width: 900px) {
  .gc-play-layout {
    grid-template-columns: 1fr;
  }

  .gc-leaderboard {
    position: static;
  }

  .gc-hero-stats {
    gap: 16px;
    padding: 12px 20px;
  }
}
