/* Suku Kata — game body styles (Sunny & Playful). Chrome/modals in css/style.css. */

html, body {
  overflow: hidden;
}

body {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(127, 208, 255, 0.4), transparent 60%),
    radial-gradient(800px 420px at 0% 110%, rgba(255, 197, 61, 0.35), transparent 55%),
    linear-gradient(180deg, #f2fbff 0%, #fff7e6 100%);
}

.suku-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding-top: calc(var(--header-h) + 8px);
  padding-bottom: 76px;
  position: relative;
  overflow: hidden;
}

.mode-indicator {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--ink);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
}

.suku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 14px;
  padding: 10px 16px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  flex: 1;
  align-content: center;
  justify-items: center;
}

.suku-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  padding: 14px 12px;
  min-height: 130px;
  width: 100%;
  max-width: 260px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
  animation: cardEnter 0.35s ease-out both;
  position: relative;
  box-sizing: border-box;
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    linear-gradient(135deg, var(--card-bg-1, #ffc53d), var(--card-bg-2, #7fd0ff)) border-box;
  border: 8px solid transparent;
}

.suku-card__cue {
  font-size: clamp(0.5rem, 1.5vw, 0.65rem);
  opacity: 0.6;
  color: var(--ink-soft);
  line-height: 1.2;
  text-align: center;
  position: relative;
  z-index: 1;
  font-weight: 600;
  white-space: nowrap;
}

.suku-card__emoji {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  line-height: 1;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.suku-card__text {
  font-size: clamp(2rem, calc(7vw * var(--text-scale, 1)), 4.5rem);
  font-weight: 500;
  text-align: center;
  line-height: 1.1;
  color: var(--ink);
  position: relative;
  z-index: 1;
}

.suku-card.tapped {
  animation: cardTap 0.25s ease;
}

.suku-card.tapped .suku-card__emoji {
  animation: emojiWiggle 0.25s ease;
}

.suku-card.speaking .suku-card__text {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(46, 42, 69, 0.3);
  text-decoration-thickness: 3px;
}

.suku-card.float {
  animation: cardFloat 3s ease-in-out infinite;
}

/* Bottom nav */
.suku-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 0;
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  pointer-events: none;
}

.suku-nav__arrow {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-chip);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease;
  font-family: inherit;
  line-height: 1;
}

.suku-nav__arrow:active {
  transform: scale(0.9);
  background: var(--sun);
}

.suku-nav__arrow.hidden {
  visibility: hidden;
  pointer-events: none;
}

.suku-nav__dots {
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
}

.suku-nav__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  pointer-events: auto;
}

.suku-nav__dot.active {
  background: var(--sun);
  border-color: var(--ink);
  transform: scale(1.2);
}

.suku-nav__dot:active {
  transform: scale(0.85);
}

/* Shuffle button */
.shuffle-btn {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--ink);
  background: var(--sun);
  box-shadow: var(--shadow-chip);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.shuffle-btn:active {
  transform: translateX(-50%) scale(0.92);
}

.shuffle-btn.hidden {
  display: none;
}

@keyframes cardEnter {
  0%   { opacity: 0; transform: scale(0.7) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes cardTap {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.15); }
  50%  { transform: scale(0.9); }
  75%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes emojiWiggle {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-12deg); }
  50%  { transform: rotate(8deg); }
  75%  { transform: rotate(-4deg); }
  100% { transform: rotate(0deg); }
}

@media (orientation: landscape) and (min-width: 600px) {
  .suku-wrapper {
    padding-top: calc(var(--header-h) - 2px);
    padding-bottom: 60px;
  }

  .suku-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    padding: 10px 20px;
    max-width: none;
  }

  .suku-card {
    min-height: 100px;
    padding: 10px 8px;
    max-width: 200px;
    border-width: 10px;
  }
}

@media (min-width: 900px) {
  .suku-card {
    min-height: 160px;
    padding: 18px 16px;
    max-width: 300px;
  }
}
