* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1d1d1f; background: linear-gradient(135deg, #eef7ef, #f7f3e8 52%, #edf5ff); }
header { background: #302b35; border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; z-index: 10; }
.container { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.topbar { min-height: 68px; display: flex; align-items: center; gap: 2rem; }
.logo { align-items: center; color: #fff; display: inline-flex; flex: 0 0 auto; font-size: 0; font-weight: 800; text-decoration: none; }
.logo img { background: #6aaeff; border-radius: 8px; height: 58px; object-fit: cover; width: 68px; }
nav { display: flex; flex-wrap: wrap; gap: 2.2rem; }
nav a { color: #fff; font-size: 1.12rem; font-weight: 800; letter-spacing: 0; text-decoration: none; }
nav a:hover { color: #9be27d; }
main { padding: 2rem 0 3rem; }
.game-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; }
.game-head p { color: #575b63; max-width: 620px; line-height: 1.6; margin-top: .5rem; }
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.frame-wrap { position: relative; background: #f5f5f7; border: 2px solid #dfe7dc; border-radius: 14px; overflow: hidden; height: 650px; box-shadow: 0 18px 44px rgba(35, 70, 34, .12); }
iframe { width: 100%; height: 100%; border: 0; display: block; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: #6d727a; background: rgba(245,245,247,.92); font-size: 1.2rem; font-weight: 800; pointer-events: none; }
.loading.is-hidden { display: none; }
.side { background: rgba(255,255,255,.92); border: 1px solid #dfe7dc; border-radius: 14px; padding: 1rem; max-height: 650px; overflow: auto; }
.side h2 { font-size: 1.15rem; margin-bottom: .8rem; }
.game-list { display: grid; gap: .75rem; }
.game-card { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: .7rem; align-items: center; color: inherit; text-decoration: none; background: #fff; border: 1px solid #e2e9dd; border-radius: 11px; padding: .5rem; }
.game-card.is-active { border-color: #34c759; box-shadow: 0 0 0 2px rgba(52,199,89,.16); }
.thumb { aspect-ratio: 1; border-radius: 8px; background: #eef3ea; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-card strong { display: block; font-size: .95rem; margin-bottom: .25rem; }
.game-card span { color: #60646c; display: block; font-size: .82rem; line-height: 1.3; }
.home-link { background: #1f7a35; border-radius: 999px; color: #fff; display: inline-block; font-weight: 900; padding: .75rem 1rem; text-decoration: none; white-space: nowrap; }
.game-details { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; margin-top: 1.25rem; }
.details-copy, .details-card { background: rgba(255,255,255,.92); border: 1px solid #dfe7dc; border-radius: 14px; padding: 1.25rem; box-shadow: 0 12px 30px rgba(35,70,34,.08); }
.game-details h2 { font-size: 1.45rem; margin: 1rem 0 .65rem; }
.game-details h2:first-child { margin-top: 0; }
.game-details p, .game-details li { color: #565b62; line-height: 1.65; }
.game-details ul, .game-details ol { margin-left: 1.25rem; }
.details-card img { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; display: block; object-fit: cover; margin-bottom: 1rem; }
details { background: #f8fbf5; border: 1px solid #e1eadc; border-radius: 10px; margin-top: .65rem; padding: .85rem; }
summary { cursor: pointer; font-weight: 900; }
details p { margin-top: .55rem; }
footer { background: #1d1d1f; color: rgba(255,255,255,.82); padding: 2rem 0; text-align: center; }
@media (max-width: 900px) {
  .topbar, .game-head { align-items: flex-start; flex-direction: column; }
  .topbar { gap: .9rem; padding-bottom: 1rem; }
  .logo img { height: 48px; width: 56px; }
  nav { flex-direction: column; gap: .85rem; }
  nav a { font-size: 1rem; }
  .play-layout { grid-template-columns: 1fr; }
  .game-details { grid-template-columns: 1fr; }
  .frame-wrap { height: 520px; }
  .side { max-height: none; }
  .game-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .container { width: min(100% - 24px, 1240px); }
  .frame-wrap { height: 360px; }
  .game-list { display: flex; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem .2rem; }
  .game-card { flex: 0 0 230px; }
}
