/* Poker da Galera · landing page (create / join). Builds on base.css tokens. */

/* ------------------------------------------------------------------ hero: the felt seen from above */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px var(--gutter) 88px;
  text-align: center;
  isolation: isolate;
}
.hero-felt {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -46%;
  width: max(640px, 150vw);
  height: 136%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 62%, #6a1a2c, var(--felt-1) 30%, var(--felt-2) 70%);
  border: 12px solid var(--felt-rail);
  box-shadow: inset 0 0 0 1px var(--gold), inset 0 -40px 80px rgba(0, 0, 0, .35), var(--shadow-2);
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }

.hero-cards { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.mini-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 54px;
  border-radius: 5px;
  background: var(--card-face);
  color: var(--card-black);
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .6);
  font-family: var(--font-ui);
  line-height: 1;
  animation: pg-deal var(--t-slow) var(--ease-out) both;
}
.mini-card b { font-size: 17px; font-weight: 700; }
.mini-card i { font-style: normal; font-size: 16px; margin-top: 2px; }
.mini-card.red { color: var(--card-red); }
.mini-card:first-child { --rot: -8deg; transform: rotate(-8deg) translateY(2px); animation-delay: 120ms; }
.mini-card:last-child { --rot: 7deg; transform: rotate(7deg) translateY(2px); animation-delay: 220ms; }
@keyframes pg-deal {
  from { opacity: 0; transform: translateY(-36px) rotate(0deg) scale(.9); }
  to { opacity: 1; transform: rotate(var(--rot)) translateY(2px); }
}

.logo {
  color: var(--gold);
  font: 700 clamp(2.1rem, 9vw, 4.25rem)/1.02 var(--font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
  animation: pg-fade var(--t-slow) ease both;
}
.hero-tag {
  max-width: 34ch;
  margin: 14px auto 0;
  color: #e6d9c6;
  font-size: var(--fs-md);
  line-height: 1.5;
}

/* phones: the join panel is far below the create form */
.hero-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 14px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: rgba(11, 11, 13, .38);
  box-shadow: inset 0 0 0 1px var(--gold-a45);
  color: var(--gold-hi);
  font: 600 var(--fs-sm)/1 var(--font-ui);
  text-decoration: none;
  transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.hero-jump:hover { background: rgba(11, 11, 13, .55); box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-hi); }
.hero-jump svg { width: 16px; height: 16px; }
.panel-join { scroll-margin-top: 16px; }

/* ------------------------------------------------------------------ panels layout */
.lobby {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1080px;
  margin: -48px auto 0;
  padding: 0 var(--gutter);
  align-items: start;
}

/* game picker: six radio tiles */
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.game-opt { position: relative; display: block; cursor: pointer; }
.game-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.game-opt .game-name,
.game-opt .game-meta { position: relative; display: block; pointer-events: none; }
.game-opt .game-name { color: var(--ink); font: 600 var(--fs-sm)/1.25 var(--font-ui); }
.game-opt .game-meta { margin-top: 3px; color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.3; }
.game-opt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.game-opt { padding: 12px 12px 11px; min-height: 64px; }
.game-opt:hover::before { box-shadow: inset 0 0 0 1px #4a4a52; }
.game-opt:has(input:checked)::before {
  background: linear-gradient(160deg, rgba(90, 20, 36, .55), rgba(43, 7, 16, .55));
  box-shadow: inset 0 0 0 1px var(--gold);
}
.game-opt:has(input:checked) .game-name { color: var(--gold-hi); }
.game-opt:has(input:checked) .game-meta { color: #c9b9a3; }
.game-opt:has(input:focus-visible)::before { outline: 2px solid var(--gold); outline-offset: 2px; }

/* "Mais opções" */
.more {
  min-width: 0;
  margin-top: 20px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  background: rgba(15, 15, 18, .6);
}
.more summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  border-radius: 12px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary:hover .more-title { color: var(--gold-hi); }
.more-text { flex: 1; min-width: 0; }
.more-title { display: block; color: var(--gold); font-weight: 600; font-size: var(--fs-sm); transition: color var(--t-fast) ease; }
.more-sum {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.more-chev { flex: none; width: 18px; height: 18px; color: var(--gold); transition: transform var(--t-med) var(--ease-out); }
.more[open] .more-chev { transform: rotate(180deg); }
.more[open] .more-sum { display: none; }
.more-body { display: flex; flex-direction: column; gap: 20px; padding: 6px 14px 18px; animation: pg-more var(--t-med) var(--ease-out) both; }
@keyframes pg-more { from { opacity: 0; transform: translateY(-6px); } }

.more-body > .field, .more-body > .field-row { margin: 0; }
.field-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-inline .label { margin: 0; }

.rebuy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.rebuy-grid .field { margin: 0; }
.rebuy-grid .label { font-size: 11px; }
.rebuy-grid.is-off { opacity: .4; pointer-events: none; }

.panel-create .btn-gold { margin-top: 24px; }
.panel-create .form-error + .btn { margin-top: 16px; }

/* join */
.code-input {
  height: 60px;
  text-align: center;
  font: 600 1.6rem/1 var(--font-ui);
  letter-spacing: .32em;
  text-indent: .32em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.code-input::placeholder { color: var(--ink-3); letter-spacing: .32em; }
.panel-join .btn { margin-top: 16px; }
.panel-join .form-error + .btn { margin-top: 16px; }

.recent { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.recent-list { display: grid; gap: 8px; }
.recent-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: var(--r-md);
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow var(--t-fast) ease, color var(--t-fast) ease;
}
.recent-list a:hover { box-shadow: inset 0 0 0 1px var(--gold-a45); color: var(--gold-hi); }
.recent-list .code-chip { box-shadow: none; padding: 0; }
.recent-list svg { width: 16px; height: 16px; color: var(--gold); }

.foot { padding: 40px var(--gutter) 48px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }

/* ------------------------------------------------------------------ wider screens */
@media (min-width: 560px) {
  .avatar-grid { gap: 8px; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* short landscape phones: the hero must not fill the whole first screen */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { padding: 28px var(--gutter) 76px; }
  .hero-cards { display: none; }
  .logo { font-size: clamp(2rem, 7vh, 3rem); }
  .hero-tag { margin-top: 8px; }
}
@media (min-width: 900px) {
  .hero-jump { display: none; }
  .hero { padding: 72px var(--gutter) 112px; }
  .hero-felt { top: -60%; width: min(1500px, 120vw); height: 150%; }
  .mini-card { width: 44px; height: 62px; }
  .mini-card b { font-size: 20px; }
  .mini-card i { font-size: 18px; }
  .hero-tag { font-size: var(--fs-lg); }
  .lobby {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: -64px;
    padding: 0 32px;
  }
  .panel { padding: 32px; }
  .panel-join { position: sticky; top: 24px; }
}
