@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@600;800;900&display=swap');

:root {
  --bg1: #e8fff0;
  --bg2: #f0f8ff;
  --board-bg: rgba(255,255,255,0.6);
  --cell-empty: rgba(46,204,113,0.12);
  --cell-border: rgba(39,174,96,0.18);
  --pink: #2ecc71; /* Now Mint Green */
  --purple: #27ae60; /* Darker Mint */
  --text-dark: #1e3a1e;
  --shadow-soft: 0 8px 32px rgba(46,204,113,0.1);
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  width:100%; min-height:100%;
  overflow-x:hidden;
  background: linear-gradient(145deg, #e8fff0 0%, #f0f8ff 45%, #e1f5fe 100%);
  font-family: 'Nunito', sans-serif;
  user-select: none;
}

/* animated bg blobs */
.blob {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(60px); opacity: 0.35;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.blob1 { width:320px;height:320px;background:#b2f2bb;top:-80px;left:-60px; animation-delay:0s; }
.blob2 { width:280px;height:280px;background:#a5d6a7;bottom:-60px;right:-40px; animation-delay:-3s; }
.blob3 { width:200px;height:200px;background:#81c784;top:40%;left:60%; animation-delay:-5s; }
@keyframes blobFloat {
  from { transform: scale(1) translate(0,0); }
  to   { transform: scale(1.15) translate(20px, -20px); }
}

#app {
  position: relative; z-index: 1;
  width: 100%; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: env(safe-area-inset-top, 10px) 8px env(safe-area-inset-bottom, 8px);
  padding-top: max(10px, env(safe-area-inset-top));
  padding-bottom: max(52px, calc(env(safe-area-inset-bottom) + 48px));
  gap: 0;
  overflow: hidden;
}

/* space between sections */
.header      { flex-shrink: 0; margin-bottom: 6px; }
.level-bar   { flex-shrink: 0; margin-bottom: 6px; }
.board-wrap  { flex-shrink: 0; }
.tray        { flex-shrink: 0; margin-top: 6px; }

/* ---- header ---- */
.header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 420px;
}

.logo {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(16px, 4.5vw, 22px); color: #27ae60;
  text-shadow: 0 2px 0 rgba(39,174,96,0.15);
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 5px;
}
.logo-icon {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px;
}

.score-area {
  display: flex; gap: 10px; align-items: center;
}

.lang-wrap {
  position: relative;
}
.lang-btn {
  background: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(46,204,113,0.3);
  border-radius: 10px; padding: 4px 8px;
  font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 800;
  color: #27ae60; cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 0.1s;
  display: flex; align-items: center; gap: 4px;
}
.lang-btn:active { transform: scale(0.92); }

.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(46,204,113,0.15);
  border: 1.5px solid rgba(46,204,113,0.25);
  backdrop-filter: blur(16px);
  overflow: hidden; z-index: 500;
  min-width: 120px;
  animation: menuIn 0.15s ease;
}
.lang-menu.hidden { display: none; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lang-option {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700;
  color: var(--text-dark); cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  transition: background 0.1s;
}
.lang-option:hover { background: rgba(46,204,113,0.1); }
.lang-option.active { color: #27ae60; background: rgba(46,204,113,0.08); }
.lang-option .lang-check { width: 16px; text-align: center; font-size: 11px; flex-shrink: 0; }

.score-box {
  background: rgba(255,255,255,0.75);
  border-radius: 16px; padding: 4px 8px;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(46,204,113,0.25);
  text-align: center; backdrop-filter: blur(12px);
  min-width: 48px;
}
.score-box .slabel {
  font-size: 8px; font-weight: 800;
  color: #27ae60; letter-spacing: 1px; text-transform: uppercase;
}
.score-box .sval {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(13px, 3.5vw, 17px); color: var(--text-dark);
  line-height: 1.1;
  transition: transform 0.15s;
}

.daily-hdr-btn {
  background: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(46,204,113,0.3);
  border-radius: 10px; padding: 5px 7px;
  color: #27ae60; cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 0.1s;
  display: flex; align-items: center;
  position: relative;
}
.daily-hdr-btn:active { transform: scale(0.92); }
.daily-hdr-dot {
  position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #2ecc71;
  border: 1.5px solid #fff;
}

/* daily popup */
.daily-popup-backdrop {
  position: fixed; inset: 0; z-index: 280;
  background: rgba(0,0,0,0.15);
  animation: fadeIn 0.15s ease;
}
.daily-popup-backdrop.hidden { display: none; }
.daily-popup {
  position: fixed; z-index: 290;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 300px; max-width: 90vw;
  animation: cardIn 0.2s ease;
}
.daily-popup.hidden { display: none; }
.score-box .sval.pop { animation: scorePop 0.3s ease; }
@keyframes scorePop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ---- board ---- */
.board-wrap {
  position: relative;
  background: rgba(255,255,255,0.6);
  border-radius: 24px;
  padding: 10px;
  box-shadow:
    0 12px 40px rgba(46,204,113,0.12),
    0 2px 8px rgba(46,204,113,0.08),
    inset 0 0 0 2px rgba(255,255,255,0.9);
  backdrop-filter: blur(16px);
}

#board {
  display: grid;
  gap: 3px;
  /* set by JS */
}

.cell {
  border-radius: 7px;
  background: var(--cell-empty);
  border: 1.5px solid var(--cell-border);
  transition: background 0.12s, transform 0.08s;
  position: relative;
  cursor: default;
}

.cell.filled {
  border-color: transparent;
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.45), 0 2px 4px rgba(0,0,0,0.1);
}
.cell.filled::after {
  display: none;
}

.cell.highlight {
  transform: scale(0.92);
  box-shadow: 0 0 0 2.5px var(--pink);
}
.cell.highlight-bad {
  background: rgba(255,80,80,0.25) !important;
  transform: scale(0.92);
}

/* clear flash */
.cell.clearing {
  animation: cellClear 0.38s ease forwards;
}
@keyframes cellClear {
  0%   { transform: scale(1);   opacity:1; }
  40%  { transform: scale(1.25);opacity:1; }
  100% { transform: scale(0);   opacity:0; }
}

/* ---- piece tray ---- */
.tray {
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,0.65);
  border-radius: 22px;
  padding: 8px 6px;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(46,204,113,0.2);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  min-height: 80px;
}

.piece-slot {
  width: calc(33vw - 16px); max-width: 110px; height: 76px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  cursor: grab;
  touch-action: none;
  transition: transform 0.15s;
  border-radius: 14px;
}
.piece-slot:active { cursor: grabbing; }
.piece-slot.selected {
  transform: scale(1.12);
  filter: drop-shadow(0 4px 10px rgba(46,204,113,0.4));
}
.piece-slot.used { opacity: 0.18; pointer-events: none; }

.piece-grid {
  display: grid;
  gap: 2px;
  pointer-events: none;
}
.piece-cell {
  border-radius: 5px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.45);
  position: relative;
}
.piece-cell::after {
  display: none;
}

/* ---- floating drag piece ---- */
#drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  display: none;
  /* no centering transform — positioned by JS from top-left */
  transform: scale(1.08);
  transform-origin: top left;
  filter: drop-shadow(0 8px 20px rgba(46,204,113,0.3));
  transition: none;
}
#drag-ghost .piece-grid { opacity: 0.92; }

/* ---- level info bar ---- */
.level-bar {
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,0.72);
  border-radius: 18px;
  padding: 7px 12px;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(46,204,113,0.2);
  backdrop-filter: blur(12px);
}
.level-bar .lv-header {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.level-bar .lv-title {
  font-family: 'Fredoka One', cursive;
  font-size: 13px; color: #27ae60;
}
.level-bar .lv-num {
  font-family: 'Fredoka One', cursive;
  font-size: 13px; color: var(--text-dark);
}
.lv-toggle { font-size: 11px; color: #2ecc71; margin-left: 6px; }
.goals-list {
  display: flex; flex-direction: column; gap: 4px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 200px; opacity: 1;
}
.goals-list.collapsed { max-height: 0; opacity: 0; }
/* small gap when expanded */
.level-bar.has-goals .lv-header { margin-bottom: 6px; }
.goal-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; color: var(--text-dark);
}
.goal-item.done { color: #aaa; text-decoration: line-through; }
.goal-icon { font-size: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.goal-progress-wrap {
  flex: 1; height: 7px;
  background: rgba(46,204,113,0.15);
  border-radius: 99px; overflow: hidden;
}
.goal-progress-bar {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #66bb6a, #2ecc71);
  transition: width 0.35s ease;
}
.goal-item.done .goal-progress-bar { background: #ccc; }
.goal-text { min-width: 60px; text-align: right; white-space: nowrap; font-size: 10px; }

/* ---- overlay ---- */
.overlay {
  position: relative; z-index: 200;
  width: 100%; height: 100vh; height: 100dvh;
  background: rgba(232,255,240,0.92);
  backdrop-filter: blur(16px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  padding: 24px;
}
/* PC: enlarge start screen */
@media (min-width: 600px) {
  .overlay { gap: 28px; }
  .overlay-logo { gap: 12px; }
  .overlay-title { font-size: 44px; }
  .overlay-sub { font-size: 17px; }
  .overlay .btn-start { padding: 16px 52px; font-size: 20px; }
}
/* when used as game-over popup (game already started), switch to fixed */
body.playing .overlay {
  position: fixed; inset: 0;
  height: auto;
}
.overlay.hidden { display: none; }

.overlay-logo {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 6px;
  justify-content: center;
}
.overlay-title {
  font-family: 'Fredoka One', cursive;
  font-size: 30px; color: #27ae60;
  text-shadow: 0 2px 0 rgba(39,174,96,0.1);
  text-align: center;
}

.overlay-sub  { font-size: 13px; color: #2ecc71; font-weight: 700; text-align:center; }
.overlay-score { font-family:'Fredoka One',cursive; font-size:22px; color:var(--text-dark); }

/* goal preview cards in overlay */
.goal-cards { display:flex; flex-direction:column; gap:6px; width:100%; max-width:300px; }
.goal-card {
  background: rgba(255,255,255,0.8);
  border-radius: 12px; padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 2px 8px rgba(46,204,113,0.08);
  border: 1.5px solid rgba(46,204,113,0.2);
  font-size: 12px; font-weight: 700; color: var(--text-dark);
}
.goal-card .gc-icon { font-size: 20px; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; }

.btn-start {
  background: linear-gradient(180deg, #66bb6a 0%, #2ecc71 50%, #27ae60 100%);
  color: #fff; border: none; border-radius: 50px;
  padding: 12px 36px;
  font-family: 'Fredoka One', cursive; font-size: 16px;
  cursor: pointer; letter-spacing: 0.5px;
  box-shadow:
    0 5px 0 #1b5e20,
    0 8px 20px rgba(39,174,96,0.2),
    inset 0 2px 0 rgba(255,255,255,0.3);
  transition: all 0.1s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  border: 2px solid rgba(255,255,255,0.2);
}
.btn-start:active { transform: translateY(4px); box-shadow: 0 1px 0 #1b5e20, inset 0 2px 0 rgba(255,255,255,0.2); }

/* level complete — subtle toast, not a giant banner */
.lv-complete-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; justify-content: center;
  padding-top: max(16px, env(safe-area-inset-top));
  pointer-events: none;
}
.lv-complete-inner {
  font-family: 'Fredoka One', cursive;
  font-size: 16px; color: #fff; letter-spacing: 0.5px;
  animation: lvToast 1.4s ease forwards;
  background: linear-gradient(135deg, #43a047, #2ecc71);
  padding: 10px 28px; border-radius: 50px;
  box-shadow: 0 4px 16px rgba(46,204,113,0.3);
}
@keyframes lvToast {
  0%   { opacity:0; transform: translateY(-20px) scale(0.9); }
  15%  { opacity:1; transform: translateY(0) scale(1); }
  75%  { opacity:1; transform: translateY(0) scale(1); }
  100% { opacity:0; transform: translateY(-10px); }
}

/* ---- level result card (floating, not full-screen) ---- */
.result-card {
  position: fixed; z-index: 250;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.95);
  border-radius: 20px;
  padding: 18px 22px;
  box-shadow: 0 8px 32px rgba(46,204,113,0.15);
  border: 1.5px solid rgba(46,204,113,0.2);
  backdrop-filter: blur(16px);
  width: 280px;
  animation: cardIn 0.3s ease;
  text-align: center;
}
.result-card-backdrop {
  position: fixed; inset: 0; z-index: 240;
  background: rgba(0,0,0,0.1);
  animation: fadeIn 0.2s ease;
}
@keyframes cardIn {
  from { opacity:0; transform: translate(-50%,-50%) scale(0.9); }
  to   { opacity:1; transform: translate(-50%,-50%) scale(1); }
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.result-title {
  font-family: 'Fredoka One', cursive;
  font-size: 18px; color: #27ae60;
  margin-bottom: 4px;
}
.result-score {
  font-family: 'Fredoka One', cursive;
  font-size: 28px; color: var(--text-dark);
  margin-bottom: 10px;
}
.result-stats {
  display: flex; justify-content: center; gap: 6px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.result-stat {
  background: rgba(46,204,113,0.1);
  border-radius: 10px; padding: 6px 10px;
  text-align: center; min-width: 48px;
}
.result-stat .rs-val {
  font-family: 'Fredoka One', cursive;
  font-size: 16px; color: var(--text-dark); line-height: 1.2;
}
.result-stat .rs-lbl {
  font-size: 9px; font-weight: 700;
  color: #27ae60; text-transform: uppercase; letter-spacing: 0.5px;
}
.result-divider {
  height: 1px; background: rgba(46,204,113,0.15);
  margin: 0 -6px 12px;
}
.result-next-label {
  font-size: 12px; font-weight: 700; color: #2ecc71;
  margin-bottom: 6px;
}
.result-preview {
  margin-bottom: 14px;
}
.result-preview .goal-cards { gap: 4px; max-width: 260px; margin: 0 auto; }
.result-preview .goal-card { padding: 5px 10px; font-size: 11px; border-radius: 8px; }
.result-card > .btn-start { padding: 10px 32px; font-size: 14px; margin-top: 8px; }

/* ---- particles ---- */
.particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: pfly 0.7s ease forwards;
}
@keyframes pfly {
  from { opacity: 1; transform: translate(0,0) scale(1) rotate(0deg); }
  to   { opacity: 0; transform: var(--ptx) scale(0.2) rotate(360deg); }
}

/* ---- score popup ---- */
.score-popup {
  position: fixed;
  font-family: 'Fredoka One', cursive;
  font-size: 16px; color: #27ae60;
  pointer-events: none; z-index: 150;
  text-shadow: 0 1px 4px rgba(46,204,113,0.15);
  animation: popFloat 0.8s ease forwards;
  white-space: nowrap;
}
.score-popup.big {
  background: linear-gradient(90deg, #43a047, #2ecc71, #81c784);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(46,204,113,0.2));
}
@keyframes popFloat {
  0%   { opacity:1; transform: translateY(0) scale(1.05); }
  100% { opacity:0; transform: translateY(-40px) scale(0.85); }
}

/* ---- hint pulse ---- */
.hint-pulse {
  position: fixed;
  border-radius: 14px;
  pointer-events: none;
  z-index: 50;
  animation: hintFade 0.6s ease forwards;
  border: 3px solid #2ecc71;
}
@keyframes hintFade {
  0%   { opacity: 0.7; transform: scale(0.9); }
  100% { opacity: 0;   transform: scale(1.15); }
}

/* ---- SEO content — visible before game, hidden during play ---- */
.seo-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  color: var(--text-dark);
  font-family: 'Nunito', sans-serif;
  line-height: 1.7;
}
.seo-content h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 26px; color: #27ae60;
  margin-bottom: 8px;
  text-shadow: 0 2px 0 rgba(39,174,96,0.08);
}
.seo-content h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 18px; color: #2ecc71;
  margin: 28px 0 8px;
}
.seo-content h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 15px; color: var(--text-dark);
  margin: 20px 0 6px;
}
.seo-content p {
  font-size: 14px; font-weight: 600;
  margin-bottom: 12px;
  color: #34495e;
}
.seo-content ul {
  list-style: none; padding: 0; margin: 0 0 12px;
}
.seo-content li {
  font-size: 14px; font-weight: 600; color: #34495e;
  padding: 4px 0 4px 20px;
  position: relative;
}
.seo-content li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #a5d6a7, #2ecc71);
}
.seo-content .animal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}
.seo-content .animal-card {
  background: rgba(255,255,255,0.8);
  border-radius: 14px; padding: 10px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(46,204,113,0.08);
  border: 1.5px solid rgba(46,204,113,0.15);
}
.seo-content .animal-card .ac-name {
  font-size: 12px; font-weight: 700; color: var(--text-dark); margin-top: 4px;
}
.seo-content .tip-box {
  background: rgba(255,255,255,0.7);
  border-radius: 14px; padding: 14px 18px;
  border: 1.5px solid rgba(46,204,113,0.15);
  margin: 10px 0;
  font-size: 13px; font-weight: 600; color: #34495e;
}
.seo-content .tip-box strong {
  color: #27ae60;
}
.seo-footer {
  text-align: center; padding: 20px;
  font-size: 12px; font-weight: 600; color: #95a5a6;
}

/* when game is active, hide content and lock scroll */
body.playing { overflow: hidden; height: 100%; }
body.playing .seo-content,
body.playing .seo-footer { display: none; }

/* before game starts, hide the game UI */
#app { display: none; }
body.playing #app { display: flex; }

/* ---- bottom nav tabs ---- */
.nav-tabs {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 180;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-top: 1.5px solid rgba(46,204,113,0.15);
  padding: 0 0 max(4px, env(safe-area-inset-bottom));
  justify-content: center; gap: 0;
}
body.playing .nav-tabs { display: flex; }
.nav-tab {
  flex: 1; max-width: 160px;
  display: flex; flex-direction: column; align-items: center;
  padding: 7px 0 3px; gap: 2px;
  background: none; border: none;
  font-family: 'Fredoka One', cursive; font-size: 11px;
  color: #bbb; cursor: pointer;
  transition: color 0.15s;
}
.nav-tab.active { color: #2ecc71; }
.nav-tab svg { opacity: 0.5; transition: opacity 0.15s; }
.nav-tab.active svg { opacity: 1; }

/* ---- zoo view ---- */
#zoo-view {
  display: none;
  position: fixed; inset: 0; z-index: 170;
  background: linear-gradient(165deg, #f1f8e9 0%, #e8f5e9 40%, #f0f4c3 100%);
  flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  padding: max(12px, env(safe-area-inset-top)) 12px 80px;
  -webkit-overflow-scrolling: touch;
}
body.playing.in-zoo #app { display: none; }
body.playing.in-zoo #zoo-view { display: flex; }

.zoo-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 4px 10px;
}
.zoo-title {
  font-family: 'Fredoka One', cursive;
  font-size: 20px; color: #1b5e20;
}
.zoo-currency {
  display: flex; gap: 8px; align-items: center;
}
.zoo-cur-box {
  background: rgba(255,255,255,0.8);
  border-radius: 20px; padding: 4px 12px;
  font-family: 'Fredoka One', cursive;
  font-size: 14px; color: #1e3a1e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1.5px solid rgba(0,0,0,0.05);
  display: flex; align-items: center; gap: 4px;
}

.zoo-stats-bar {
  background: rgba(255,255,255,0.7);
  border-radius: 14px; padding: 8px 14px;
  margin-bottom: 10px;
  display: flex; justify-content: space-around; align-items: center;
  border: 1.5px solid rgba(76,175,80,0.2);
  font-size: 11px; font-weight: 700; color: #2e7d32;
}
.zoo-stats-bar .zs-val {
  font-family: 'Fredoka One', cursive;
  font-size: 16px; color: #1b5e20;
}

.zoo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 2px;
}
.zoo-card {
  background: rgba(255,255,255,0.85);
  border-radius: 18px;
  padding: 12px 10px 10px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.05);
  border: 2px solid rgba(76,175,80,0.15);
  position: relative;
  transition: transform 0.12s;
}
.zoo-card:active { transform: scale(0.97); }
.zoo-card.locked {
  opacity: 0.5;
  border-style: dashed;
}
.zoo-card .zc-face {
  width: 56px; height: 56px;
  border-radius: 14px;
  margin: 0 auto 6px;
  position: relative;
  overflow: hidden;
}
.zoo-card .zc-name {
  font-family: 'Fredoka One', cursive;
  font-size: 13px; color: #1e3a1e;
}
.zoo-card .zc-level {
  font-size: 10px; font-weight: 800;
  color: #2e7d32; margin: 2px 0;
}
.zoo-card .zc-income {
  font-size: 10px; font-weight: 700;
  color: #795548;
}
.zoo-card .zc-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px;
  background: linear-gradient(180deg, #f1f8e9, #dcedc8);
  color: #33691e; border: 1.5px solid #c5e1a5; border-radius: 20px;
  padding: 6px 14px;
  font-family: 'Fredoka One', cursive; font-size: 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: all 0.1s;
}
.zoo-card .zc-btn:hover {
  background: linear-gradient(180deg, #dcedc8, #c5e1a5);
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}
.zoo-card .zc-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.zoo-card .zc-btn:disabled {
  background: #f5f5f5;
  color: #bbb; border-color: #e5e5e5;
  box-shadow: none; cursor: default;
}
.zoo-card .zc-btn.buy {
  background: linear-gradient(180deg, #f9fbe7, #f0f4c3);
  color: #827717; border-color: #e6ee9c;
}
.zoo-card .zc-btn.buy:hover {
  background: linear-gradient(180deg, #f0f4c3, #e6ee9c);
}
.zoo-card .zc-max {
  display: inline-block; margin-top: 6px;
  font-size: 10px; font-weight: 800;
  color: #fbc02d;
  background: rgba(251,192,45,0.1);
  border-radius: 20px; padding: 4px 12px;
}
.zoo-card .zc-stars {
  font-size: 10px; color: #fbc02d; letter-spacing: 1px;
}

/* floating diamond bubbles on animal cards */
.zoo-card { overflow: visible; }
.zc-bubble {
  position: absolute;
  font-family: 'Fredoka One', cursive;
  font-size: 13px;
  color: #0ea5e9;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  animation: bubbleUp 1.6s ease-out forwards;
  text-shadow: 0 1px 3px rgba(124,111,255,0.15);
}
@keyframes bubbleUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  60%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-48px) scale(0.7); }
}
/* diamond reward line in result card */
.result-diamonds {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-family: 'Fredoka One', cursive;
  font-size: 16px; color: #0ea5e9;
  margin: 6px 0 4px;
  animation: scorePop 0.4s ease;
}

/* ---- daily challenge ---- */
.daily-section {
  width: 100%; max-width: 340px;
  background: rgba(255,255,255,0.85);
  border-radius: 18px;
  padding: 14px 16px;
  border: 2px solid rgba(46,204,113,0.2);
  box-shadow: 0 4px 16px rgba(46,204,113,0.08);
  backdrop-filter: blur(12px);
}
.daily-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.daily-title {
  font-family: 'Fredoka One', cursive;
  font-size: 15px; color: #27ae60;
  display: flex; align-items: center; gap: 6px;
}
.daily-streak {
  font-size: 11px; font-weight: 800;
  color: #fbc02d;
  background: rgba(251,192,45,0.1);
  border-radius: 20px; padding: 3px 10px;
}
.daily-close-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.05);
  border: none; border-radius: 50%;
  color: #999; cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.daily-close-btn:hover { background: rgba(0,0,0,0.1); color: #666; }
.daily-close-btn:active { transform: scale(0.9); }
.daily-timer {
  font-size: 10px; font-weight: 700;
  color: #95a5a6; text-align: center;
  margin-top: 8px;
}
.daily-quest {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(46,204,113,0.1);
}
.daily-quest:last-of-type { border-bottom: none; }
.daily-quest-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 14px;
}
.daily-quest-info {
  flex: 1; min-width: 0;
}
.daily-quest-label {
  font-size: 12px; font-weight: 700; color: var(--text-dark);
}
.daily-quest-progress {
  height: 5px; background: rgba(46,204,113,0.1);
  border-radius: 99px; margin-top: 3px; overflow: hidden;
}
.daily-quest-bar {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #66bb6a, #2ecc71);
  transition: width 0.3s ease;
}
.daily-quest.done .daily-quest-bar { background: #4caf50; }
.daily-quest.done .daily-quest-label { color: #95a5a6; text-decoration: line-through; }
.daily-quest-reward {
  font-family: 'Fredoka One', cursive;
  font-size: 12px; color: #0ea5e9;
  flex-shrink: 0; white-space: nowrap;
}
.daily-quest.done .daily-quest-reward { color: #4caf50; }
.daily-claim-btn {
  display: block; width: 100%; margin-top: 10px;
  background: linear-gradient(135deg, #66bb6a, #2ecc71);
  color: #fff; border: none; border-radius: 50px;
  padding: 10px; font-family: 'Fredoka One', cursive; font-size: 14px;
  cursor: pointer; box-shadow: 0 3px 0 #1b5e20;
  transition: transform 0.08s;
}
.daily-claim-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #1b5e20; }
.daily-claim-btn:disabled { opacity: 0.4; cursor: default; }
.daily-claimed-badge {
  text-align: center; margin-top: 10px;
  font-family: 'Fredoka One', cursive;
  font-size: 14px; color: #4caf50;
}
