:root {
  --green-950: #043c29;
  --green-800: #075b39;
  --green-600: #12854f;
  --yellow: #ffd229;
  --orange: #f59b23;
  --ink: #17372c;
  --mist: #f1f7f2;
  --white: #fff;
  --shadow: 0 16px 38px rgba(4, 60, 41, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--mist); font-family: "Nunito", system-ui, sans-serif; }
button, iframe { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 99; padding: 10px 16px; color: var(--green-950); background: white; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { position: relative; overflow: hidden; color: white; background: linear-gradient(128deg, var(--green-950), var(--green-800) 62%, var(--green-600)); }
.site-header::after { content: ""; position: absolute; right: -80px; bottom: -150px; width: 420px; height: 420px; border: 45px solid rgba(255,210,41,.12); border-radius: 50%; }
.header-inner { width: min(1180px, calc(100% - 40px)); min-height: 300px; margin: auto; display: flex; align-items: center; gap: 72px; padding: 44px 0 58px; position: relative; z-index: 2; }
.brand { width: 285px; height: auto; max-height: 120px; object-fit: contain; }
.header-copy { max-width: 660px; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--yellow); font-size: .78rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.25rem, 4vw, 3.8rem); line-height: 1; letter-spacing: -.035em; }
.header-copy p { max-width: 600px; margin-bottom: 0; color: rgba(255,255,255,.86); font-size: 1.08rem; line-height: 1.55; }
.road-mark { position: absolute; z-index: 1; width: 190px; height: 16px; background: var(--yellow); border-radius: 3px; opacity: .85; transform: rotate(-28deg); }
.road-mark-one { right: 9%; top: 54px; }
.road-mark-two { right: 20%; bottom: 35px; width: 110px; opacity: .35; }

main { min-height: 55vh; }
.games-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 62px 0 74px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; color: var(--green-950); font-size: clamp(1.7rem, 3vw, 2.55rem); letter-spacing: -.025em; }
.section-heading p { max-width: 360px; margin-bottom: 3px; color: #587164; line-height: 1.5; }
.eyebrow.green { color: var(--green-600); }
.game-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.game-card { grid-column: span 2; display: block; min-width: 0; padding: 0; overflow: hidden; color: var(--ink); text-align: left; background: white; border: 2px solid transparent; border-radius: 18px; box-shadow: 0 8px 24px rgba(4,60,41,.1); cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.game-card:nth-child(4) { grid-column: 2 / span 2; }
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.game-card:focus-visible { outline: 4px solid rgba(255,210,41,.5); outline-offset: 3px; }
.game-card.active { border-color: var(--yellow); box-shadow: var(--shadow); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--green-800), var(--green-600)); }
.thumb::before { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.28); font-size: 4rem; font-weight: 900; letter-spacing: -.08em; }
.thumb:has(img:not([hidden]))::before { display: none; }
.thumb img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s ease; }
.game-card:hover .thumb img { transform: scale(1.025); }
.thumb.missing-cover::after { content: "Capa em preparação"; position: absolute; inset: auto 0 24px; color: white; text-align: center; font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.thumb.missing-cover::before { display: grid; }
.card-body { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 18px 20px; }
.card-body small { display: block; margin-bottom: 3px; color: #648075; font-weight: 700; }
.card-body strong { display: block; color: var(--green-950); font-size: 1.05rem; line-height: 1.18; }
.play-icon { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; padding-left: 2px; color: var(--green-950); background: var(--yellow); border-radius: 50%; box-shadow: 0 3px 0 #d79908; font-size: .9rem; }

.player-section { padding: 0 20px 74px; }
.player-section[hidden] { display: none; }
.player-shell { width: min(1280px, 100%); margin: auto; overflow: hidden; background: var(--green-950); border-radius: 20px; box-shadow: 0 24px 60px rgba(2,50,18,.28); }
.player-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 20px 14px 26px; color: white; }
.now-playing { color: var(--yellow); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.player-header h2 { margin: 2px 0 0; font-size: 1.35rem; }
.player-actions { display: flex; gap: 10px; }
.icon-button, .close-button { min-height: 42px; color: white; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; cursor: pointer; }
.icon-button { width: 44px; font-size: 1.4rem; }
.close-button { padding: 0 16px; font-weight: 800; }
.close-button span { margin-right: 5px; font-size: 1.4rem; vertical-align: -1px; }
.icon-button:hover, .close-button:hover { background: rgba(255,255,255,.18); }
.game-frame { position: relative; aspect-ratio: 16 / 9; background: #052b1e; }
.game-frame iframe { width: 100%; height: 100%; display: block; border: 0; opacity: 0; transition: opacity .3s; }
.game-frame iframe.loaded { opacity: 1; }
#game-iframe:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  opacity: 1;
  background: #052b1e;
}
#game-iframe:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  opacity: 1;
  background: #052b1e;
}
.loader { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; color: white; background: #052b1e; }
.loader span { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.25); border-top-color: var(--yellow); border-radius: 50%; animation: spin .75s linear infinite; }
.loader p { margin: 14px 0 0; color: rgba(255,255,255,.8); font-weight: 700; }
.loader.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px max(20px, calc((100% - 1180px)/2)); color: rgba(255,255,255,.78); background: var(--green-950); }
footer p { margin: 0; }
footer a { color: white; text-underline-offset: 3px; }
.credit { font-size: .86rem; }

@media (max-width: 900px) {
  .header-inner { gap: 38px; }
  .brand { width: 230px; }
  .game-card { grid-column: span 3; }
  .game-card:nth-child(4) { grid-column: span 3; }
  .game-card:last-child { grid-column: 2 / span 4; }
}
@media (max-width: 680px) {
  .header-inner { min-height: 0; flex-direction: column; align-items: center; gap: 24px; padding: 28px 0 50px; }
  .header-copy { text-align: center; }
  .header-copy p { font-size: .98rem; }
  .games-section { width: min(100% - 28px, 500px); padding: 42px 0 52px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 12px; }
  .game-grid { grid-template-columns: 1fr; gap: 16px; }
  .game-card, .game-card:nth-child(4), .game-card:last-child { grid-column: 1; }
  .card-body { min-height: 82px; }
  .player-section { padding: 0 8px 50px; }
  .player-shell { border-radius: 14px; }
  .player-header { min-height: 74px; padding: 12px 12px 12px 16px; }
  .player-header h2 { max-width: 210px; font-size: 1rem; }
  .close-button { width: 42px; padding: 0; font-size: 0; }
  .close-button span { margin: 0; font-size: 1.5rem; }
  footer { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
