/* ============================================================
   games.css — LizzieMagie Custom Board Games Page
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --purple:       #667eea;
  --purple-dark:  #764ba2;
  --orange:       #ff7043;
  --orange-light: #ffa726;
  --teal:         #26c6da;
  --yellow:       #ffd740;
  --green:        #66bb6a;

  --text-dark:    #1a1a2e;
  --text-body:    #444;
  --text-muted:   #777;
  --bg-light:     #f8f9ff;
  --white:        #ffffff;

  --radius-sm:    10px;
  --radius-md:    18px;
  --radius-lg:    28px;

  --shadow-sm:    0 2px 12px rgba(0,0,0,0.07);
  --shadow-md:    0 8px 30px rgba(0,0,0,0.10);
  --shadow-lg:    0 16px 50px rgba(0,0,0,0.14);

  --font-headline: 'Kabel', 'Futura', 'Century Gothic', 'Arial Rounded MT Bold', sans-serif;
  --font-body:     'Roboto', 'Arial', sans-serif;
}

/* ---------- Base Reset ---------- */
.gm-body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

.gm-body *, .gm-body *::before, .gm-body *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.gm-body a { text-decoration: none; color: inherit; }
.gm-body img { max-width: 100%; height: auto; display: block; }
.gm-body ul, .gm-body ol { list-style: none; }

/* ---------- Scroll-animation ---------- */
.gm-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.gm-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.gm-reveal-delay-1 { transition-delay: 0.1s; }
.gm-reveal-delay-2 { transition-delay: 0.2s; }
.gm-reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================================
   NAV
   ============================================================ */
.gm-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 70px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.gm-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gm-nav-logo img {
  height: 36px;
  width: auto;
}

.gm-nav-logo-text {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gm-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.gm-nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.2s;
}
.gm-nav-links a:hover { color: var(--purple); }

.gm-nav-user {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--purple);
}

.gm-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s;
}
.gm-nav-btn:hover { opacity: 0.88; transform: translateY(-1px); }

.gm-nav-btn-signin {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
}

.gm-nav-btn-logout {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid #ddd;
}

/* ============================================================
   HERO
   ============================================================ */
.gm-hero {
  padding: 130px 5% 80px;
  background: linear-gradient(160deg, #f8f5ff 0%, #fff 60%);
  text-align: center;
}

.gm-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(102,126,234,0.1);
  color: var(--purple);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.gm-hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  animation: gm-pulse 2s infinite;
}

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

.gm-hero-headline {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.18;
  margin-bottom: 20px;
}

.gm-hero-headline em {
  font-style: normal;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gm-hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.gm-hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.gm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(102,126,234,0.35);
}
.gm-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102,126,234,0.45);
}

.gm-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--purple);
  padding: 13px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--purple);
  transition: background 0.2s, color 0.2s;
}
.gm-btn-secondary:hover {
  background: var(--purple);
  color: var(--white);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.gm-section {
  padding: 80px 5%;
}

.gm-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.gm-section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 12px;
}

.gm-section-title {
  font-family: var(--font-headline);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 14px;
}

.gm-section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 48px;
  line-height: 1.7;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.gm-how {
  background: var(--bg-light);
}

.gm-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.gm-step {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.gm-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.gm-step-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.gm-step-title {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.gm-step-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   MY GAMES
   ============================================================ */
.gm-my-games {
  border-top: 1px solid #eef0f8;
}

.gm-games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.gm-games-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.gm-game-card {
  background: var(--white);
  border: 1px solid #eef0f8;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.gm-game-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gm-game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gm-game-card-name {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  flex: 1;
  margin-right: 12px;
}

.gm-game-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.gm-status-pending    { background: #fff8e1; color: #f57f17; }
.gm-status-generating { background: #e8f5e9; color: #2e7d32; }
.gm-status-ready      { background: #e8eaf6; color: #3949ab; }
.gm-status-error      { background: #fce4ec; color: #c62828; }

.gm-game-card-meta {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.gm-game-card-actions {
  display: flex;
  gap: 8px;
}

.gm-card-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
  text-align: center;
}
.gm-card-btn:hover { opacity: 0.85; }

.gm-card-btn-view {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
}

.gm-card-btn-create {
  background: #f3f0ff;
  color: var(--purple);
}

/* Empty state */
.gm-empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
}

.gm-empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
}

.gm-empty-state h3 {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.gm-empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Login prompt */
.gm-login-prompt {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(135deg, #f8f5ff, #fff);
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(102,126,234,0.2);
}

.gm-login-prompt-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.gm-login-prompt h3 {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.gm-login-prompt p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Loading skeleton */
.gm-loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.gm-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #eef0f8;
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: gm-spin 0.8s linear infinite;
}

@keyframes gm-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.gm-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.6);
  padding: 36px 5%;
  text-align: center;
  font-size: 0.85rem;
}

.gm-footer a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.gm-footer a:hover { color: var(--white); }

.gm-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  .gm-hero {
    padding: 110px 5% 60px;
  }

  .gm-nav-links {
    gap: 14px;
  }

  .gm-games-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gm-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
