/* Flingisenflong Games – home page (the UI kit is /shared/toy-ui.css) */

html { background: #dff4ff; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 60% 40% at 15% 8%, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 18%, rgba(255, 255, 255, 0.75), transparent 70%),
    linear-gradient(#9fdcff 0, #cdeeff 600px, #f3fbff 1200px);
}

main { flex: 1; width: min(1100px, 100%); margin: 0 auto; padding: 0 16px 48px; }

/* ------------------------------------------------------------ header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  /* two "buttons" on the right of the tile */
  background:
    radial-gradient(circle at 27px 16px, #fff 2.6px, transparent 3.2px),
    radial-gradient(circle at 31px 23px, #fff 2.6px, transparent 3.2px),
    linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 55%),
    var(--orange);
  box-shadow: 0 4px 0 var(--orange-dark), inset 0 2px 0 rgba(255, 255, 255, 0.6);
  position: relative;
}
/* d-pad on the left of the tile */
.brand-mark::before, .brand-mark::after {
  content: '';
  position: absolute;
  border-radius: 2px;
  background: #fff;
}
.brand-mark::before { left: 7px; top: 18px; width: 13px; height: 4px; }
.brand-mark::after { left: 11.5px; top: 13.5px; width: 4px; height: 13px; }
.brand-name { font-size: 20px; font-weight: 600; }
.brand-name b { color: var(--orange-dark); font-weight: 700; }

.account { display: flex; align-items: center; gap: 10px; }
.account .btn { width: auto; min-height: 42px; font-size: 17px; padding: 6px 18px; border-radius: 14px; white-space: nowrap; }
.account .btn::after { top: 4px; left: 10px; right: 10px; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  font-weight: 600;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}
.avatar {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}

/* ------------------------------------------------------------ hero */

.hero { text-align: center; padding: 28px 0 36px; }
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 8vw, 76px);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 7px #3b2a20;
  paint-order: stroke fill;
  text-shadow: 0 6px 0 #3b2a20, 0 11px 0 rgba(0, 0, 0, 0.15);
}
.hero h1 span { color: var(--gold); }
.hero p { max-width: 560px; margin: 22px auto 0; font-size: 19px; color: var(--ink-soft); }

/* ------------------------------------------------------------ games */

.section-title { text-align: left; margin: 0 0 16px 4px; font-size: 26px; }
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 22px;
}

.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.07), 0 18px 40px rgba(30, 60, 100, 0.18);
  transition: transform 0.15s;
}
.game-card:hover { transform: translateY(-4px); }
.game-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background: #8fd6ff center / cover no-repeat;
}
.game-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px; flex: 1; }
.game-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.game-title h3 { margin: 0; font-size: 26px; font-weight: 700; }
.game-title span { font-size: 14px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.game-desc { color: var(--ink-soft); line-height: 1.4; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; font-size: 13px; font-weight: 600; color: var(--blue-dark); background: #e6f6ff; border-radius: 999px; }
.game-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.game-stat { padding: 8px 6px; text-align: center; background: #faf5f0; border-radius: 14px; }
.game-stat span { display: block; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }
.game-stat b { font-size: 20px; }
.game-hint { font-size: 14px; color: var(--ink-soft); }
.game-card .btn { margin-top: auto; text-decoration: none; display: flex; align-items: center; justify-content: center; }

.game-card.soon {
  justify-content: center;
  align-items: center;
  min-height: 260px;
  padding: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.45);
  border: 3px dashed rgba(59, 42, 32, 0.18);
  box-shadow: none;
  color: var(--ink-soft);
}
.game-card.soon:hover { transform: none; }
.game-card.soon .soon-icon { font-size: 40px; }
.game-card.soon h3 { margin: 8px 0 4px; font-size: 22px; color: var(--ink); }

.site-footer { padding: 24px 16px 32px; text-align: center; font-size: 14px; color: var(--ink-soft); }

/* ------------------------------------------------------------ auth dialog */

.auth-dialog {
  width: min(400px, calc(100% - 32px));
  padding: 26px 22px 22px;
  border: none;
  border-radius: 28px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.08), 0 24px 60px rgba(30, 40, 90, 0.35);
}
.auth-dialog[open] { display: flex; flex-direction: column; gap: 12px; animation: pop 0.3s cubic-bezier(0.2, 1.5, 0.4, 1); }
.auth-dialog::backdrop { background: rgba(40, 30, 80, 0.35); backdrop-filter: blur(3px); }
.dialog-close-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.icon-btn.close { width: 38px; height: 38px; font-size: 15px; }

@media (max-width: 560px) {
  .brand-name { font-size: 17px; }
  .account .btn { padding: 6px 12px; font-size: 15px; }
  .user-chip .name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
