:root {
  --bg-top: #fff5cf;
  --bg-bottom: #dff5ff;
  --paper: rgba(255, 255, 255, 0.86);
  --paper-strong: #fffefc;
  --text: #21304a;
  --muted: #5f6f89;
  --line: rgba(33, 48, 74, 0.12);
  --yellow: #ffd54f;
  --orange: #ff8a3d;
  --red: #f35b51;
  --blue: #4d8dff;
  --mint: #5bcf9b;
  --shadow: 0 24px 60px rgba(72, 85, 120, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    linear-gradient(126deg, rgba(255, 213, 79, 0.42) 0%, rgba(255, 213, 79, 0) 31%),
    linear-gradient(305deg, rgba(77, 141, 255, 0.25) 0%, rgba(77, 141, 255, 0) 34%),
    linear-gradient(18deg, transparent 0 43%, rgba(91, 207, 155, 0.16) 43% 55%, transparent 55% 100%),
    linear-gradient(168deg, #fffaf0 0%, #f6fbff 48%, #e8f7ff 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.58) 0 2px,
    transparent 2px 22px
  );
}

.app-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  width: min(1320px, calc(100% - 28px));
  margin: 20px auto;
}

.sidebar,
.hero,
.panel,
.content-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  display: grid;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand__mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.8rem;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  transform: rotate(-8deg);
}

.brand__eyebrow,
.eyebrow,
.sidebar__label,
.content-card__tag {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
}

.brand h1,
.hero h2,
.panel h3,
.content-card h4 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  line-height: 1;
}

.brand h1 {
  font-size: 1.4rem;
}

.sidebar__nav {
  display: grid;
  gap: 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  transform: translateX(4px);
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.92), rgba(255, 138, 61, 0.92));
  border-color: rgba(243, 91, 81, 0.26);
}

.nav-link__icon {
  font-size: 1.3rem;
}

.sidebar__note {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(91, 207, 155, 0.18), rgba(77, 141, 255, 0.08));
  border: 1px solid rgba(91, 207, 155, 0.22);
}

.sidebar__note p {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

.content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
}

.content--wide {
  width: min(1320px, calc(100% - 28px));
  margin: 20px auto;
}

.details-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 20px auto 40px;
  display: grid;
  gap: 22px;
}

.back-link {
  width: fit-content;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.details-hero {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.details-hero__cover {
  position: relative;
  min-height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.7), transparent 12%),
    linear-gradient(135deg, var(--orange), var(--yellow) 54%, #ffef9f);
}

.details-hero__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.08), rgba(18, 24, 38, 0.45));
}

.details-hero__kicker {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.details-hero__content {
  display: grid;
  align-content: start;
  gap: 14px;
}

.details-hero__content h1 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.details-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.details-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  padding: clamp(34px, 6vw, 76px);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.97) 0 52%, rgba(235, 247, 255, 0.94) 52% 72%, rgba(255, 246, 212, 0.94) 72% 100%);
}

.hero::before {
  content: "✦";
  position: absolute;
  right: 16%;
  top: 18%;
  color: var(--blue);
  font-size: 2.8rem;
  opacity: 0.48;
  transform: rotate(14deg);
}

.hero::after {
  content: none;
}

.eyebrow {
  color: var(--red);
}

.hero h2 {
  margin-top: 18px;
  max-width: 14ch;
  font-size: clamp(2.7rem, 5.4vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.hero h2 span {
  display: block;
  color: var(--blue);
  background: linear-gradient(135deg, var(--blue), #7c6dff 55%, var(--red));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__text {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero__logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 620px);
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 22px 22px rgba(31, 51, 97, 0.18));
  animation: logo-float 5s ease-in-out infinite;
}

.hero__logo-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  justify-self: center;
  isolation: isolate;
}

.hero__logo-wrap .hero__logo {
  width: 100%;
}

.logo-shape {
  position: absolute;
  z-index: -1;
  display: block;
  box-shadow: 0 14px 28px rgba(40, 64, 111, 0.16);
  animation: shape-drift 5s ease-in-out infinite;
}

.logo-shape--circle {
  width: 94px;
  height: 94px;
  top: 2%;
  right: 5%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
}

.logo-shape--square {
  width: 82px;
  height: 82px;
  left: 4%;
  bottom: 7%;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--mint), #86e8c4);
  transform: rotate(-14deg);
  animation-delay: 0.8s;
}

.logo-shape--diamond {
  width: 58px;
  height: 58px;
  right: 15%;
  bottom: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), #8a72ff);
  transform: rotate(45deg);
  animation-delay: 1.5s;
}

.logo-shape--dot {
  width: 30px;
  height: 30px;
  left: 18%;
  top: 8%;
  border: 8px solid var(--red);
  border-radius: 50%;
  box-shadow: none;
  animation-delay: 2.1s;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(77, 141, 255, 0.2);
  border-radius: 999px;
  color: #385888;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(77, 141, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero__badge span {
  color: var(--orange);
}

.hero__lead,
.panel__hint,
.content-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero__lead {
  margin-top: 22px;
  max-width: 62ch;
  font-size: 1.05rem;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-xl);
}

#games-panel {
  background:
    linear-gradient(128deg, rgba(77, 141, 255, 0.13) 0 28%, transparent 28% 100%),
    linear-gradient(312deg, rgba(91, 207, 155, 0.15) 0 24%, transparent 24% 100%),
    rgba(248, 253, 255, 0.92);
}

#greetings-panel {
  background:
    linear-gradient(132deg, rgba(255, 138, 61, 0.13) 0 25%, transparent 25% 100%),
    linear-gradient(308deg, rgba(243, 91, 81, 0.12) 0 27%, transparent 27% 100%),
    rgba(255, 251, 246, 0.94);
}

#games-panel::before,
#greetings-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.72) 0 2px,
    transparent 2px 24px
  );
}

.panel__header,
.panel .card-grid {
  position: relative;
  z-index: 1;
}

.panel__header {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.card-grid--fixed {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.content-card {
  --card-accent: var(--blue);
  --card-accent-soft: rgba(77, 141, 255, 0.14);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 100%;
  border: 1px solid color-mix(in srgb, var(--card-accent) 28%, white);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(48, 68, 112, 0.13), 0 3px 0 var(--card-accent-soft);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

#games-panel .content-card:nth-child(3n + 1) {
  --card-accent: #4d8dff;
  --card-accent-soft: rgba(77, 141, 255, 0.16);
}

#games-panel .content-card:nth-child(3n + 2) {
  --card-accent: #28af7d;
  --card-accent-soft: rgba(40, 175, 125, 0.16);
}

#games-panel .content-card:nth-child(3n) {
  --card-accent: #ff824f;
  --card-accent-soft: rgba(255, 130, 79, 0.16);
}

#greetings-panel .content-card:nth-child(odd) {
  --card-accent: #f05f86;
  --card-accent-soft: rgba(240, 95, 134, 0.16);
}

#greetings-panel .content-card:nth-child(even) {
  --card-accent: #9a68e8;
  --card-accent-soft: rgba(154, 104, 232, 0.16);
}

.content-card:hover {
  transform: translateY(-7px) rotate(-0.35deg);
  border-color: color-mix(in srgb, var(--card-accent) 46%, white);
  box-shadow: 0 25px 46px rgba(48, 68, 112, 0.2), 0 5px 0 var(--card-accent-soft);
}

.content-card__cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.7), transparent 12%),
    linear-gradient(135deg, var(--orange), var(--yellow) 54%, #ffef9f);
  background-size: cover;
  background-position: center;
  border-bottom: 4px solid var(--card-accent);
  transition: background-size 300ms ease, filter 300ms ease;
}

.content-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.02) 32%, rgba(18, 24, 38, 0.7));
  transition: opacity 220ms ease;
}

.content-card:hover .content-card__cover::after {
  opacity: 0.76;
}

.content-card__cover-overlay {
  position: absolute;
  inset: auto 16px 16px 16px;
  z-index: 1;
  display: flex;
}

.content-card__cover-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: color-mix(in srgb, var(--card-accent) 72%, rgba(30, 38, 61, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 8px 20px rgba(20, 28, 48, 0.2);
  backdrop-filter: blur(8px);
}


.content-card__body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 18px;
  background:
    linear-gradient(145deg, var(--card-accent-soft), transparent 40%),
    rgba(255, 255, 255, 0.96);
}

.card-actions {
  margin-top: auto;
}

.content-card__tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--card-accent) 78%, #24314a);
  background: var(--card-accent-soft);
}

.content-card h4 {
  font-size: 1.45rem;
  min-height: 2.9rem;
}

.content-card p {
  min-height: 5.1rem;
}

.card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 72%, #6654d9));
  border: 0;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 10px 20px var(--card-accent-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.card-button::after {
  content: "→";
  margin-left: 9px;
  font-size: 1.15rem;
  transition: transform 180ms ease;
}

.card-button:hover,
.card-button:focus-visible {
  filter: saturate(1.12) brightness(1.03);
  box-shadow: 0 14px 26px var(--card-accent-soft);
  transform: translateY(-2px);
}

.card-button:hover::after,
.card-button:focus-visible::after {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .content-card,
  .card-button,
  .card-button::after,
  .content-card__cover::after {
    transition: none;
  }

  .content-card:hover,
  .card-button:hover,
  .card-button:focus-visible {
    transform: none;
  }
}

.game-frame {
  width: 100%;
  min-height: 78vh;
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.panel[hidden] {
  display: none;
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes shape-drift {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -7px;
  }
}

@media (max-width: 980px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

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

  .hero__logo {
    grid-row: 1;
    width: min(82%, 540px);
  }

  .hero__logo-wrap {
    grid-row: 1;
    width: min(82%, 540px);
  }

}

@media (max-width: 720px) {
  .app-layout {
    width: min(100% - 18px, 1320px);
    margin: 10px auto 18px;
  }

  .sidebar,
  .hero,
  .panel {
    padding: 18px;
  }

  .hero {
    min-height: 0;
    padding: 28px 22px;
  }

  .hero::before {
    right: 10%;
    top: 9%;
    font-size: 2rem;
  }

  .hero h2 {
    max-width: none;
    font-size: clamp(2.7rem, 13vw, 4.1rem);
  }

  .hero__logo {
    width: min(96%, 430px);
  }

  .hero__logo-wrap {
    width: min(96%, 430px);
  }

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

  .logo-shape--circle {
    width: 64px;
    height: 64px;
  }

  .logo-shape--square {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  .logo-shape--diamond {
    width: 42px;
    height: 42px;
  }

}
