:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-strong: #10131a;
  --text: #171a21;
  --muted: #646b7a;
  --line: #dfe4ee;
  --teal: #0d9488;
  --pink: #e8487a;
  --amber: #f4b740;
  --blue: #3269d8;
  --shadow: 0 18px 42px rgba(26, 31, 44, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.1), transparent 28rem),
    linear-gradient(315deg, rgba(232, 72, 122, 0.08), transparent 26rem),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1160px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  padding: 0.8rem 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--pink), var(--amber) 48%, var(--teal));
  box-shadow: 0 12px 26px rgba(232, 72, 122, 0.22);
}

.site-nav,
.site-footer nav,
.tool-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav a,
.site-footer a,
.back-link {
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a {
  padding: 0.6rem 0.75rem;
}

.site-nav a:hover,
.site-footer a:hover,
.back-link:hover {
  color: var(--text);
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 1fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  min-height: min(560px, calc(100vh - 118px));
  padding: clamp(1rem, 3vw, 2rem) 0 2rem;
}

.home-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3rem, 7vw, 6.6rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.home-copy p:not(.eyebrow) {
  max-width: 36rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.hero-art {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.game-section {
  padding: 1rem 0 5rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.game-card {
  position: relative;
  display: grid;
  min-height: 282px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(26, 31, 44, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: var(--shadow);
}

.game-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-body {
  display: grid;
  gap: 0.25rem;
  align-content: center;
  min-height: 86px;
  padding: 1rem;
}

.game-title {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 850;
}

.game-meta,
.game-source,
.status-line {
  color: var(--muted);
  font-size: 0.92rem;
}

.play-chip {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0.35rem 0.72rem;
  color: #ffffff;
  background: var(--surface-strong);
  font-size: 0.84rem;
  font-weight: 850;
}

.player-layout {
  display: grid;
  gap: 1rem;
  padding: 1rem 0 4rem;
}

.player-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.player-header h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.72);
}

.player-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.game-label {
  margin: 0;
  font-weight: 850;
}

.game-source {
  margin: 0.15rem 0 0;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(50, 105, 216, 0.45);
  background: #f3f7ff;
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.player-frame-shell {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  background: #0d1117;
}

.player-frame-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0d1117;
}

.status-line {
  min-height: 1.8rem;
  margin: 0;
  padding: 0.35rem 0.9rem 0.7rem;
}

.legal-page {
  padding: 2rem 0 5rem;
}

.legal-content,
.contact-card {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(26, 31, 44, 0.08);
}

.legal-content {
  padding: clamp(1.25rem, 4vw, 3rem);
}

.contact-card {
  padding: clamp(1.25rem, 5vw, 3.4rem);
}

.legal-content h1,
.contact-card h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.legal-content h2 {
  margin: 2rem 0 0.55rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.legal-content p,
.contact-card p {
  color: #3f4654;
}

.legal-content a,
.contact-card a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.contact-email {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  background: #eef5ff;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  padding: 0.35rem 0.2rem;
}

@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .player-header,
  .player-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-art {
    max-height: 360px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-frame-shell {
    min-height: 320px;
  }
}

@media (max-width: 520px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1160px);
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    padding: 0.5rem 0.55rem;
  }

  h1 {
    font-size: clamp(2.55rem, 16vw, 4rem);
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .player-frame-shell {
    min-height: 260px;
  }

  .tool-buttons {
    width: 100%;
  }
}
