/* Frenzy and Jackpot — 5×3 · 50 lines */
@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=Teko:wght@600;700&display=swap');

.game-shell.fj-mode {
  max-width: 480px;
  margin: 0 auto;
  background: #12081f;
}
.game-shell.fj-mode .game-top {
  display: none;
}
.game-shell.fj-mode .game-stage {
  padding: 0;
  max-width: 100%;
  width: 100%;
  min-height: 100dvh;
  display: block;
}

.fj-screen {
  position: relative;
  min-height: 100dvh;
  color: #fff;
  font-family: Teko, 'Trebuchet MS', sans-serif;
  overflow: hidden;
}
.fj-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.fj-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(40, 10, 70, 0.35) 0%,
    rgba(20, 5, 40, 0.2) 45%,
    rgba(10, 2, 28, 0.8) 100%
  );
}
.fj-ui {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: max(6px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  gap: 5px;
}

.fj-top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 6px;
}
.fj-ico {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.fj-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent !important;
}
.fj-logo {
  width: min(260px, 72vw);
  height: auto;
  margin: 0 auto;
  display: block;
  object-fit: contain;
  background: transparent !important;
  filter: drop-shadow(0 3px 10px rgba(180, 40, 255, 0.5));
}

.fj-feed {
  max-height: 52px;
  overflow: hidden;
  background: rgba(40, 10, 70, 0.55);
  border: 1px solid rgba(200, 120, 255, 0.35);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 0.78rem;
}
.fj-feed-row {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f0e0ff;
}
.fj-feed-row img {
  width: 12px;
  height: 12px;
  background: transparent !important;
}

.fj-jp-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
}
.fj-daily {
  border: none;
  background: transparent;
  color: #ffe9a0;
  font-size: 0.62rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 56px;
}
.fj-daily img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: transparent !important;
}
.fj-jp {
  text-align: center;
  padding: 4px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #3a1a68, #1a0a38);
  border: 2px solid #f0c040;
}
.fj-jp-lab {
  display: block;
  font-family: 'Russo One', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #ff6ab0;
}
.fj-jp b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.15rem;
  color: #ffe9a0;
}
.fj-jp img {
  width: 16px;
  height: 16px;
  background: transparent !important;
}
.fj-locale-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #f0c040;
  background: #3a1a68;
  cursor: pointer;
  font-size: 1rem;
}

.fj-collect {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #e8d0ff;
}
.fj-collect-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 5, 40, 0.7);
  border: 1px solid #a060ff;
  overflow: hidden;
}
.fj-collect-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7a3cff, #ff5ec8);
  border-radius: 999px;
}
.fj-collect img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: transparent !important;
}

.fj-reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  gap: 3px;
  margin: 4px auto 0;
  width: min(100%, 420px);
  padding: 6px;
  border-radius: 14px;
  background: #0a0618;
  border: 2px solid #c060ff;
  box-shadow: 0 0 22px rgba(160, 60, 255, 0.45), inset 0 0 18px rgba(0, 0, 0, 0.45);
  flex: 1 1 auto;
  min-height: 200px;
  max-height: 40vh;
}
.fj-reel {
  display: grid;
  grid-template-rows: repeat(var(--rows, 3), minmax(0, 1fr));
  gap: 3px;
  min-height: 0;
  border-right: 1px solid rgba(180, 80, 255, 0.35);
}
.fj-reel:last-child {
  border-right: none;
}
.fj-cell {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(30, 10, 60, 0.55);
  overflow: hidden;
  min-height: 0;
}
.fj-cell img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  background: transparent !important;
}
.fj-cell i {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 0.5rem;
  font-weight: 900;
  color: #ffe066;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.fj-cell i.sc {
  color: #7cff6a;
}
.fj-cell i.jp {
  color: #ff6ab0;
}
.fj-cell.is-hit {
  outline: 2px solid #ffe066;
  box-shadow: 0 0 12px rgba(255, 220, 80, 0.7);
}
.fj-reels.is-spinning .fj-reel {
  animation: fj-blur 0.16s linear infinite;
  animation-delay: calc(var(--d, 0) * 35ms);
}
@keyframes fj-blur {
  0% {
    filter: brightness(1.15);
  }
  50% {
    filter: brightness(0.8) blur(0.5px);
  }
  100% {
    filter: brightness(1.15);
  }
}
.fj-lines {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  pointer-events: none;
  z-index: 4;
}

.fj-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fj-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #e8d0ff;
  background: rgba(40, 10, 70, 0.65);
  border-radius: 12px 12px 0 0;
  padding: 6px 10px;
  border: 1px solid rgba(200, 120, 255, 0.35);
  border-bottom: none;
}
.fj-stats b {
  color: #ffe066;
}
.fj-fast {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #ffe9a0;
  cursor: pointer;
}
.fj-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: linear-gradient(180deg, #4a1a78, #220a48);
  border-radius: 0 0 16px 16px;
  padding: 8px 10px;
  border: 1px solid rgba(200, 120, 255, 0.35);
  border-top: none;
}
.fj-bal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  color: #ffe9a0;
  font-weight: 800;
}
.fj-bal img {
  width: 22px;
  height: 22px;
  background: transparent !important;
}
.fj-linebet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 2, 28, 0.55);
  border-radius: 999px;
  padding: 4px 8px;
}
.fj-linebet button {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: #f0c040;
  color: #2a1040;
  font-weight: 900;
  font-size: 1.1rem;
  cursor: pointer;
}
.fj-linebet b {
  min-width: 28px;
  text-align: center;
  font-size: 1.2rem;
  color: #fff;
}
.fj-spin {
  border: none;
  border-radius: 999px;
  padding: 10px 18px 6px;
  background: linear-gradient(180deg, #7dff6a, #2ecc40 55%, #148028);
  color: #0a2a10;
  font-family: 'Russo One', sans-serif;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(40, 200, 80, 0.45);
  line-height: 1;
  min-width: 100px;
}
.fj-spin small {
  display: block;
  font-family: Teko, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 2px;
}
.fj-spin.stop {
  background: linear-gradient(180deg, #d8d8d8, #9a9a9a 55%, #666);
  color: #1a1208;
}
.fj-spin.auto {
  background: linear-gradient(180deg, #ff7ad9, #c040a0 55%, #802060);
  color: #fff;
}
.fj-fs {
  text-align: center;
  font-style: normal;
  color: #7dff6a;
  font-size: 0.95rem;
}
.fj-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #cbb8ff;
  padding: 0 2px;
}
.fj-ping {
  color: #7dff6a;
}

.fj-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(8, 2, 24, 0.75);
  padding: 16px;
}
.fj-card {
  width: min(92vw, 360px);
  max-height: 80vh;
  overflow: auto;
  background: linear-gradient(180deg, #4a1a78, #1a0a38);
  border: 2px dashed #ff5ec8;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.fj-card-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.fj-card-h h3 {
  margin: 0;
  font-family: 'Russo One', sans-serif;
  color: #ffe066;
}
.fj-card-h button {
  border: none;
  background: #ff4d6d;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}
.fj-rules p {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 0.95rem;
  margin: 0 0 10px;
}
.fj-rules img,
.fj-rule-num {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: transparent !important;
}
.fj-rule-num {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff5ec8, #a040ff);
  color: #fff;
  font-family: 'Russo One', sans-serif;
  font-size: 0.95rem;
}
.fj-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-weight: 700;
  color: #e8d8ff;
}
.fj-field select {
  padding: 8px;
  border-radius: 10px;
  border: 2px solid #c060ff;
  background: #1a0a38;
  color: #fff;
  font-size: 1rem;
}
.fj-apply {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #7dff6a, #2ecc40);
  color: #0a2a10;
  font-weight: 900;
  font-size: 1.1rem;
  cursor: pointer;
}
.fj-wheel-card {
  text-align: center;
}
.fj-wheel-spin {
  width: 160px;
  height: 160px;
  margin: 12px auto;
  transition: transform 2s cubic-bezier(0.15, 0.85, 0.25, 1);
  transform: rotate(var(--rot, 0deg));
}
.fj-wheel-spin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent !important;
}
.fj-bigwin {
  background: rgba(8, 2, 24, 0.85);
}
.fj-bigwin-inner {
  text-align: center;
}
.fj-bigwin-txt {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(2.2rem, 12vw, 3.2rem);
  color: #ff5ec8;
  text-shadow: 0 0 20px rgba(255, 80, 200, 0.8), 0 4px 0 #6b1aff;
  animation: fj-pop 0.45s ease;
}
.fj-bigwin-inner b {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  color: #ffe066;
}
@keyframes fj-pop {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.fj-extra-cat {
  display: block;
  width: 120px;
  margin: 0 auto 10px;
  background: transparent !important;
}

@media (max-height: 700px) {
  .fj-reels {
    max-height: 34vh;
  }
  .fj-logo {
    width: min(200px, 60vw);
  }
  .fj-feed {
    max-height: 36px;
  }
}
