/* ==========================================================================
   Mosche Casino — Pastel Soft Theme & Gniotki (Squishy) Demo
   ========================================================================== */

:root {
  /* Pastel Palette Variables */
  --pastel-pink-soft: #fbcfe8;
  --pastel-pink: #f472b6;
  --pastel-pink-glow: rgba(244, 114, 182, 0.22);
  --pastel-pink-faint: rgba(244, 114, 182, 0.08);

  --pastel-cream-soft: #fef9c3;
  --pastel-cream: #fef08a;
  --pastel-cream-glow: rgba(254, 240, 138, 0.22);
  --pastel-cream-faint: rgba(254, 240, 138, 0.08);

  --pastel-lavender-soft: #f3e8ff;
  --pastel-lavender: #c084fc;
  --pastel-lavender-glow: rgba(192, 132, 252, 0.22);
  --pastel-lavender-faint: rgba(192, 132, 252, 0.08);

  --pastel-mint-soft: #d1fae5;
  --pastel-mint: #6ee7b7;
  --pastel-mint-glow: rgba(110, 231, 183, 0.22);
  --pastel-mint-faint: rgba(110, 231, 183, 0.08);

  --pastel-sky-soft: #e0f2fe;
  --pastel-sky: #7dd3fc;
  --pastel-sky-glow: rgba(125, 211, 252, 0.22);
  --pastel-sky-faint: rgba(125, 211, 252, 0.08);

  --pastel-peach-soft: #ffedd5;
  --pastel-peach: #fdba74;
  --pastel-peach-glow: rgba(253, 186, 116, 0.22);
  --pastel-peach-faint: rgba(253, 186, 116, 0.08);

  /* Active Theme Defaults (Sakura Pink default) */
  --active-accent: var(--pastel-pink);
  --active-soft: var(--pastel-pink-soft);
  --active-glow: var(--pastel-pink-glow);
  --active-faint: var(--pastel-pink-faint);

  /* Deep Velvet Dark Theme */
  --bg-deep: #0a0910;
  --surface-glass: rgba(255, 255, 255, 0.038);
  --surface-glass-hover: rgba(255, 255, 255, 0.065);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(244, 114, 182, 0.35);
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
}

body[data-page="gniotki"] {
  background:
    radial-gradient(circle at 18% 12%, var(--active-faint), transparent 42vw),
    radial-gradient(circle at 82% 24%, var(--pastel-lavender-faint), transparent 45vw),
    radial-gradient(circle at 50% 80%, var(--pastel-cream-faint), transparent 50vw),
    linear-gradient(180deg, #09080e 0%, #0d0b14 50%, #09080e 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
}

/* Stage Top Bar & Corner Actions */
.stage-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 14px;
  z-index: 10;
}

.stage-title {
  margin: 4px 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stage-corner-actions {
  position: static;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.stage-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.stage-icon-btn:hover {
  background: var(--active-faint);
  border-color: var(--active-accent);
  color: var(--active-accent);
  box-shadow: 0 0 16px var(--active-glow);
  transform: scale(1.08);
}

/* Hero Section */
.gniotki-hero {
  padding-bottom: 40px;
}

.gniotki-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--active-faint);
  border: 1px solid var(--active-glow);
  color: var(--active-accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  box-shadow: 0 0 20px -4px var(--active-glow);
}

.gniotki-hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 14px;
  background: linear-gradient(135deg, #ffffff 40%, var(--active-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gniotki-hero p.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 64ch;
  margin: 0 0 24px;
}

/* Playground Layout */
.gniotki-playground-grid {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
  padding-top: 28px;
}

/* Steamer Stage & Squishy */
.squishy-stage-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin-top: clamp(24px, 4vw, 40px);
  border-radius: 32px;
  padding: 36px 24px 30px;
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(28px);
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.squishy-stage-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.steamer-halo {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--active-glow) 0%, transparent 70%);
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  transition: background 0.4s ease;
}

/* Bamboo Steamer (Parownik) */
.steamer-selection-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.gniotek-nav-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  z-index: 10;
  flex-shrink: 0;
  user-select: none;
}

.gniotek-nav-arrow:hover:not(:disabled) {
  background: var(--active-faint);
  border-color: var(--active-accent);
  color: var(--active-accent);
  box-shadow: 0 0 18px var(--active-glow);
  transform: scale(1.12);
}

.gniotek-nav-arrow:active:not(:disabled) {
  transform: scale(0.92);
}

.gniotek-nav-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 540px) {
  .steamer-selection-row {
    gap: 6px;
  }
  .gniotek-nav-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
}

.bamboo-steamer-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}

/* Steam particles */
.steam-emitter {
  position: absolute;
  top: 15px;
  width: 100%;
  height: 60px;
  pointer-events: none;
}

.steam-cloud {
  position: absolute;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0;
  animation: float-steam 3.2s infinite ease-out;
}

.steam-cloud:nth-child(1) { left: 42%; animation-delay: 0s; }
.steam-cloud:nth-child(2) { left: 52%; animation-delay: 1.1s; }
.steam-cloud:nth-child(3) { left: 47%; animation-delay: 2.1s; }

@keyframes float-steam {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  30% { opacity: 0.55; }
  100% { transform: translateY(-70px) scale(2.6); opacity: 0; }
}

/* The Steamer Basket Base */
.steamer-basket {
  position: absolute;
  bottom: 24px;
  width: 290px;
  height: 100px;
  background: linear-gradient(180deg, #d4a373 0%, #bc8a5f 40%, #8a5a36 100%);
  border-radius: 50% 50% 48% 48% / 28px 28px 45px 45px;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.7),
    inset 0 3px 6px rgba(255, 255, 255, 0.25),
    inset 0 -6px 12px rgba(0, 0, 0, 0.4);
  border: 2px solid #e9c49a;
  z-index: 1;
}

.steamer-basket::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  height: 38px;
  border-radius: 50%;
  background: #a27047;
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.6);
}

.steamer-bamboo-slats {
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  height: 28px;
  border-radius: 50%;
  background: repeating-linear-gradient(
    90deg,
    #c49265,
    #c49265 10px,
    #93633e 10px,
    #93633e 12px
  );
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.4);
}

/* The Interactive Squishy Dumpling */
.squishy-target-wrap {
  position: relative;
  z-index: 5;
  width: 210px;
  height: 175px;
  cursor: grab;
  margin-bottom: 24px;
  transition: transform 0.06s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.squishy-target-wrap:active {
  cursor: grabbing;
}

.squishy-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.4));
  transform-origin: 50% 85%;
  transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

/* Squish States (Triggered by JS on click / drag) */
.squishy-target-wrap.is-squished .squishy-svg {
  transform: scale(1.22, 0.72) translateY(18px);
}

.squishy-target-wrap.is-pinched .squishy-svg {
  transform: scale(0.85, 1.2) translateY(-10px);
}

.squishy-target-wrap.is-jiggling .squishy-svg {
  animation: jiggle-spring 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Ball Squishy Styles (for Lara, Maja, Omlet) */
.squishy-ball-wrap {
  width: 175px;
  height: 175px;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  transform-origin: 50% 85%;
  transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55), inset 0 -6px 14px rgba(0, 0, 0, 0.4);
}

.squishy-ball-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  border: 3px solid var(--border-active, rgba(255, 255, 255, 0.25));
}

.squishy-ball-gloss {
  position: absolute;
  top: 10px;
  left: 24px;
  width: 55px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 75%);
  transform: rotate(-35deg);
  pointer-events: none;
}

.squishy-target-wrap.is-squished .squishy-ball-wrap {
  transform: scale(1.24, 0.72) translateY(22px);
}

.squishy-target-wrap.is-jiggling .squishy-ball-wrap {
  animation: jiggle-spring 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes jiggle-spring {
  0% { transform: scale(1.2, 0.75) translateY(12px); }
  25% { transform: scale(0.88, 1.15) translateY(-8px); }
  50% { transform: scale(1.08, 0.92) translateY(4px); }
  75% { transform: scale(0.96, 1.04) translateY(-2px); }
  100% { transform: scale(1, 1) translateY(0); }
}

/* Floating Squish Sparkles / Crumbs */
.squish-particles-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.squish-crumb {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 800;
  pointer-events: none;
  animation: float-crumb 0.85s ease-out forwards;
}

@keyframes float-crumb {
  0% { opacity: 1; transform: translate(0, 0) scale(0.6); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.2); }
}

/* Squish Controls & Stats HUD */
.squishy-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 440px;
  gap: 14px;
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
}

.hud-stat {
  display: flex;
  flex-direction: column;
}

.hud-stat span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hud-stat strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.hud-stat strong.accent {
  color: var(--active-accent);
}

.squish-actions {
  display: flex;
  gap: 8px;
}

.squish-btn {
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: all 0.16s ease;
}

.squish-btn:hover {
  background: var(--active-faint);
  border-color: var(--active-accent);
  color: var(--active-soft);
  transform: translateY(-1px);
}

/* Rules Modal Dialog */
.gniotki-rules-dialog {
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: rgba(14, 12, 22, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  color: var(--text-primary);
  padding: 0;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 35px var(--active-glow);
  outline: none;
  margin: auto;
}

.gniotki-rules-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rules-dialog-content {
  padding: 28px;
}

.rules-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.rules-dialog-header h3 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.rules-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rules-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.rules-dialog-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rules-dialog-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.rules-dialog-list li strong {
  color: #fff;
  min-width: 80px;
}

/* Squishy Store Catalog Grid */
.store-section {
  margin-top: 60px;
  padding-bottom: 80px;
}

.store-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.store-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.04em;
}

.store-slider-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  user-select: none;
}

.slider-nav-btn:hover:not(:disabled) {
  background: var(--active-faint);
  border-color: var(--active-accent);
  color: var(--active-accent);
  box-shadow: 0 0 16px var(--active-glow);
  transform: scale(1.08);
}

.slider-nav-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.slider-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.store-slider-viewport {
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 12px 6px 36px;
  margin: -12px -6px -36px;
}

.store-slider-viewport::-webkit-scrollbar {
  display: none;
}

.store-slider-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 22px;
  width: max-content;
}

.store-slider-track .store-item-card {
  flex: 0 0 290px;
  width: 290px;
  scroll-snap-align: start;
}

.store-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 26px;
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(22px);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
  overflow: hidden;
}

.store-item-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6);
}

.store-item-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
}

.store-item-badge.hot {
  background: var(--pastel-pink-faint);
  border-color: var(--pastel-pink);
  color: var(--pastel-pink-soft);
}

.store-item-badge.vip {
  background: var(--pastel-cream-faint);
  border-color: var(--pastel-cream);
  color: var(--pastel-cream-soft);
}

.store-item-preview {
  height: 140px;
  display: grid;
  place-items: center;
  margin: 12px 0 18px;
}

.preview-squishy-icon {
  font-size: 4.5rem;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.preview-squishy-thumb {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.store-item-card:hover .preview-squishy-icon,
.store-item-card:hover .preview-squishy-thumb {
  transform: scale(1.14) rotate(4deg);
}

.store-item-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
}

.store-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 18px;
  flex-grow: 1;
}

.store-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.store-item-price {
  display: flex;
  flex-direction: column;
}

.store-item-price span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.store-item-price strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pastel-cream);
}

.store-buy-btn {
  padding: 8px 16px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--active-accent);
  background: var(--active-faint);
  color: #fff;
  cursor: pointer;
  transition: all 0.16s ease;
}

.store-buy-btn:hover {
  background: var(--active-accent);
  color: #000;
  box-shadow: 0 0 18px var(--active-glow);
  transform: translateY(-1px);
}

.store-buy-btn.is-owned {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.store-buy-btn.is-owned:hover {
  background: var(--active-faint);
  border-color: var(--active-accent);
  color: var(--active-accent);
  box-shadow: 0 0 14px var(--active-glow);
}

.store-buy-btn.is-active {
  background: var(--active-faint);
  color: var(--active-accent);
  border: 1px solid var(--active-accent);
  cursor: default;
  opacity: 0.9;
  transform: none !important;
}

/* Notification toast */
.pastel-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  padding: 12px 24px;
  border-radius: 18px;
  background: rgba(15, 13, 22, 0.92);
  border: 1px solid var(--active-accent);
  box-shadow: 0 16px 36px -6px var(--active-glow);
  backdrop-filter: blur(24px);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  z-index: 1000;
}

.pastel-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
