:root {
  --bg: #fff8fa;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --line: rgba(96, 171, 154, 0.18);
  --text: #263238;
  --muted: #6d7a78;
  --pink: #ff9fb2;
  --pink-deep: #f07d99;
  --green: #60ab9a;
  --green-deep: #3d8f7c;
  --shadow: 0 28px 60px rgba(64, 68, 78, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --sidebar-width: 88px;
  --sidebar-expanded: 244px;
  --topbar-height: 88px;
  --content-max: 1520px;
}

body.gamecoz-theme {
  background:
    radial-gradient(circle at top left, rgba(255, 159, 178, 0.22), transparent 24%),
    radial-gradient(circle at top right, rgba(96, 171, 154, 0.2), transparent 28%),
    linear-gradient(180deg, #fffdfd 0%, #fff7f9 56%, #f9fffd 100%);
  color: var(--text);
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.gamecoz-theme #page,
body.gamecoz-theme .site {
  background: transparent;
}

body.gamecoz-theme .site-header,
body.gamecoz-theme .site-footer,
body.gamecoz-theme .site-info,
body.gamecoz-theme .footer-widgets,
body.gamecoz-theme .inside-site-info,
body.gamecoz-theme .generate-back-to-top,
body.gamecoz-theme .main-title,
body.gamecoz-theme .site-description,
body.gamecoz-theme #site-navigation,
body.gamecoz-theme #mobile-menu-control-wrapper {
  display: none !important;
}

body.gamecoz-theme .site.grid-container.container,
body.gamecoz-theme .site-content,
body.gamecoz-theme #primary,
body.gamecoz-theme #main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.gamecoz-shell {
  position: relative;
  min-height: 100vh;
  width: 100%;
}

.gamecoz-main {
  min-width: 0;
  width: 100%;
  padding: 24px 24px 56px calc(var(--sidebar-width) + 42px);
  overflow-x: clip;
}

.gamecoz-main > * {
  width: min(100%, var(--content-max));
  max-width: 100%;
  min-width: 0;
}

.sidebar {
  position: fixed;
  top: 18px;
  left: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: var(--sidebar-width);
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  box-shadow: 0 16px 44px rgba(255, 159, 178, 0.12);
  overflow: hidden;
  transition: width 220ms ease, box-shadow 220ms ease, transform 220ms ease, opacity 180ms ease;
  z-index: 20;
}

.sidebar:hover,
.sidebar:focus-within {
  width: var(--sidebar-expanded);
  box-shadow: 0 24px 56px rgba(96, 171, 154, 0.18);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item,
.user-card__avatar,
.button,
.stat-card strong,
.summary-card strong {
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
}

.nav-item__icon,
.nav-item svg {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
}

.nav-item span,
.sidebar__footer {
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 140ms ease, transform 180ms ease;
  white-space: nowrap;
}

.sidebar:hover .nav-item span,
.sidebar:focus-within .nav-item span,
.sidebar:hover .sidebar__footer,
.sidebar:focus-within .sidebar__footer {
  opacity: 1;
  transform: translateX(0);
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  transform: translateX(2px);
}

.nav-item.is-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 159, 178, 0.28), rgba(96, 171, 154, 0.2));
}

.sidebar__footer {
  margin-top: auto;
  padding: 16px 14px 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.sidebar__footer p {
  margin: 0 0 4px;
  color: var(--text);
  font-weight: 600;
}

.topbar,
.hero__copy,
.hero__stats,
.history-panel,
.category,
.page-intro,
.filter-panel,
.detail-card,
.summary-card,
.play-stage,
.game-summary,
.empty-state {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 14px;
  display: grid;
  grid-template-areas: "logo search user";
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 340px) minmax(160px, 220px);
  align-items: center;
  gap: 18px;
  min-height: var(--topbar-height);
  padding: 14px 18px;
  margin-bottom: 22px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.78);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: rgba(248, 252, 251, 0.95);
  box-shadow: inset 0 0 0 1px rgba(96, 171, 154, 0.1);
}

.menu-toggle__icon,
.menu-toggle svg {
  width: 26px;
  height: 30px;
}

.logo {
  grid-area: logo;
  display: flex;
  align-items: center;
}

.logo img {
  width: 90%;
  max-width: 240px;
  height: auto;
}

.search {
  grid-area: search;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  justify-self: center;
  padding: 0 16px;
  height: 58px;
  border-radius: 20px;
  background: rgba(248, 252, 251, 0.95);
  box-shadow: inset 0 0 0 1px rgba(96, 171, 154, 0.08);
}

.search__icon,
.search svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
}

.search input:focus {
  outline: 0;
}

.search__submit {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink-deep), var(--green));
}

.user-card {
  grid-area: user;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.user-card__avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(145deg, var(--green), var(--pink));
}

.user-card__avatar--image {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

.user-card__avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-card__meta {
  min-width: 0;
}

.user-card__meta strong {
  display: block;
  margin-bottom: 2px;
}

.user-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero,
.page-intro,
.game-layout,
.detail-grid {
  display: grid;
  gap: 18px;
}

.hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  margin-bottom: 30px;
}

.gamecoz-main > section {
  margin-bottom: 24px;
}

.hero__copy,
.play-stage,
.category,
.history-panel,
.page-intro,
.detail-card {
  padding: 24px;
}

.category,
.history-panel,
.page-intro,
.detail-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.category::before,
.history-panel::before,
.page-intro::before,
.detail-card::before,
.hero__copy::before,
.play-stage::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 159, 178, 0.34), rgba(96, 171, 154, 0.16), transparent);
}

.hero h1,
.page-intro h1,
.play-stage h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.96;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--green-deep);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero__lead,
.filter-panel p,
.description-block p,
.detail-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero__actions,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__copy {
  display: grid;
  align-content: space-between;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 18px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--pink-deep), var(--green));
}

.button--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.hero__stats,
.game-summary {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.stat-card,
.summary-card {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,255,253,.82));
}

.stat-card strong,
.summary-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 2rem;
}

.stat-card span,
.summary-card span {
  color: var(--muted);
}

.history-grid,
.game-grid {
  display: grid;
  gap: 16px;
}

.history-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.history-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.history-card img,
.game-card img {
  width: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.game-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}


.game-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: 0 12px 24px rgba(31, 38, 46, 0.06), inset 0 0 0 1px var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.game-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.game-card__media {
  position: relative;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(31, 38, 46, 0.12), inset 0 0 0 1px rgba(96, 171, 154, 0.18);
}

.game-card img {
  aspect-ratio: 16 / 11;
  padding: 10px 10px 0;
}

.game-card__preview {
  position: absolute;
  inset: 10px 10px 0;
  overflow: hidden;
  border-radius: 18px;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 180ms ease, transform 220ms ease;
  background: radial-gradient(circle at top, rgba(96, 171, 154, 0.18), rgba(18, 27, 29, 0.94));
  pointer-events: none;
}

.game-card__preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  transform: scale(1.02);
  transform-origin: center;
  pointer-events: none;
}

body.gamecoz-page-home .game-card.has-preview:hover .game-card__preview,
body.gamecoz-page-home .game-card.has-preview:focus-within .game-card__preview,
.game-card.has-preview.is-preview-ready .game-card__preview {
  opacity: 1;
  transform: scale(1);
}

body.gamecoz-page-home .game-card.has-preview:hover img,
body.gamecoz-page-home .game-card.has-preview:focus-within img {
  opacity: 0.08;
}

.game-card__body {
  padding: 16px 16px 18px;
  position: relative;
}

.game-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.game-card__meta span,
.chip,
.history-card__meta span,
.section-meta {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(96, 171, 154, 0.1);
  color: var(--green-deep);
  font-size: 0.76rem;
  font-weight: 700;
}

.game-layout {
  grid-template-columns: minmax(0, 1.4fr) 300px;
  margin-bottom: 24px;
  align-items: start;
}

.play-stage__screen {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111b1d;
}

.play-stage__screen img {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.play-stage__embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #0c1415;
}

.play-badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--pink-deep), var(--green));
}

.play-stage__info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
}

.play-stage__info > * {
  min-width: 0;
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.sort-select,
.description-block {
  display: grid;
  gap: 10px;
}

.page-intro {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.75fr);
  align-items: start;
}

.filter-panel {
  padding: 18px 20px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  min-width: 0;
}

.section-heading > * {
  min-width: 0;
}

.section-heading h2,
.detail-card h2 {
  margin: 0;
  font-size: 20px;
}

.section-heading a {
  color: var(--green-deep);
  font-weight: 700;
  text-decoration: none;
}

.game-card h3,
.history-card strong {
  margin: 0;
  line-height: 1.28;
}

.game-card h3 {
  display: -webkit-box;
  font-size: 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.history-card__body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.history-card__body strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.history-card__body strong {
  -webkit-line-clamp: 2;
}

.history-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.info-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.info-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.detail-grid--account {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-avatar {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
}

.account-meta p {
  margin: 0 0 8px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-form {
  display: grid;
  gap: 14px;
}

.account-form__field {
  display: grid;
  gap: 8px;
}

.account-form__field span,
.account-form__check span {
  font-size: 0.9rem;
  font-weight: 700;
}

.account-form__field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(96, 171, 154, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
}

.account-form__check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-form__check input {
  width: 18px;
  height: 18px;
}

.account-notice {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
}

.account-notice p {
  margin: 0;
}

.account-notice--error {
  background: rgba(255, 159, 178, 0.14);
  color: #8f2e4d;
  box-shadow: inset 0 0 0 1px rgba(255, 159, 178, 0.24);
}

.account-notice--success {
  background: rgba(96, 171, 154, 0.14);
  color: #235a4f;
  box-shadow: inset 0 0 0 1px rgba(96, 171, 154, 0.22);
}

.sort-select select {
  padding: 14px 16px;
  border: 1px solid rgba(96, 171, 154, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
}

.description-block details {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.description-block summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
}

.empty-state {
  padding: 36px;
  text-align: center;
}

.empty-state--inline {
  margin-top: 16px;
}

.is-hidden {
  display: none !important;
}

body.gamecoz-page-search .category,
body.gamecoz-page-account .detail-grid--account,
body.gamecoz-page-account .page-intro {
  width: min(100%, var(--content-max));
  max-width: 100%;
}

@media (max-width: 1440px) {
  .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .gamecoz-main {
    padding-left: 108px;
  }

  .hero,
  .page-intro,
  .game-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 300px) auto;
  }

  .page-intro {
    grid-template-columns: 1fr;
  }

  .play-stage__info {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    top: 78px;
    left: 12px;
    bottom: 12px;
    width: min(280px, calc(100vw - 24px));
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
    pointer-events: none;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-item span,
  .sidebar__footer {
    opacity: 1;
    transform: none;
  }

  .gamecoz-main {
    padding: 18px 14px 32px;
  }

  .topbar {
    grid-template-areas: "menu logo search user";
    grid-template-columns: 48px minmax(92px, auto) minmax(0, 1fr) auto;
    padding: 14px;
    gap: 10px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .logo img {
    max-width: 132px;
  }

  .search {
    max-width: none;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
  }

  .search__submit {
    display: none;
  }

  .user-card__meta {
    display: none;
  }

  .user-card__avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 0.88rem;
  }

  .hero h1,
  .page-intro h1,
  .play-stage h1 {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
    line-height: 1.02;
  }

  .game-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__copy,
  .play-stage,
  .category,
  .history-panel,
  .page-intro,
  .detail-card {
    padding: 18px;
  }

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


  .hero-featured-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .topbar {
    grid-template-columns: 42px minmax(80px, auto) minmax(0, 1fr) 42px;
    min-height: 72px;
    padding: 12px;
  }

  .logo img {
    max-width: 108px;
  }

  .search {
    height: 42px;
    padding: 0 10px;
  }

  .search img {
    width: 16px;
    height: 16px;
  }

  .menu-toggle,
  .user-card__avatar {
    width: 42px;
    height: 42px;
  }

  .account-summary {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .hero-featured-grid {
    grid-template-columns: 1fr;
  }
}
