:root {
  --bg-top: #ffeaf6;
  --bg-bottom: #eefbf3;
  --panel: rgba(255, 255, 255, 0.84);
  --text-main: #5f4966;
  --text-soft: #957996;
  --pink: #ff72b1;
  --pink-deep: #ff4c99;
  --mint: #c8f6dd;
  --peach: #ffc792;
  --gold: #ffe079;
  --shadow: 0 28px 48px rgba(225, 137, 177, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.72), transparent 18%),
    radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.64), transparent 17%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.page-blobs span {
  position: fixed;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  filter: blur(4px);
  pointer-events: none;
  animation: float 4.8s ease-in-out infinite;
}

.page-blobs span:nth-child(1) {
  top: 28px;
  left: -18px;
}

.page-blobs span:nth-child(2) {
  top: 120px;
  right: 36px;
  width: 76px;
  height: 76px;
  animation-delay: 0.6s;
}

.page-blobs span:nth-child(3) {
  right: -22px;
  bottom: 90px;
  animation-delay: 1s;
}

.app-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.page-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.page-nav a,
.page-footer a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
}

.page-nav a {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(255, 214, 235, 0.88);
  box-shadow: 0 10px 18px rgba(225, 137, 177, 0.1);
}

.language-switch {
  display: inline-flex;
  margin-left: auto;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(255, 214, 235, 0.88);
}

.lang-button {
  min-width: 72px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.lang-button:hover {
  transform: translateY(-1px);
}

.lang-button:active {
  transform: scale(0.97);
}

.lang-button.active {
  color: white;
  background: linear-gradient(180deg, var(--pink), var(--pink-deep));
}

.hero-card,
.game-panel {
  background: var(--panel);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
  margin-bottom: 18px;
}

.eyebrow,
.mini-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.15rem, 4vw, 3.4rem);
  line-height: 0.96;
}

.subtitle {
  margin-top: 12px;
  max-width: 520px;
  line-height: 1.55;
  color: var(--text-soft);
}

.hero-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-icons span {
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.72),
    0 14px 22px rgba(236, 149, 190, 0.14);
}

.game-panel {
  padding: 22px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.stats-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  min-width: 126px;
  padding: 13px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 252, 0.96));
  border: 2px solid rgba(255, 214, 235, 0.92);
}

.label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.stat-pill strong {
  font-size: 1.35rem;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: scale(0.97);
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.control-button {
  border-radius: 18px;
  font-weight: 700;
}

.primary-button {
  padding: 14px 18px;
  color: white;
  background: linear-gradient(180deg, var(--pink), var(--pink-deep));
  box-shadow: 0 14px 24px rgba(255, 76, 153, 0.24);
}

.secondary-button {
  padding: 14px 18px;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 243, 248, 0.95));
  border: 2px solid rgba(255, 214, 234, 0.9);
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.board-card,
.side-card {
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 250, 244, 0.82));
  border: 2px solid rgba(255, 232, 198, 0.9);
}

.board-card {
  padding: 18px;
}

.board-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 660px;
  padding: 20px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 255, 0.94), rgba(255, 247, 228, 0.94)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.68), transparent 44%);
}

#game-board {
  width: min(100%, 420px);
  aspect-ratio: 1 / 2;
  border-radius: 28px;
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.82),
    0 22px 36px rgba(190, 140, 169, 0.18);
  background: linear-gradient(180deg, #fffaff, #fff5df);
}

.message-card {
  position: absolute;
  width: min(320px, calc(100% - 42px));
  padding: 22px 20px;
  border-radius: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 214, 235, 0.9);
  box-shadow: 0 18px 28px rgba(225, 136, 176, 0.18);
}

.message-card.hidden {
  display: none;
}

.message-tag {
  margin-bottom: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.message-card h2 {
  margin-bottom: 8px;
  font-size: 1.55rem;
}

.message-card p {
  line-height: 1.55;
  color: var(--text-soft);
}

.side-card {
  padding: 20px;
}

.preview-card,
.tips-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 2px solid rgba(255, 234, 205, 0.92);
}

.preview-card {
  margin-bottom: 14px;
}

#next-board {
  display: block;
  width: 120px;
  height: 120px;
  margin-top: 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 251, 255, 0.95), rgba(255, 245, 228, 0.95));
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.78);
}

.tips-card + .tips-card {
  margin-top: 14px;
}

.tips-title {
  margin-bottom: 8px;
  font-weight: 700;
}

.tips-card p + p {
  margin-top: 6px;
}

.mobile-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  grid-template-areas:
    ". rotate ."
    "left down right"
    ". drop .";
  gap: 12px;
  margin-top: 18px;
}

.control-button {
  height: 64px;
  font-size: 1.35rem;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 238, 246, 0.95));
  border: 2px solid rgba(255, 214, 234, 0.92);
  box-shadow: 0 12px 18px rgba(233, 146, 181, 0.14);
}

.control-button.rotate {
  grid-area: rotate;
}

.control-button.left {
  grid-area: left;
}

.control-button.down {
  grid-area: down;
}

.control-button.right {
  grid-area: right;
}

.control-button.drop {
  grid-area: drop;
}

.info-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.info-card {
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 232, 198, 0.9);
  box-shadow: var(--shadow);
}

.info-label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.info-card h2 {
  margin: 0 0 12px;
}

.info-card p,
.info-card li {
  color: var(--text-soft);
  line-height: 1.6;
}

.info-card ul {
  margin: 0;
  padding-left: 20px;
}

.info-card li + li {
  margin-top: 8px;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 2px 4px 0;
  color: var(--text-soft);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

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

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

  .board-wrap {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 18px, 100%);
    padding: 18px 0 28px;
  }

  .hero-card,
  .game-panel {
    border-radius: 28px;
  }

  .hero-card {
    padding: 22px 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-icons {
    justify-content: flex-start;
  }

  .game-panel,
  .board-card,
  .side-card {
    padding: 16px;
  }

  .board-wrap {
    padding: 14px;
  }

  #game-board {
    width: min(100%, 340px);
  }

  .page-footer {
    padding-left: 2px;
    padding-right: 2px;
  }
}
