/* ─── Loading Screen ───────────────────────────────────── */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(180deg, #0D47A1 0%, #1A237E 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-content { text-align: center; }
.loading-spinner {
  width: 48px; height: 48px; margin: 0 auto 16px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: #FFD700;
  border-radius: 50%;
  animation: spin-loading 0.8s linear infinite;
}
@keyframes spin-loading { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 16px; font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 2px;
}

/* ─── Legal Panels (Privacy & Terms) ──────────────────── */
.legal-panel {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.legal-panel.hidden { display: none; }
.legal-inner {
  background: linear-gradient(180deg, #1A237E, #0D1B5E);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.legal-inner h2 {
  font-size: 20px; margin-bottom: 16px;
  color: #FFD700; text-align: center;
}
.legal-inner h3 {
  font-size: 14px; margin: 14px 0 6px;
  color: #90CAF9;
}
.legal-content p {
  font-size: 12px; line-height: 1.6;
  color: rgba(255,255,255,0.75);
  margin-bottom: 8px;
}
.legal-inner .panel-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: #fff;
  font-size: 24px; cursor: pointer; opacity: 0.7;
}
.legal-inner .panel-close:hover { opacity: 1; }

/* ─── Menu Legal Links ────────────────────────────────── */
.menu-legal {
  margin-top: 8px;
  display: flex; gap: 8px; align-items: center;
  justify-content: center;
}
.menu-legal a {
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  text-decoration: underline;
}
.menu-legal span {
  color: rgba(255,255,255,0.3);
  font-size: 10px;
}

/* ─── Base ──────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Nunito', sans-serif;
  background: #0D47A1;
  color: #fff;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  height: 100vh;
  height: 100dvh;
}
canvas {
  display: block;
  margin: 0 auto;
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.hidden { display: none !important; }

/* ─── Menu Screen ───────────────────────────────────────── */
.menu-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(180deg, rgba(21,101,192,0.85) 0%, rgba(13,71,161,0.9) 40%, rgba(26,35,126,0.95) 100%),
    url('assets/garden-scene.png') center/cover;
  overflow: hidden;
}
.menu-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,214,0,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(213,0,249,0.08) 0%, transparent 50%);
}
.menu-cloud {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border-radius: 50px;
  filter: blur(3px);
}
.cloud-1 { width: 120px; height: 36px; top: 15%; left: -120px; animation: cloudFloat 20s linear infinite; }
.cloud-2 { width: 80px; height: 28px; top: 25%; left: -80px; animation: cloudFloat 26s linear infinite 6s; opacity: 0.5; }
.cloud-3 { width: 100px; height: 32px; top: 10%; left: -100px; animation: cloudFloat 22s linear infinite 12s; opacity: 0.6; }
@keyframes cloudFloat { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 200px)); } }

.menu-content { position: relative; text-align: center; padding: 40px; animation: float 4s ease-in-out infinite; }
.menu-icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 110px; height: 110px;
  background: linear-gradient(135deg, #FF6F00, #FF1744);
  border-radius: 28px; margin-bottom: 12px;
  box-shadow: 0 8px 30px rgba(255,23,68,0.35), inset 0 2px 0 rgba(255,255,255,0.3);
  border: 3px solid rgba(255,255,255,0.25);
}
.menu-emoji {
  font-size: 58px; display: block;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.menu-gem-art {
  width: 90px; height: 90px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 16px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.play-btn-art {
  width: 24px; height: 24px;
  object-fit: cover;
  object-position: 5% 5%;
  border-radius: 4px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.menu-content h1 {
  font-size: 42px; font-weight: 900;
  background: linear-gradient(135deg, #FFD54F, #FF6F00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
  margin-bottom: 2px;
}
.menu-sub {
  font-size: 15px; color: rgba(255,255,255,0.6);
  letter-spacing: 3px; margin-bottom: 40px;
}
.btn-play {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Nunito', sans-serif; font-size: 22px; font-weight: 800;
  padding: 16px 54px; border: none; border-radius: 50px; cursor: pointer;
  background: linear-gradient(180deg, #66BB6A 0%, #43A047 100%);
  color: #fff;
  box-shadow: 0 6px 0 #2E7D32, 0 10px 30px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.2);
}
.btn-play:active { transform: translateY(3px); box-shadow: 0 3px 0 #2E7D32; }
.play-icon { font-size: 18px; }
.menu-footer { margin-top: 50px; font-size: 12px; color: rgba(255,255,255,0.3); }

/* ─── World UI ─────────────────────────────────────────── */
.world-ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.world-ui > * { pointer-events: auto; }

.world-top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px 6px;
  background: linear-gradient(180deg, rgba(78,52,30,0.85) 0%, rgba(78,52,30,0.6) 70%, transparent 100%);
}

/* Old bottom nav hidden */
.world-bottom-nav { display: none; }

/* ─── Floating Side Buttons ──────────────────────────── */
.float-side {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.float-left { left: 6px; }
.float-right { right: 6px; }
.float-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 2px solid rgba(255,200,100,0.3);
  background: linear-gradient(135deg, rgba(62,40,20,0.75), rgba(40,25,10,0.85));
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  position: relative;
}
.float-btn:active {
  transform: scale(0.88);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.float-highlight {
  border-color: rgba(255,215,0,0.5);
  box-shadow: 0 3px 12px rgba(255,215,0,0.3);
  animation: pulse 2s ease-in-out infinite;
}

/* ─── Spin Indicator (bottom center) ─────────────────── */
.spin-indicator {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}
.spin-indicator-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 28px;
  background: linear-gradient(135deg, #FF6F00, #FF9100);
  border: 2px solid rgba(255,200,100,0.4);
  border-radius: 20px;
  color: white;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,111,0,0.5);
  transition: all 0.2s;
  animation: pulse 2.5s ease-in-out infinite;
}
.spin-indicator-btn:active { transform: scale(0.93); }
.spin-arrow {
  font-size: 10px;
  animation: floatArrow 1.5s ease-in-out infinite;
}
@keyframes floatArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ─── More Menu ──────────────────────────────────────── */
.more-menu {
  position: fixed;
  bottom: 80px;
  right: 10px;
  z-index: 25;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.more-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.more-menu.hidden { display: none; }
.more-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 14px;
  background: linear-gradient(180deg, #F5E6C8, #E8D5A8);
  border-radius: 18px;
  border: 3px solid #8B5E3C;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  min-width: 220px;
}
.more-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,248,225,0.5));
  border: 2px solid rgba(139,90,43,0.15);
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #5D3A1A;
  transition: all 0.15s;
}
.more-btn:active {
  transform: scale(0.93);
  background: rgba(255,215,0,0.2);
}
.more-btn span:first-child {
  font-size: 22px;
}
.wnav-btn:active { transform: scale(0.92); }
.wnav-btn .wnav-icon { font-size: 18px; display: flex; align-items: center; justify-content: center; }
.ui-icon { width: 22px; height: 22px; }
.ui-icon-sm { width: 14px; height: 14px; vertical-align: -2px; }
.btn-icon .ui-icon { width: 18px; height: 18px; }
.wnav-btn.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(180,120,50,0.8), rgba(139,90,43,0.8));
  border: 1px solid rgba(255,200,100,0.4);
  box-shadow: 0 0 8px rgba(255,180,60,0.3);
}
.wnav-btn.highlight {
  color: #FFD700;
  background: linear-gradient(135deg, rgba(255,180,0,0.3), rgba(200,120,0,0.3));
  border: 1px solid rgba(255,215,0,0.45);
  box-shadow: 0 0 10px rgba(255,200,0,0.2);
}
.wnav-btn.highlight .wnav-icon { animation: pulse 2s ease-in-out infinite; }

.hud-item.stars-item { border: 1px solid rgba(255,200,60,0.4); }

/* ─── Game HUD ─────────────────────────────────────────── */
.game-ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.game-ui > * { pointer-events: auto; }

.hud-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px 4px;
  background: linear-gradient(180deg, rgba(78,52,30,0.85) 0%, rgba(78,52,30,0.5) 70%, transparent 100%);
}
.hud-left { display: flex; align-items: center; }
.hud-currency { display: flex; gap: 6px; }
.hud-item {
  display: flex; align-items: center; gap: 3px;
  background: linear-gradient(180deg, rgba(90,58,28,0.85), rgba(62,38,16,0.9));
  padding: 4px 10px; border-radius: 16px;
  font-size: 13px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,220,150,0.15), 0 2px 4px rgba(0,0,0,0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.hud-item.coins { border: 1px solid rgba(255,200,60,0.4); }
.hud-item.gems { border: 1px solid rgba(200,100,255,0.35); }
.hud-icon { font-size: 15px; display: none; }

/* Sprite-based HUD icons from ui-kit.png */
.sprite-icon {
  display: inline-block;
  background-image: url('assets/ui-kit.png');
  background-repeat: no-repeat;
  vertical-align: middle;
  flex-shrink: 0;
}
/* Coin icon: region {x:0, y:1250, w:580, h:580} at 20px display */
.sprite-coin {
  width: 20px; height: 20px;
  background-size: 70.6px 70.6px;
  background-position: 0px -43.1px;
}
/* Gem icon: region {x:1350, y:1250, w:700, h:700} at 20px display */
.sprite-gem {
  width: 20px; height: 20px;
  background-size: 58.5px 58.5px;
  background-position: -38.6px -35.7px;
}
/* Star icon: region {x:1100, y:0, w:950, h:750} at 20px display */
.sprite-star {
  width: 20px; height: 16px;
  background-size: 43.1px 43.1px;
  background-position: -23.2px 0px;
}
.hud-center { text-align: center; }
.hud-level-text {
  font-size: 13px; font-weight: 800; color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.hud-right { display: flex; align-items: center; gap: 6px; }
.btn-icon {
  background: linear-gradient(180deg, rgba(110,70,30,0.7), rgba(80,45,15,0.8));
  border: 1px solid rgba(200,150,70,0.3);
  border-radius: 50%;
  width: 30px; height: 30px; font-size: 14px; cursor: pointer; color: #FFE0A0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Game info bar */
.hud-game-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 14px 4px;
  pointer-events: none;
}
.hud-label { font-size: 9px; color: rgba(255,255,255,0.5); display: block; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.hud-score-wrap, .hud-moves-wrap { text-align: center; min-width: 50px; }
.hud-score-val { font-size: 16px; font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.hud-moves-val {
  font-size: 22px; font-weight: 900; color: #FFD600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.hud-goal-wrap { flex: 1; max-width: 180px; text-align: center; }
.hud-goal-bar {
  height: 8px; background: rgba(0,0,0,0.3); border-radius: 4px; overflow: hidden;
  margin-top: 2px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
.hud-goal-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #FFD54F, #FF6F00);
  border-radius: 4px; transition: width 0.4s ease;
  box-shadow: 0 0 6px rgba(255,213,79,0.4);
}

/* ─── Popups ────────────────────────────────────────────── */
.game-popup {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); opacity: 0;
  transition: opacity 0.3s; backdrop-filter: blur(4px);
}
.game-popup.show { opacity: 1; }
.popup-card {
  background: linear-gradient(180deg, #F5E6C8, #E8D5A8, #D4B896);
  border-radius: 20px; padding: 24px 28px;
  text-align: center; max-width: 340px; width: 92%;
  transform: scale(0.7) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.4), inset 0 -2px 0 rgba(0,0,0,0.1);
  border: 3px solid #8B5E3C;
  color: #3E2510;
}
.game-popup.show .popup-card,
.game-popup.show .level-select-card { transform: scale(1) translateY(0); }
.popup-emoji { font-size: 52px; display: block; margin-bottom: 6px; }
.popup-card h2 { font-size: 22px; margin-bottom: 6px; color: #5D3A1A; }
.popup-card p { font-size: 15px; margin-bottom: 14px; color: rgba(62,37,16,0.7); }
.popup-reward-row { display: flex; justify-content: center; gap: 12px; margin-bottom: 14px; }
.popup-reward-item {
  display: flex; align-items: center; gap: 4px;
  background: rgba(139,90,43,0.15); padding: 5px 12px; border-radius: 16px;
  font-weight: 800; font-size: 14px; color: #5D3A1A;
  border: 1px solid rgba(139,90,43,0.2);
}
.popup-btn {
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800;
  padding: 10px 32px; border: none; border-radius: 25px;
  color: #fff; cursor: pointer; transition: transform 0.15s;
  box-shadow: 0 4px 0 #2E7D32, 0 6px 12px rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.25);
  margin: 4px;
  background: linear-gradient(180deg, #66BB6A, #43A047);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.popup-btn:active { transform: scale(0.95) translateY(2px); }
.popup-btn:disabled { opacity: 0.5; cursor: default; }

/* Build panel */
.build-card { padding-bottom: 20px; }
.build-cost {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-bottom: 14px; font-weight: 800; font-size: 16px;
}
.build-cost small { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 600; }

/* Result popup */
.result-card { padding-bottom: 20px; }
.result-stars { font-size: 36px; margin-bottom: 8px; letter-spacing: 4px; }
.result-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }

/* Level select */
.level-select-card {
  background: linear-gradient(180deg, #F5E6C8, #E8D5A8, #D4B896);
  border-radius: 20px; padding: 24px 20px;
  text-align: center; max-width: 360px; width: 92%;
  max-height: 80vh; overflow-y: auto;
  transform: scale(0.7) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.4);
  border: 3px solid #8B5E3C;
  color: #3E2510;
}
.level-select-card h2 { font-size: 22px; margin-bottom: 6px; color: #5D3A1A; }
.level-area-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 800;
  padding: 8px 12px; margin: 10px 0 6px;
  background: rgba(139,90,43,0.12); border-radius: 10px;
  border: 1px solid rgba(139,90,43,0.15);
  color: #5D3A1A;
}
.level-area-header.locked { opacity: 0.4; }
.level-area-info { font-size: 11px; color: rgba(93,58,26,0.5); font-weight: 600; }
.level-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  margin-bottom: 4px;
}
.level-btn {
  aspect-ratio: 1; border-radius: 14px; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; font-family: 'Nunito', sans-serif;
  transition: transform 0.15s;
}
.level-btn:active { transform: scale(0.92); }
.level-btn.unlocked {
  background: linear-gradient(135deg, #66BB6A, #43A047);
  color: #fff; box-shadow: 0 3px 0 #2E7D32;
}
.level-btn.locked {
  background: rgba(139,90,43,0.12);
  color: rgba(93,58,26,0.35); cursor: default;
  border: 1px solid rgba(139,90,43,0.1);
}
.level-num { font-size: 18px; font-weight: 900; }
.level-stars { font-size: 9px; letter-spacing: 1px; }

/* ─── Side Panel ────────────────────────────────────────── */
.side-panel {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.3s; backdrop-filter: blur(4px);
}
.side-panel.show { opacity: 1; }
.panel-inner {
  background: linear-gradient(180deg, #F5E6C8, #EDD9B5, #D4B896);
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: 480px; max-height: 75vh;
  overflow-y: auto; padding: 20px 18px 36px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 -10px 50px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.3);
  border: 3px solid #8B5E3C; border-bottom: none;
  position: relative;
  color: #3E2510;
  -webkit-overflow-scrolling: touch;
}
.side-panel.show .panel-inner { transform: translateY(0); }
.panel-handle { width: 40px; height: 4px; background: rgba(139,90,43,0.3); border-radius: 2px; margin: 0 auto 14px; }
.panel-close {
  position: absolute; top: 14px; right: 16px;
  background: rgba(139,90,43,0.15); border: 1px solid rgba(139,90,43,0.2);
  color: #5D3A1A; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; cursor: pointer;
}
.panel-inner h2 { margin-bottom: 12px; font-size: 20px; color: #5D3A1A; }

/* ─── Milestones ────────────────────────────────────────── */
.milestone-item {
  background: rgba(139,90,43,0.08); border-radius: 14px;
  padding: 10px 14px; margin-bottom: 8px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  border: 1px solid rgba(139,90,43,0.12);
}
.milestone-item.claimed { opacity: 0.45; }
.milestone-item.reached { border: 1px solid rgba(67,160,71,0.5); background: rgba(67,160,71,0.1); }
.milestone-label { flex: 1 1 100%; font-weight: 700; font-size: 13px; color: #5D3A1A; }
.mission-bar {
  flex: 1; height: 8px; background: rgba(139,90,43,0.12);
  border-radius: 4px; overflow: hidden;
}
.mission-fill {
  height: 100%; border-radius: 4px; transition: width 0.4s;
  background: linear-gradient(90deg, #66BB6A, #43A047);
}
.milestone-reward { font-size: 11px; min-width: 70px; text-align: right; color: rgba(93,58,26,0.7); }
.mission-done { color: #2E7D32; font-weight: 800; font-size: 16px; }
.milestone-auto { font-size: 12px; color: #2E7D32; font-weight: 800; }
.milestone-time { font-size: 12px; color: rgba(93,58,26,0.5); margin-bottom: 10px; }

/* ─── Shop ──────────────────────────────────────────────── */
.shop-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(139,90,43,0.1);
  font-size: 13px; font-weight: 700; color: #3E2510;
}
.shop-item-left { display: flex; align-items: center; gap: 8px; }
.shop-item-icon { font-size: 22px; }
.shop-item-info { display: flex; flex-direction: column; }
.shop-item-info small { font-size: 10px; color: rgba(93,58,26,0.5); font-weight: 600; }
.shop-section-label { font-size: 10px; color: rgba(93,58,26,0.4); text-transform: uppercase; letter-spacing: 1px; margin: 8px 0 4px; }
.shop-divider { border: none; border-top: 1px solid rgba(139,90,43,0.12); margin: 8px 0; }
.shop-btn {
  font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 800;
  padding: 6px 14px; border: none; border-radius: 16px; cursor: pointer;
  background: rgba(139,90,43,0.12); color: #5D3A1A; transition: transform 0.15s;
  border: 1px solid rgba(139,90,43,0.15);
}
.shop-btn:active { transform: scale(0.95); }
.shop-btn.coin-btn { background: linear-gradient(135deg, #FFD54F, #FF8F00); color: #5D4037; border: none; box-shadow: 0 2px 0 #E65100; }
.shop-btn.ad-btn { background: linear-gradient(135deg, #CE93D8, #7B1FA2); border: none; box-shadow: 0 2px 0 #4A148C; }
.shop-btn.offerwall-btn { background: linear-gradient(135deg, #FFD700, #FFA000); color: #5D4037; border: none; box-shadow: 0 2px 0 #E65100; }

/* ─── Ad Overlay ────────────────────────────────────────── */
.ad-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.8); opacity: 0; transition: opacity 0.3s;
}
.ad-overlay.show { opacity: 1; }
.ad-box {
  background: linear-gradient(180deg, #F5E6C8, #E8D5A8, #D4B896);
  border-radius: 20px; padding: 28px; text-align: center;
  max-width: 300px; width: 85%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 3px solid #8B5E3C;
  color: #3E2510;
}
.ad-icon { font-size: 48px; margin-bottom: 10px; }
.ad-box h2 { font-size: 18px; margin-bottom: 6px; color: #5D3A1A; }
.ad-box p { font-size: 13px; color: rgba(93,58,26,0.6); margin-bottom: 14px; }
.ad-progress-bar {
  width: 100%; height: 8px; background: rgba(139,90,43,0.15);
  border-radius: 4px; overflow: hidden; margin-bottom: 8px;
}
.ad-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #CE93D8, #7B1FA2); border-radius: 4px; }
.ad-timer { font-size: 12px; color: rgba(93,58,26,0.5); }
.ad-close-btn {
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800;
  padding: 8px 26px; border: none; border-radius: 20px; cursor: pointer;
  background: rgba(139,90,43,0.12); color: #5D3A1A; margin-top: 12px;
  border: 1px solid rgba(139,90,43,0.2);
}
.ad-close-btn:disabled { opacity: 0.4; }
.ad-interstitial { position: relative; }
.ad-interstitial .ad-close-btn { position:absolute; top:8px; right:8px; width:32px; height:32px; padding:0; border-radius:50%; font-size:20px; line-height:32px; text-align:center; margin:0; background:rgba(0,0,0,0.3); color:#fff; border:none; cursor:pointer; display:block; }
.ad-cta-btn { display:inline-block; padding:10px 28px; background:linear-gradient(135deg,#7B1FA2,#CE93D8); color:#fff; text-decoration:none; border-radius:20px; font-weight:800; font-size:14px; margin-top:10px; }
.ad-player { display:flex; flex-direction:column; width:90vw; max-width:400px; height:70vh; max-height:500px; background:#000; border-radius:12px; overflow:hidden; }
.ad-player-header { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; background:rgba(255,255,255,0.1); }
.ad-label { color:rgba(255,255,255,0.5); font-size:11px; text-transform:uppercase; letter-spacing:1px; }
.ad-skip { color:#fff; font-size:13px; font-weight:700; cursor:pointer; padding:4px 12px; background:rgba(255,255,255,0.15); border-radius:4px; }
#ad-banner-container { animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ─── Offerwall ─────────────────────────────────────────── */
.offerwall-overlay {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.6); opacity: 0; transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.offerwall-overlay.show { opacity: 1; }
.offerwall-container {
  background: linear-gradient(180deg, #F5E6C8, #E8D5A8, #D4B896);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 3px solid #8B5E3C; border-bottom: none;
  color: #3E2510;
}
.offerwall-overlay.show .offerwall-container { transform: translateY(0); }
.offerwall-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid rgba(139,90,43,0.15);
}
.offerwall-header h2 { font-size: 17px; color: #5D3A1A; }
.offerwall-close {
  background: rgba(139,90,43,0.15); border: 1px solid rgba(139,90,43,0.2);
  color: #5D3A1A; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; cursor: pointer;
}
.offerwall-content { padding: 18px; }
.offerwall-iframe-wrap { width: 100%; height: calc(80vh - 60px); }
.offerwall-iframe { width: 100%; height: 100%; border: none; background: #E8D5A8; }
.offerwall-placeholder { text-align: center; }
.offerwall-icon { font-size: 46px; margin-bottom: 8px; }
.offerwall-placeholder h3 { font-size: 18px; margin-bottom: 4px; color: #5D3A1A; }
.offerwall-placeholder p { font-size: 13px; color: rgba(93,58,26,0.5); }
.offerwall-url { margin-top: 8px; }
.offerwall-url code { background: rgba(139,90,43,0.1); padding: 2px 6px; border-radius: 4px; font-size: 11px; color: #5D3A1A; }
.offerwall-demo-offers { margin-top: 16px; text-align: left; }
.demo-offer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 6px;
  background: rgba(139,90,43,0.08); border-radius: 12px;
  border: 1px solid rgba(139,90,43,0.1);
}
.demo-offer-icon { font-size: 24px; }
.demo-offer-info { flex: 1; }
.demo-offer-info strong { font-size: 13px; display: block; }
.demo-offer-info small { font-size: 11px; color: rgba(93,58,26,0.5); }
.demo-offer-reward { font-size: 13px; font-weight: 800; color: #D4881A; white-space: nowrap; }

/* ─── Upgrade Panel ────────────────────────────────────── */
.upgrade-card { padding-bottom: 20px; }
.upgrade-header { margin-bottom: 8px; }
.upgrade-name { font-size: 18px; font-weight: 800; color: #8B5E3C; }
.upgrade-preview {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 10px 0 12px; padding: 10px;
  background: rgba(139,90,43,0.1); border-radius: 16px;
  border: 1px solid rgba(139,90,43,0.12);
}
.upgrade-from, .upgrade-to {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.upgrade-emoji-sm { font-size: 32px; opacity: 0.6; }
.upgrade-emoji-lg { font-size: 44px; }
.upgrade-arrow { font-size: 22px; color: rgba(93,58,26,0.4); font-weight: 800; }
.upgrade-level-label { font-size: 10px; font-weight: 700; color: rgba(93,58,26,0.5); }
.upgrade-desc { font-size: 15px; font-weight: 800; margin-bottom: 2px; color: #3E2510; }
.upgrade-flavor { font-size: 12px; color: rgba(93,58,26,0.5); margin-bottom: 8px; }
.upgrade-level-dots {
  font-size: 12px; letter-spacing: 4px; color: #D4881A;
  margin-bottom: 10px;
}
.upgrade-reward {
  font-size: 13px; font-weight: 700; color: #2E7D32;
  margin-bottom: 8px; padding: 5px 12px;
  background: rgba(46,125,50,0.1); border-radius: 10px;
  display: inline-block;
}
.upgrade-cost-row {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 14px; font-weight: 700;
}
.upgrade-cost-label { font-size: 13px; color: rgba(93,58,26,0.6); }
.upgrade-cost-val { font-size: 16px; color: #D4881A; }
.upgrade-cost-have { font-size: 11px; color: rgba(93,58,26,0.35); }
.upgrade-btn-art { display: inline-flex; align-items: center; gap: 6px; }
.upgrade-btn-icon {
  width: 22px; height: 22px;
  object-fit: cover;
  object-position: 32% 32%;
  border-radius: 4px;
  filter: brightness(1.2);
}

/* ─── Slot Machine ─────────────────────────────────────── */
.slot-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 20px 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(10,2,20,0.75) 25%, rgba(10,2,20,0.95) 100%);
  pointer-events: auto;
}
.slot-spins-display {
  font-size: 15px; font-weight: 800;
  color: #FFD700;
  margin-bottom: 10px;
  text-shadow: 0 0 8px rgba(255,200,0,0.4), 0 2px 4px rgba(0,0,0,0.6);
  letter-spacing: 1px;
  background: linear-gradient(135deg, rgba(255,200,0,0.08), rgba(255,150,0,0.08));
  padding: 4px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,215,0,0.2);
}
.btn-spin {
  font-family: 'Nunito', sans-serif;
  font-size: 28px; font-weight: 900;
  padding: 16px 100px;
  border: 3px solid rgba(255,255,255,0.35);
  border-radius: 40px;
  cursor: pointer;
  background: linear-gradient(180deg, #66BB6A 0%, #43A047 50%, #388E3C 100%);
  color: #fff;
  box-shadow: 0 7px 0 #2E7D32, 0 12px 30px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.2);
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: 3px;
  position: relative;
  overflow: hidden;
}
.btn-spin::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: spin-shine 2.5s infinite;
}
@keyframes spin-shine {
  0% { left: -100%; }
  50% { left: 150%; }
  100% { left: 150%; }
}
.btn-spin:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #2E7D32, 0 4px 12px rgba(0,0,0,0.4);
}
.btn-spin:disabled {
  background: linear-gradient(180deg, #616161, #424242);
  box-shadow: 0 6px 0 #212121;
  cursor: default;
  opacity: 0.6;
}
.btn-spin:disabled::after { display: none; }
.slot-bonus-row {
  margin-top: 10px;
  display: flex; gap: 10px;
}
.slot-bonus-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 12px; font-weight: 800;
  padding: 8px 20px;
  border: 1.5px solid rgba(255,215,0,0.25);
  border-radius: 20px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(40,20,60,0.8), rgba(30,10,50,0.8));
  color: rgba(255,220,200,0.85);
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.slot-bonus-btn:active { transform: scale(0.95); }
.slot-bet-row {
  display: flex; justify-content: center; margin-bottom: 10px;
}
.slot-bet-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 14px; font-weight: 900;
  padding: 6px 28px;
  border: 2px solid rgba(255,214,0,0.5);
  border-radius: 22px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255,200,0,0.12), rgba(255,150,0,0.12));
  color: #FFD700;
  letter-spacing: 1.5px;
  transition: all 0.15s;
  text-shadow: 0 0 6px rgba(255,200,0,0.3), 0 2px 4px rgba(0,0,0,0.5);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.slot-bet-btn:active { transform: scale(0.95); }
.slot-bonus-btn.auto-active {
  background: linear-gradient(135deg, rgba(76,175,80,0.6), rgba(56,142,60,0.6));
  border-color: rgba(76,175,80,0.5);
  color: #A5D6A7;
  box-shadow: 0 0 12px rgba(76,175,80,0.35);
}

/* ─── Match-3 UI ──────────────────────────────────────── */
.match3-ui {
  position: fixed; inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex; flex-direction: column;
}
.match3-ui > * { pointer-events: auto; }

.match3-top-bar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}
.match3-level-badge {
  font-family: 'Nunito', sans-serif;
  font-size: 16px; font-weight: 900;
  color: #FFD600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  background: rgba(0,0,0,0.3);
  padding: 4px 16px;
  border-radius: 20px;
  border: 2px solid rgba(255,214,0,0.3);
}
.match3-hud-right {
  display: flex; align-items: center;
}
.match3-moves-badge {
  display: flex; flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #FF8F00, #F57F17);
  padding: 4px 14px;
  border-radius: 14px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 3px 0 #E65100;
  min-width: 48px;
  text-align: center;
}
.match3-moves-badge small {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

.match3-goal-bar {
  display: flex; justify-content: center;
  padding: 4px 16px;
  pointer-events: none;
}
.match3-goal-inner {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  padding: 5px 14px;
  border-radius: 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 12px; font-weight: 700;
  color: #fff;
}
.match3-goal-progress {
  width: 100px; height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
}
.match3-goal-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #66BB6A, #43A047);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.match3-bottom-bar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, transparent 100%);
  margin-top: auto;
}
.match3-bottom-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.3);
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.match3-bottom-btn:active { transform: scale(0.9); }
.match3-score-display {
  display: flex; flex-direction: column;
  align-items: center;
  font-family: 'Nunito', sans-serif;
  color: #fff;
}
.match3-score-display small {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase;
  opacity: 0.6;
}
.match3-score-display span {
  font-size: 22px; font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ─── Tutorial Overlay ─────────────────────────────────── */
.tutorial-overlay {
  position: fixed; inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}
.tutorial-overlay.show { opacity: 1; }
.tutorial-overlay.has-spotlight {
  background: transparent;
}
.tutorial-spotlight {
  position: absolute;
  border-radius: var(--spot-r, 12px);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.75);
  pointer-events: none;
  animation: spotPulse 1.5s ease-in-out infinite;
}
@keyframes spotPulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.75), 0 0 12px 2px rgba(255,214,0,0.4); }
  50% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.75), 0 0 20px 6px rgba(255,214,0,0.6); }
}
.tutorial-tooltip {
  position: absolute;
  max-width: 320px;
  background: linear-gradient(145deg, #FFF8E1, #FFF3E0);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 3px rgba(255,214,0,0.4);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #3E2723;
  text-align: center;
  z-index: 9001;
  animation: tutorialPop 0.35s ease;
}
.tutorial-tooltip p {
  margin: 0 0 8px 0;
  line-height: 1.4;
}
.tutorial-tooltip p:last-of-type { margin-bottom: 14px; }
.tutorial-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 15px; font-weight: 800;
  padding: 10px 36px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, #66BB6A, #43A047);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 0 #2E7D32;
  transition: transform 0.1s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tutorial-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2E7D32;
}
@keyframes tutorialPop {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.05); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.tutorial-tooltip[style*="translateX"] {
  animation-name: tutorialSlide;
}
@keyframes tutorialSlide {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ─── Achievement Toast ───────────────────────────────── */
.achievement-toast {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8500;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
  border: 2px solid rgba(255,180,0,0.5);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 20px rgba(255,200,0,0.2);
  font-family: 'Nunito', sans-serif;
  transition: top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 340px;
  min-width: 260px;
}
.achievement-toast.show { top: 16px; }
.ach-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,200,0,0.2), rgba(255,150,0,0.15));
  border-radius: 12px;
}
.ach-info { flex: 1; min-width: 0; }
.ach-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #FF8F00;
}
.ach-name {
  font-size: 15px;
  font-weight: 900;
  color: #3E2723;
  line-height: 1.2;
}
.ach-desc {
  font-size: 11px;
  font-weight: 600;
  color: rgba(62,39,35,0.5);
}
.ach-reward {
  font-size: 12px;
  font-weight: 800;
  color: #2E7D32;
  margin-top: 2px;
}

/* ─── Achievement Panel Items ─────────────────────────── */
.ach-panel-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(139,90,43,0.06);
  margin-bottom: 6px;
}
.ach-panel-item.locked { opacity: 0.45; }
.ach-panel-item.locked .ach-panel-icon { filter: grayscale(1); }
.ach-panel-icon {
  font-size: 26px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,200,0,0.1);
  border-radius: 10px;
  flex-shrink: 0;
}
.ach-panel-info { flex: 1; min-width: 0; }
.ach-panel-name {
  font-size: 13px; font-weight: 800;
  color: #3E2723;
}
.ach-panel-desc {
  font-size: 10px; font-weight: 600;
  color: rgba(62,39,35,0.4);
}
.ach-panel-reward {
  font-size: 10px; font-weight: 700;
  color: #2E7D32;
}
.ach-panel-check {
  font-size: 18px;
  color: #43A047;
}

/* ─── Daily Challenges ────────────────────────────────── */
.daily-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.daily-timer {
  font-size: 11px; font-weight: 700;
  color: rgba(93,58,26,0.4);
}
.daily-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(139,90,43,0.06);
  margin-bottom: 8px;
  border: 1px solid rgba(139,90,43,0.08);
}
.daily-item.completed { background: rgba(76,175,80,0.08); border-color: rgba(76,175,80,0.2); }
.daily-item.claimed { opacity: 0.5; }
.daily-icon {
  font-size: 28px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,200,0,0.1);
  border-radius: 10px;
  flex-shrink: 0;
}
.daily-info { flex: 1; min-width: 0; }
.daily-text {
  font-size: 13px; font-weight: 800;
  color: #3E2723;
  margin-bottom: 2px;
}
.daily-diff {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}
.daily-diff.easy { background: rgba(76,175,80,0.15); color: #2E7D32; }
.daily-diff.medium { background: rgba(255,152,0,0.15); color: #E65100; }
.daily-diff.hard { background: rgba(244,67,54,0.15); color: #C62828; }
.daily-progress-bar {
  width: 100%; height: 6px;
  background: rgba(139,90,43,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}
.daily-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #66BB6A, #43A047);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.daily-progress-text {
  font-size: 10px; font-weight: 700;
  color: rgba(62,39,35,0.4);
}
.daily-reward {
  font-size: 10px; font-weight: 700;
  color: #2E7D32;
}
.daily-claim-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 11px; font-weight: 800;
  padding: 6px 14px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #66BB6A, #43A047);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 0 #2E7D32;
  flex-shrink: 0;
  transition: transform 0.1s;
}
.daily-claim-btn:active { transform: scale(0.95); }
.daily-claimed-mark {
  font-size: 18px; color: #43A047; flex-shrink: 0;
}

/* ─── Free Chest Button ────────────────────────────────── */
.chest-btn {
  position: fixed;
  top: 64px; right: 10px;
  z-index: 15;
  display: flex; align-items: center; gap: 4px;
  font-family: 'Nunito', sans-serif;
  font-size: 12px; font-weight: 800;
  padding: 8px 14px;
  border: 2px solid rgba(255,200,100,0.3);
  border-radius: 20px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(139,90,43,0.7), rgba(101,67,33,0.8));
  color: rgba(255,235,200,0.8);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.chest-btn:active { transform: scale(0.92); }
.chest-btn.chest-ready {
  background: linear-gradient(135deg, #66BB6A, #43A047);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 3px 12px rgba(76,175,80,0.4);
}

/* ─── Daily Login Grid ─────────────────────────────────── */
.daily-login-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.daily-login-day {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(139,90,43,0.08);
  border: 1px solid rgba(139,90,43,0.1);
  font-size: 11px;
  color: #3E2510;
}
.daily-login-day.today {
  background: rgba(255,180,0,0.15);
  border-color: rgba(255,180,0,0.4);
  box-shadow: 0 0 10px rgba(255,180,0,0.2);
}
.daily-login-day.past { opacity: 0.5; }
.daily-login-day.claimed { opacity: 0.5; }
.daily-login-day-num {
  font-size: 10px; font-weight: 800;
  color: #5D3A1A;
  text-transform: uppercase;
}
.daily-login-day-reward {
  display: flex; flex-direction: column;
  align-items: center; gap: 1px;
  font-size: 11px; font-weight: 700;
}
.daily-login-check {
  position: absolute; top: 4px; right: 6px;
  font-size: 14px; color: #43A047;
}
.daily-login-glow {
  position: absolute; top: 3px; right: 6px;
  font-size: 16px; font-weight: 900;
  color: #FF8F00;
  animation: pulse 1s ease-in-out infinite;
}

/* ─── Animations ───────────────────────────────────────── */
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* ─── Shield Indicator ────────────────────────────────────── */
.shield-indicator {
  position: fixed;
  top: 50px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0.4;
  transition: all 0.3s ease;
  z-index: 50;
}
.shield-indicator.active {
  opacity: 1;
  background: rgba(79,195,247,0.3);
  box-shadow: 0 0 15px rgba(79,195,247,0.5);
  animation: shield-pulse 2s ease-in-out infinite;
}
@keyframes shield-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(79,195,247,0.4); }
  50% { box-shadow: 0 0 25px rgba(79,195,247,0.7); }
}

/* ─── Attack Result Card ─────────────────────────────────── */
.attack-result-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.attack-result-card p {
  font-size: 15px;
  line-height: 1.5;
}
.attack-result-card p b {
  color: #FFD700;
}
.attack-level-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0;
  font-size: 20px;
  font-weight: 800;
}
.level-before { color: #4CAF50; }
.level-arrow { color: #999; font-size: 16px; }
.level-after { color: #E53935; }
.attack-coins-gained {
  font-size: 18px;
  font-weight: 800;
  color: #FFD700;
  margin: 8px 0 4px;
}

/* ─── Attack Garden Selection ────────────────────────────── */
.attack-garden-card {
  max-width: 360px;
}
.attack-garden-card h2 {
  font-size: 20px;
  color: #E53935;
}
.attack-garden-sub {
  font-size: 13px;
  color: #666;
  margin: 4px 0 10px;
}
.attack-slots-list {
  max-height: 320px;
  overflow-y: auto;
  margin: 0 -8px;
  padding: 0 8px;
}
.attack-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 6px 0;
  background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
  border: 2px solid #FFE0B2;
  border-radius: 12px;
  transition: all 0.2s;
}
.attack-slot:hover {
  border-color: #FF6F00;
  box-shadow: 0 2px 12px rgba(255,111,0,0.2);
}
.attack-slot-emoji {
  font-size: 32px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  flex-shrink: 0;
}
.attack-slot-info {
  flex: 1;
  min-width: 0;
}
.attack-slot-name {
  font-weight: 800;
  font-size: 14px;
  color: #333;
}
.attack-slot-level {
  font-size: 11px;
  color: #888;
  margin: 2px 0;
}
.attack-slot-reward {
  font-size: 12px;
  color: #FF6F00;
  font-weight: 700;
}
.attack-slot-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #E53935, #C62828);
  color: white;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(229,57,53,0.4);
  transition: transform 0.15s;
}
.attack-slot-btn:active {
  transform: scale(0.9);
}
.attack-cancel-btn {
  margin-top: 10px;
  font-size: 14px;
  padding: 10px 30px;
}

/* ─── Attack History List ────────────────────────────────── */
.attack-list {
  max-height: 200px;
  overflow-y: auto;
}
.attack-item {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.attack-item small {
  margin-left: auto;
  color: #999;
  font-size: 11px;
}
.revenge-btn {
  padding: 3px 10px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #E53935, #C62828);
  color: white;
  font-weight: 800;
  font-size: 10px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(229,57,53,0.3);
}

/* ─── Card Collection ─────────────────────────────────────── */

/* Chest Opening Animation */
.chest-opening-card { max-width: 380px; }
.chest-opening-card h2 { font-size: 20px; margin-bottom: 10px; }
.chest-cards-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
  perspective: 800px;
}
.card-flip-container {
  width: 80px;
  height: 110px;
  perspective: 600px;
  cursor: pointer;
}
.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}
.card-flip-container.flipped .card-flip-inner {
  transform: rotateY(180deg);
}
.card-flip-container.flipped {
  animation: cardBounce 0.4s ease-out;
}
@keyframes cardBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.card-back {
  background: linear-gradient(135deg, #3E2723, #5D4037);
  font-size: 36px;
  border: 2px solid #8D6E63;
}
.card-front {
  transform: rotateY(180deg);
  background: #FFF;
  border: 3px solid #DDD;
  padding: 6px;
}
.card-rarity-common  { border-color: #9E9E9E; }
.card-rarity-rare    { border-color: #4FC3F7; box-shadow: 0 0 12px rgba(79,195,247,0.4); }
.card-rarity-epic    { border-color: #CE93D8; box-shadow: 0 0 14px rgba(206,147,216,0.5); }
.card-rarity-legendary { border-color: #FFD600; box-shadow: 0 0 18px rgba(255,214,0,0.6); }
.card-emoji { font-size: 28px; margin-bottom: 4px; }
.card-name { font-size: 9px; font-weight: 800; color: #333; text-align: center; line-height: 1.2; }
.card-rarity-label { font-size: 8px; font-weight: 700; margin-top: 2px; }
.card-new-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #4CAF50;
  color: white;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(76,175,80,0.4);
}
.card-dust-badge {
  font-size: 9px;
  color: #FF9800;
  font-weight: 700;
  margin-top: 2px;
}
.chest-summary {
  font-size: 13px;
  color: #666;
  margin: 8px 0;
}
.chest-tap-btn, .chest-done-btn { margin-top: 6px; }

/* Card Album */
.album-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #5D3A1A;
  padding: 6px 0 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 10px;
}
.album-set {
  margin: 12px 0;
  padding: 10px;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
}
.album-set-complete {
  border-color: #FFD700;
  background: rgba(255,248,225,0.6);
}
.album-set-header {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 14px;
  color: #3E2510;
  margin-bottom: 8px;
}
.album-set-progress { color: #888; font-weight: 700; }
.album-set-reward-claimed {
  font-size: 12px;
  color: #4CAF50;
  font-weight: 700;
  margin-bottom: 6px;
}
.album-cards-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
}
.album-card {
  min-width: 62px;
  padding: 8px 4px;
  border-radius: 10px;
  text-align: center;
  border: 2px solid #E0E0E0;
  background: linear-gradient(180deg, #FFF, #F5F5F5);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.album-card:active { transform: scale(0.95); }
.album-card.locked {
  opacity: 0.35;
  filter: grayscale(1);
}
.album-card.owned.album-rarity-rare    { border-color: #4FC3F7; box-shadow: 0 2px 8px rgba(79,195,247,0.25); }
.album-card.owned.album-rarity-epic    { border-color: #CE93D8; box-shadow: 0 2px 8px rgba(206,147,216,0.3); }
.album-card.owned.album-rarity-legendary { border-color: #FFD600; background: linear-gradient(135deg, #FFFDE7, #FFF9C4); box-shadow: 0 2px 12px rgba(255,214,0,0.4); }
.album-card-emoji { font-size: 24px; }
.album-card-name { font-size: 9px; font-weight: 700; color: #333; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58px; }
.album-card-rarity { font-size: 8px; font-weight: 700; }
.album-card-count { font-size: 9px; color: #FF9800; font-weight: 700; }
.album-set-reward {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
  text-align: center;
}

/* Chest Shop */
.chest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.chest-tier-card {
  position: relative;
  padding: 12px 8px 10px;
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border: 2px solid #FFE0B2;
  border-radius: 14px;
  text-align: center;
}
.chest-tier-card.chest-disabled { opacity: 0.5; }
.chest-tier-badge {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 10px;
  font-size: 9px;
  font-weight: 900;
  color: white;
  border-radius: 6px;
  white-space: nowrap;
}
.chest-tier-emoji { font-size: 36px; margin: 6px 0 2px; }
.chest-tier-name { font-weight: 900; font-size: 13px; color: #333; }
.chest-tier-cards { font-size: 11px; color: #888; font-weight: 700; margin: 2px 0; }
.chest-tier-odds {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 4px 0 8px;
  flex-wrap: wrap;
}
.chest-odd {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  background: rgba(0,0,0,0.04);
  border-radius: 4px;
}
.chest-dust-trade {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-top: 12px;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
}
.chest-dust-info { display: flex; flex-direction: column; font-weight: 800; font-size: 13px; color: #333; }
.chest-buy-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF6F00, #FF9100);
  color: white;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
  box-shadow: 0 3px 8px rgba(255,111,0,0.3);
}
.chest-buy-btn:disabled { opacity: 0.5; cursor: default; }

/* ─── Events System ───────────────────────────────────────── */

/* Event Banner (toast-style, slides in from top) */
.event-banner {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 90%;
  max-width: 400px;
}
.event-banner.show { top: 10px; }
.event-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border-radius: 14px;
  border: 2px solid #FFD700;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.event-banner-emoji { font-size: 32px; flex-shrink: 0; }
.event-banner-info { flex: 1; min-width: 0; }
.event-banner-name { font-weight: 900; font-size: 15px; }
.event-banner-desc { font-size: 11px; color: #666; margin: 1px 0; }
.event-banner-timer { font-size: 10px; color: #999; font-weight: 700; }
.event-banner-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

/* Event Panel */
.event-panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}
.event-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.event-panel-timer {
  font-size: 12px;
  color: #888;
  font-weight: 700;
}

/* Event Milestones */
.event-milestone {
  display: flex;
  flex-direction: column;
  padding: 10px;
  margin: 6px 0;
  background: rgba(255,255,255,0.5);
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  position: relative;
}
.event-milestone.event-ms-claimed { opacity: 0.6; }
.event-milestone.event-ms-ready {
  border-color: #4CAF50;
  box-shadow: 0 0 10px rgba(76,175,80,0.2);
}
.event-ms-progress {
  height: 6px;
  background: #E0E0E0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.event-ms-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.event-ms-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.event-ms-target { color: #555; font-weight: 700; }
.event-ms-reward { color: #FF6F00; font-weight: 700; }
.event-ms-check { position: absolute; right: 10px; top: 10px; font-size: 18px; }
.event-ms-claim-btn {
  align-self: flex-end;
  margin-top: 6px;
  padding: 6px 18px;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ─── Leaderboard ─────────────────────────────────────────── */
.lb-tabs {
  display: flex;
  gap: 4px;
  margin: 10px 0;
  overflow-x: auto;
}
.lb-tab {
  flex: 1;
  padding: 8px 4px;
  border: 2px solid #E0E0E0;
  border-radius: 10px;
  background: #FFF;
  font-size: 11px;
  font-weight: 800;
  font-family: Nunito, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  color: #666;
}
.lb-tab.active {
  border-color: #FFD700;
  background: #FFFDE7;
  color: #FF6F00;
}
.lb-content { min-height: 200px; }
.lb-loading { text-align: center; color: #999; padding: 40px 0; font-size: 14px; }

/* Podium */
.lb-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  margin: 16px 0;
  padding: 10px 0;
}
.lb-podium-item {
  text-align: center;
  padding: 10px 8px 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border: 2px solid #FFE0B2;
  min-width: 80px;
}
.lb-podium-item.lb-is-me {
  border-color: #FFD700;
  box-shadow: 0 0 12px rgba(255,215,0,0.4);
}
.lb-first {
  transform: scale(1.1);
  border-color: #FFD700;
  background: linear-gradient(135deg, #FFFDE7, #FFF9C4);
}
.lb-podium-medal { font-size: 28px; }
.lb-podium-name { font-size: 11px; font-weight: 800; color: #333; margin: 4px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.lb-podium-value { font-size: 13px; font-weight: 900; color: #FF6F00; }

/* List rows */
.lb-list { margin: 8px 0; }
.lb-row {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
}
.lb-row.lb-is-me {
  background: #FFFDE7;
  border-radius: 8px;
  border: 1px solid #FFD700;
  font-weight: 800;
}
.lb-rank { width: 36px; font-weight: 800; color: #888; }
.lb-name { flex: 1; font-weight: 700; color: #333; }
.lb-value { font-weight: 800; color: #FF6F00; }

/* My rank footer */
.lb-my-rank {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  margin-top: 10px;
  background: #FFFDE7;
  border-radius: 10px;
  border: 1px solid #FFD700;
  font-size: 13px;
  font-weight: 700;
  color: #555;
}

/* ─── Friends & Referral ──────────────────────────────────── */
.friends-section {
  margin: 12px 0;
  padding: 12px;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
}
.friends-section h3 { margin: 0 0 6px; font-size: 14px; color: #3E2510; }
.friends-desc { font-size: 12px; color: #888; margin: 4px 0 8px; }
.friends-code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.friends-code {
  flex: 1;
  padding: 10px;
  background: #FFFDE7;
  border: 2px dashed #FFD700;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 4px;
  color: #FF6F00;
  font-family: monospace;
}
.friends-copy-btn {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  color: white;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
  white-space: nowrap;
}
.friends-ref-stats { font-size: 11px; color: #999; text-align: center; }
.friends-enter-code {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}
.friends-use-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF6F00, #FF9100);
  color: white;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
}
.friends-gifts-pending {
  background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
  border-color: #FFD700;
}
.friends-claim-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  color: white;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
  box-shadow: 0 3px 10px rgba(76,175,80,0.3);
  animation: pulse 1.5s ease-in-out infinite;
}
.friends-list { max-height: 200px; overflow-y: auto; }
.friends-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.friends-row-info { display: flex; flex-direction: column; }
.friends-row-name { font-weight: 800; font-size: 14px; color: #333; }
.friends-row-coins { font-size: 11px; color: #888; }
.friends-gift-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF6F00, #FF9100);
  color: white;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
}
.friends-gift-btn.disabled {
  background: #E0E0E0;
  color: #999;
  cursor: default;
}

/* ─── Pet System ──────────────────────────────────────────── */
.pet-active-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border: 2px solid #FFD700;
  border-radius: 14px;
  margin: 10px 0;
}
.pet-active-emoji { font-size: 40px; }
.pet-active-name { font-weight: 900; font-size: 16px; color: #333; }
.pet-active-bonus { font-weight: 800; font-size: 14px; }
.pet-active-tag { font-size: 10px; color: #999; font-weight: 700; margin-top: 2px; }

.pet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.pet-card {
  padding: 12px 8px;
  background: rgba(255,255,255,0.5);
  border: 2px solid #E0E0E0;
  border-radius: 14px;
  text-align: center;
  transition: all 0.2s;
}
.pet-card.pet-owned { border-color: #FFE0B2; background: rgba(255,248,225,0.5); }
.pet-card.pet-is-active { border-color: #FFD700; box-shadow: 0 0 12px rgba(255,215,0,0.3); }
.pet-card.pet-locked { opacity: 0.5; }
.pet-card-emoji { font-size: 36px; margin-bottom: 4px; }
.pet-card-name { font-weight: 900; font-size: 14px; color: #333; }
.pet-card-level { font-size: 11px; color: #888; font-weight: 700; margin: 2px 0; }
.pet-card-bonus { font-size: 12px; font-weight: 800; margin: 2px 0; }
.pet-card-max { font-size: 12px; color: #FFD600; font-weight: 800; margin: 4px 0; }
.pet-card-locked { font-size: 20px; margin: 6px 0; }
.pet-card-req { font-size: 10px; color: #999; }
.pet-card-unlock-ready { font-size: 11px; color: #4CAF50; font-weight: 800; margin: 4px 0; }

.pet-feed-btn, .pet-equip-btn, .pet-unlock-btn {
  display: block;
  width: 100%;
  padding: 6px;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
  margin-top: 4px;
  color: white;
}
.pet-feed-btn { background: linear-gradient(135deg, #FF6F00, #FF9100); }
.pet-feed-btn.disabled { background: #E0E0E0; color: #999; cursor: default; }
.pet-equip-btn { background: linear-gradient(135deg, #4FC3F7, #29B6F6); }
.pet-unlock-btn { }
.pet-equipped-badge { font-size: 10px; color: #4CAF50; font-weight: 800; margin-top: 4px; }

/* ─── Gem Shop ────────────────────────────────────────────── */
.shop-tabs {
  display: flex;
  gap: 4px;
  margin: 10px 0;
}
.shop-tab {
  flex: 1;
  padding: 8px 4px;
  border: 2px solid #E0E0E0;
  border-radius: 10px;
  background: #FFF;
  font-size: 11px;
  font-weight: 800;
  font-family: Nunito, sans-serif;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}
.shop-tab.active {
  border-color: #FFD700;
  background: #FFFDE7;
  color: #FF6F00;
}

/* Special offers */
.shop-special-card {
  position: relative;
  margin: 10px 0;
  padding: 16px;
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border: 2px solid #FFD700;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(255,215,0,0.2);
}
.shop-special-badge {
  position: absolute;
  top: 10px;
  right: -20px;
  padding: 3px 32px;
  font-size: 10px;
  font-weight: 900;
  color: white;
  transform: rotate(35deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
}
.shop-special-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.shop-special-emoji { font-size: 32px; }
.shop-special-name { font-weight: 900; font-size: 16px; color: #333; }
.shop-special-desc { font-size: 12px; color: #888; }
.shop-special-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.shop-offer-item {
  padding: 4px 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #555;
}
.shop-special-price {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.shop-price-old {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
}
.shop-one-time {
  font-size: 10px;
  color: #FF6F00;
  font-weight: 700;
  text-align: center;
  margin-top: 4px;
}

/* Package grid */
.shop-pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}
.shop-pack-card {
  position: relative;
  padding: 16px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,248,225,0.6));
  border: 2px solid #E0E0E0;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}
.shop-pack-card:active { transform: scale(0.97); }
.shop-pack-tagged { border-color: #FFD700; box-shadow: 0 3px 12px rgba(255,215,0,0.2); }
.shop-pack-tag {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 12px;
  background: linear-gradient(135deg, #FFD600, #FF9800);
  color: #333;
  font-size: 9px;
  font-weight: 900;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(255,152,0,0.3);
}
.shop-pack-emoji { font-size: 36px; margin-bottom: 2px; }
.shop-pack-amount { font-size: 24px; font-weight: 900; color: #333; }
.shop-pack-name { font-size: 11px; color: #888; font-weight: 700; margin: 4px 0 10px; }

.shop-buy-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4CAF50, #43A047);
  color: white;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
  box-shadow: 0 4px 12px rgba(76,175,80,0.35);
  transition: transform 0.1s;
}
.shop-buy-btn:active { transform: scale(0.95); }

/* ─── Fortune Wheel ───────────────────────────────────────── */
.wheel-card { max-width: 360px; text-align: center; }
.wheel-card h2 { margin-bottom: 4px; }
.wheel-sub { font-size: 13px; color: #888; margin: 0 0 12px; }
.wheel-container {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 16px;
}
.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: #E53935;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 0 6px #FFD700, 0 0 0 10px #B8860B, 0 6px 20px rgba(0,0,0,0.3);
  overflow: hidden;
}
.wheel-label {
  position: absolute;
  font-size: 8px;
  font-weight: 900;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  white-space: nowrap;
  pointer-events: none;
}
.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #FFD700, #FF9800);
  border-radius: 50%;
  border: 3px solid #B8860B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 5;
}
.wheel-spin-btn {
  font-size: 18px;
  padding: 12px 40px;
  animation: pulse 1.5s ease-in-out infinite;
}
.wheel-result-emoji {
  font-size: 40px;
  margin: 16px 0 8px;
}
.wheel-result-detail {
  font-size: 16px;
  font-weight: 800;
  color: #FF6F00;
  margin: 8px 0 16px;
}

/* ─── Clan System ─────────────────────────────────────────── */
.clan-create-box {
  padding: 12px;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  margin: 10px 0;
}
.clan-create-box h3 { margin: 0 0 2px; font-size: 14px; }
.clan-create-row { display: flex; gap: 8px; }
.clan-create-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  color: white;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
}
.clan-list { max-height: 250px; overflow-y: auto; }
.clan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.clan-row-name { font-weight: 800; font-size: 14px; color: #333; }
.clan-row-stats { font-size: 10px; color: #888; display: block; }
.clan-join-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF6F00, #FF9100);
  color: white;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
}
.clan-join-btn:disabled { background: #E0E0E0; color: #999; }

.clan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.clan-header h2 { margin: 0; }
.clan-member-count { font-size: 12px; color: #888; font-weight: 700; }
.clan-members { max-height: 150px; overflow-y: auto; }
.clan-member {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
}
.clan-leader { background: #FFFDE7; border-radius: 6px; }
.clan-m-name { font-weight: 700; color: #333; }
.clan-m-stats { font-size: 11px; color: #888; }

.clan-chat-box {
  height: 160px;
  overflow-y: auto;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 8px;
}
.clan-chat-empty { color: #999; font-size: 13px; text-align: center; padding: 40px 0; }
.clan-msg { font-size: 12px; margin: 4px 0; line-height: 1.4; }
.clan-msg b { color: #FF6F00; margin-right: 4px; }
.clan-msg small { color: #BBB; font-size: 10px; margin-left: 4px; }
.clan-msg-system { color: #888; font-style: italic; }
.clan-msg-system b { color: #888; }
.clan-chat-input-row { display: flex; gap: 6px; margin-top: 8px; }
.clan-chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 13px;
  font-family: Nunito, sans-serif;
  outline: none;
}
.clan-chat-input:focus { border-color: #FFD700; }
.clan-send-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  color: white;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
}
.clan-leave-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: rgba(229,57,53,0.1);
  color: #E53935;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
}

/* ─── Notifications ───────────────────────────────────────── */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #E53935;
  color: white;
  font-size: 9px;
  font-weight: 900;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(229,57,53,0.4);
  pointer-events: none;
  z-index: 10;
}
.notif-actions { margin: 10px 0; }
.notif-action-item {
  padding: 10px 12px;
  margin: 4px 0;
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border: 1px solid #FFE0B2;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #FF6F00;
}
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.notif-item.notif-read { opacity: 0.6; }
.notif-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-weight: 800; font-size: 13px; color: #333; }
.notif-body { font-size: 11px; color: #888; margin-top: 1px; }
.notif-item small { color: #BBB; font-size: 10px; flex-shrink: 0; }

/* ─── Scratch Cards ───────────────────────────────────────── */
.scratch-card { max-width: 340px; text-align: center; }
.scratch-sub { font-size: 13px; color: #888; margin: 4px 0 12px; }
.scratch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 auto;
  max-width: 260px;
}
.scratch-cell {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.scratch-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8D6E63, #6D4C41);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #D7CCC8;
  font-weight: 900;
  transition: opacity 0.3s, transform 0.3s;
}
.scratch-cell.scratched .scratch-cover {
  opacity: 0;
  transform: scale(0.5);
}
.scratch-prize {
  position: absolute;
  inset: 0;
  background: #FFF8E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid #E0E0E0;
  border-radius: 10px;
}
.scratch-winner { border-color: #FFD700; }
.scratch-highlight {
  background: #FFFDE7;
  border-color: #FFD700;
  box-shadow: 0 0 12px rgba(255,215,0,0.5);
  animation: pulse 0.8s ease-in-out infinite;
}
.scratch-remaining { font-size: 11px; color: #999; margin: 10px 0 4px; }
.scratch-prize-text { font-size: 16px; color: #FF6F00; font-weight: 800; margin: 8px 0; }

/* ─── Season Pass ─────────────────────────────────────────── */
.sp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.sp-level { font-weight: 900; font-size: 16px; color: #FF6F00; }
.sp-days { font-size: 12px; color: #888; font-weight: 700; }
.sp-xp-bar {
  position: relative;
  height: 20px;
  background: #E0E0E0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.sp-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6F00, #FFB300);
  border-radius: 10px;
  transition: width 0.3s;
}
.sp-xp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: #333;
}
.sp-premium-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1A237E, #311B92);
  border: 2px solid #FFD700;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #FFD700;
  box-shadow: 0 4px 16px rgba(26,35,126,0.3);
}
.sp-buy-premium {
  padding: 8px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #FFD600, #FF9800);
  color: #333;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
  box-shadow: 0 3px 10px rgba(255,152,0,0.4);
  animation: pulse 2s ease-in-out infinite;
}
.sp-premium-active {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #FFD600;
  margin-bottom: 10px;
}
.sp-tiers { max-height: 300px; overflow-y: auto; }
.sp-tier {
  display: flex;
  align-items: stretch;
  margin: 4px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}
.sp-tier.sp-locked { opacity: 0.5; }
.sp-tier-level {
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: white;
  background: #FF6F00;
  flex-shrink: 0;
}
.sp-locked .sp-tier-level { background: #BDBDBD; }
.sp-tier-free, .sp-tier-prem {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sp-tier-free { background: rgba(255,255,255,0.5); }
.sp-tier-prem { background: rgba(255,248,225,0.5); }
.sp-prem-locked { opacity: 0.4; }
.sp-claim-btn {
  padding: 3px 10px;
  border: none;
  border-radius: 6px;
  background: #4CAF50;
  color: white;
  font-weight: 800;
  font-size: 9px;
  cursor: pointer;
  font-family: Nunito, sans-serif;
}
.sp-claim-prem { background: #FFD600; color: #333; }
.sp-claimed { font-size: 12px; }

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,90,43,0.25); border-radius: 2px; }
