/* Game page (game/index.htm): a dark "poster" — Penelope in the middle, the
   five love interests in the shards of a broken mirror, a parchment note, a round badge, the
   golden title and a row of pictograms. Loaded after app.css. */
@font-face { font-family: "Cinzel Decorative"; font-weight: 700; font-display: swap; src: url("/fonts/cinzel-decorative-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel Decorative"; font-weight: 900; font-display: swap; src: url("/fonts/cinzel-decorative-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 500; font-display: swap; src: url("/fonts/cinzel-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url("/fonts/cinzel-latin-700-normal.woff2") format("woff2"); }

.game-page {
  --gold: #e8c27a;
  --gold-deep: #b98a3c;
  --rose: #ff5c9d;
  --wine: #7d0f3a;
  color: #f7e6ee;
  background: #1a0616;
}

.game-page .container {
  position: relative;
  padding: 0;
}

/* the menu of the site, light on the dark poster */
.game-page .topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: auto;
  box-sizing: border-box;
  padding: 16px 60px;
  background: linear-gradient(180deg, rgba(20, 4, 18, 0.85), rgba(20, 4, 18, 0));
}

.game-page .topbar .nav-link,
.game-page .topbar .logo {
  color: #f7e6ee;
}

.game-page .topbar .nav-link:hover,
.game-page .topbar .nav-link.active {
  color: var(--gold);
}

.game-page .topbar .nav-link::after {
  background: var(--gold);
}

.gm-main {
  font-family: "Cinzel", "Times New Roman", serif;
}

/* ------------------------------ poster ------------------------------ */
.gm-poster {
  position: relative;
  overflow: hidden;
  padding: 150px 40px 46px;
  background:
    radial-gradient(60% 40% at 50% 38%, rgba(255, 92, 157, 0.28), transparent 70%),
    radial-gradient(40% 30% at 12% 20%, rgba(120, 70, 220, 0.35), transparent 70%),
    radial-gradient(40% 30% at 88% 22%, rgba(232, 194, 122, 0.22), transparent 70%),
    linear-gradient(180deg, #23081f 0%, #3a0a2a 45%, #4b0b2c 70%, #1a0616 100%);
}

/* falling rose petals */
.gm-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gm-petal {
  position: absolute;
  top: -40px;
  width: 22px;
  height: 14px;
  border-radius: 80% 10% 80% 10%;
  background: linear-gradient(135deg, #ff4d7d, #a80f3c);
  box-shadow: 0 0 8px rgba(255, 77, 125, 0.5);
  animation: gm-fall 11s linear infinite;
}

.gm-petal-1 { left: 6%; animation-delay: -1s; }
.gm-petal-2 { left: 17%; animation-delay: -6s; width: 16px; height: 10px; }
.gm-petal-3 { left: 29%; animation-delay: -3s; animation-duration: 14s; }
.gm-petal-4 { left: 41%; animation-delay: -9s; width: 14px; height: 9px; }
.gm-petal-5 { left: 53%; animation-delay: -4.500s; animation-duration: 13s; }
.gm-petal-6 { left: 64%; animation-delay: -7.500s; }
.gm-petal-7 { left: 73%; animation-delay: -2s; width: 16px; height: 10px; animation-duration: 15s; }
.gm-petal-8 { left: 82%; animation-delay: -10s; }
.gm-petal-9 { left: 91%; animation-delay: -5s; animation-duration: 12s; }
.gm-petal-10 { left: 97%; animation-delay: -8s; width: 14px; height: 9px; }

@keyframes gm-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.95; }
  100% { transform: translate(-120px, 1250px) rotate(540deg); opacity: 0.2; }
}

/* parchment note with its wax seal, top left */
.gm-note {
  position: absolute;
  left: 4%;
  top: 118px;
  z-index: 4;
  width: 200px;
  padding: 16px 16px 20px;
  transform: rotate(-5deg);
  text-align: center;
  color: #4a2412;
  background: linear-gradient(135deg, #f3dcae, #e2bf85 60%, #cfa66a);
  border-radius: 3px 10px 4px 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), inset 0 0 22px rgba(120, 70, 20, 0.35);
}

.gm-note p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gm-seal {
  position: absolute;
  left: 14px;
  bottom: -18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff5a6e, #a3081f 65%, #6d0414);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 5px rgba(255, 255, 255, 0.12);
}

/* round badge inside a turning cog, top right */
.gm-badge {
  position: absolute;
  right: 5%;
  top: 116px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 164px;
  height: 164px;
  border-radius: 50%;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: radial-gradient(circle, #5a1040 0%, #2a0722 70%);
  box-shadow: 0 0 0 3px var(--rose), 0 0 26px rgba(255, 92, 157, 0.7), inset 0 0 20px rgba(255, 92, 157, 0.45);
  transition: transform 0.3s ease;
}

.gm-badge::before {
  content: "";
  position: absolute;
  inset: -16px;
  border: 7px dashed var(--gold-deep);
  border-radius: 50%;
  opacity: 0.8;
  animation: gm-turn 30s linear infinite;
}

.gm-badge span {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--rose);
}

.gm-badge:hover {
  transform: scale(1.07) rotate(4deg);
}

@keyframes gm-turn {
  to { transform: rotate(360deg); }
}

/* stage: Penelope on her throne, the five love interests in mirror shards */
.gm-stage {
  position: relative;
  width: 1160px;
  max-width: 100%;
  height: 930px;
  margin: 0 auto;
}

.gm-halo {
  position: absolute;
  left: 50%;
  top: 170px;
  width: 700px;
  height: 700px;
  margin-left: -350px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 120, 170, 0.45), rgba(255, 120, 170, 0));
}

.gm-figure {
  position: absolute;
  left: 50%;
  top: 150px;
  z-index: 2;
  height: 780px;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

/* the shards stay under Penelope (z-index 1), also when hovered or clicked */
.gm-shards {
  position: absolute;
  inset: 0;
  z-index: 1;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(190, 210, 255, 0.35));
}

.gm-panel {
  position: absolute;
  display: block;
  padding: 3px;
  box-sizing: border-box;
  /* bevelled edge of the glass */
  background: linear-gradient(135deg, #ffffff 0%, #cfdcff 22%, #7f78b8 48%, #f3e3b8 70%, #ffffff 100%);
  -webkit-clip-path: var(--cut);
  clip-path: var(--cut);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.gm-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  -webkit-clip-path: var(--cut);
  clip-path: var(--cut);
  filter: saturate(0.92) contrast(1.05) brightness(0.96);
}

/* reflections on the glass */
.gm-panel::before,
.gm-bit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.28) 46%, rgba(255, 255, 255, 0) 53%, rgba(255, 255, 255, 0) 78%, rgba(255, 255, 255, 0.35) 100%),
    linear-gradient(200deg, rgba(150, 190, 255, 0.22), rgba(255, 150, 200, 0.12));
  pointer-events: none;
}

/* a gleam crosses the glass under the pointer */
.gm-panel::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -70%;
  z-index: 1;
  width: 45%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.gm-panel:hover::after,
.gm-panel:focus-visible::after {
  left: 130%;
  transition: left 0.8s ease;
}

.gm-panel span {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  bottom: 13%;
  width: max-content;
  margin: 0 auto;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(30, 6, 26, 0.72);
}

.gm-panel:hover,
.gm-panel:focus-visible {
  filter: brightness(1.15);
}

.gm-p3 { --cut: polygon(22% 0, 80% 4%, 100% 34%, 88% 100%, 14% 96%, 0 30%); left: 50%; top: -58px; width: 290px; height: 370px; margin-left: -150px; }
.gm-p3 img { object-position: 50% 0; }
.gm-p3 span { display: none; }
.gm-p1 { --cut: polygon(10% 6%, 86% 0, 100% 52%, 78% 100%, 0 82%); left: 96px; top: 30px; width: 262px; height: 340px; transform: rotate(-6deg); }
.gm-p2 { --cut: polygon(0 12%, 70% 0, 100% 40%, 84% 100%, 12% 92%); left: -14px; top: 356px; width: 250px; height: 320px; transform: rotate(4deg); }
.gm-p4 { --cut: polygon(14% 0, 90% 6%, 100% 82%, 22% 100%, 0 52%); right: 96px; top: 30px; width: 262px; height: 340px; transform: rotate(6deg); }
.gm-p5 { --cut: polygon(30% 0, 100% 12%, 88% 92%, 16% 100%, 0 40%); right: -14px; top: 356px; width: 250px; height: 320px; transform: rotate(-4deg); }

.gm-p1:hover, .gm-p1:focus-visible { transform: rotate(-6deg) scale(1.06); }
.gm-p2:hover, .gm-p2:focus-visible { transform: rotate(4deg) scale(1.06); }
.gm-p3:hover, .gm-p3:focus-visible { transform: translateY(-10px); }
.gm-p4:hover, .gm-p4:focus-visible { transform: rotate(6deg) scale(1.06); }
.gm-p5:hover, .gm-p5:focus-visible { transform: rotate(-4deg) scale(1.06); }

/* small empty splinters of the mirror */
.gm-bit {
  position: absolute;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.85), rgba(170, 190, 255, 0.35) 40%, rgba(255, 170, 210, 0.3) 70%, rgba(255, 255, 255, 0.7));
  animation: gm-glint 5s ease-in-out infinite;
}

.gm-bit-1 { left: 372px; top: 66px; width: 46px; height: 70px; clip-path: polygon(40% 0, 100% 30%, 60% 100%, 0 60%); }
.gm-bit-2 { right: 368px; top: 40px; width: 40px; height: 62px; clip-path: polygon(0 20%, 80% 0, 100% 70%, 30% 100%); animation-delay: -1.500s; }
.gm-bit-3 { left: 250px; top: 372px; width: 54px; height: 44px; clip-path: polygon(0 0, 100% 40%, 50% 100%); animation-delay: -3s; }
.gm-bit-4 { right: 246px; top: 380px; width: 50px; height: 48px; clip-path: polygon(100% 0, 60% 100%, 0 30%); animation-delay: -2.200s; }
.gm-bit-5 { left: 40px; top: 250px; width: 36px; height: 60px; clip-path: polygon(50% 0, 100% 60%, 20% 100%, 0 30%); animation-delay: -4s; }
.gm-bit-6 { right: 34px; top: 262px; width: 38px; height: 56px; clip-path: polygon(30% 0, 100% 40%, 60% 100%, 0 70%); animation-delay: -0.800s; }

@keyframes gm-glint {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* title */
.gm-title {
  position: relative;
  z-index: 3;
  margin-top: -190px;
  padding-top: 90px;
  text-align: center;
  background: linear-gradient(180deg, rgba(58, 10, 42, 0), rgba(48, 8, 34, 0.94) 42%);
}

.gm-title h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 20px;
  max-width: 900px;
  margin: 0 auto;
  font-family: "Cinzel Decorative", "Cinzel", serif;
  line-height: 1;
  text-transform: uppercase;
}

.gm-t1 {
  flex-basis: 100%;
  font-size: 104px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--gold);
  background: linear-gradient(180deg, #fff3cf 0%, #f0cf8a 38%, #b98a3c 62%, #f6dda2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.gm-t2 {
  font-size: 46px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.45), 0 3px 8px rgba(0, 0, 0, 0.6);
}

.gm-t3 {
  font-size: 112px;
  font-weight: 900;
  color: var(--rose);
  background: linear-gradient(180deg, #ffd0e4 0%, #ff6fae 45%, #d81f72 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 92, 157, 0.75));
}

.gm-thorn {
  display: block;
  width: 600px;
  max-width: 90%;
  margin: 4px auto 0;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
}

.gm-thorn circle {
  fill: #b3123f;
  stroke: #ff6f93;
}

.gm-thorn path:last-child {
  stroke: #ff9db8;
}

.gm-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 760px;
  max-width: 94%;
  margin: 14px auto 0;
  padding: 12px 0;
  border-top: 1px solid rgba(232, 194, 122, 0.55);
  border-bottom: 1px solid rgba(232, 194, 122, 0.55);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f4e3cf;
}

.gm-sub i {
  font-style: normal;
  color: var(--gold);
}

/* pictograms */
.gm-feats {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 56px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.gm-feats li {
  width: 128px;
  text-align: center;
  font-size: 12.500px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f7e6ee;
}

.gm-feats svg {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  fill: none;
  stroke: #ff8fba;
  stroke-width: 2.200;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 92, 157, 0.8));
  transition: transform 0.3s ease;
}

.gm-feats svg .fill {
  fill: rgba(255, 92, 157, 0.55);
}

.gm-feats li:hover svg {
  transform: translateY(-6px) scale(1.08);
}

/* ------------------------------ modes ------------------------------ */
.gm-modes {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 20px 30px;
  text-align: center;
}

.gm-modes h2 {
  margin: 0 0 26px;
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-size: 32px;
  color: var(--gold);
}

.gm-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: left;
}

.gm-mode {
  padding: 24px 26px;
  border: 1px solid rgba(232, 194, 122, 0.55);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(90, 16, 64, 0.75), rgba(40, 8, 34, 0.9));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
}

.gm-hard {
  border-color: var(--rose);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4), 0 0 22px rgba(255, 92, 157, 0.35);
}

.gm-mode h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: #fff;
}

.gm-hard h3 {
  color: var(--rose);
}

.gm-mode p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.6;
  color: #f0d9e4;
}

.gm-gauge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--rose);
}

.gm-gauge i {
  font-style: normal;
  font-size: 18px;
}

.gm-gauge b {
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.gm-gauge u {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--gold));
}

.gm-full { width: 92%; }
.gm-low { width: 6%; }

.gm-cta {
  display: inline-block;
  margin-top: 30px;
  padding: 13px 34px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #2a0722;
  background: linear-gradient(180deg, #fff3cf, #e8c27a 55%, #b98a3c);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(232, 194, 122, 0.45);
  transition: transform 0.25s ease;
}

.gm-cta:hover {
  transform: translateY(-3px) scale(1.04);
}

/* languages without Latin capitals: no forced spacing */
html[lang="ar"] .gm-main,
html[lang="ko"] .gm-main,
html[lang="zh"] .gm-main,
html[lang="ja"] .gm-main {
  font-family: "Segoe UI", Tahoma, "Malgun Gothic", "Microsoft YaHei", "Yu Gothic", sans-serif;
}

html[lang="ar"] .gm-main *:not(h1):not(h1 *) {
  letter-spacing: 0;
}

@media (prefers-reduced-motion: reduce) {
  .gm-petal,
  .gm-bit,
  .gm-badge::before {
    animation: none;
  }
}
