﻿/* ============================================================
   Welcome chest — pixel / dark game theme (FarmBrawl)
   ============================================================ */
.welcome-chest-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 95000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(8, 6, 4, 0.78) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  box-sizing: border-box !important;
}
.welcome-chest-panel {
  position: relative;
  max-width: 26rem !important;
  width: 100% !important;
  border-radius: 0 !important;
  border: 4px solid #0d0a07 !important;
  box-shadow:
    0 0 0 3px #e8b830,
    0 0 0 6px #0d0a07,
    0 18px 48px rgba(0, 0, 0, 0.65) !important;
  background: linear-gradient(180deg, #2a1f14 0%, #1a1410 55%, #120e0a 100%) !important;
  color: #e6ddd0 !important;
  overflow: hidden !important;
  animation: welcomeChestIn .4s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
  transform-origin: center center;
}
.welcome-chest-panel::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto;
  height: 55%;
  background: radial-gradient(ellipse at 50% 0%, rgba(232, 184, 48, 0.18), transparent 65%) !important;
  pointer-events: none;
  z-index: 0;
}
.welcome-chest-sparkle {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 8px #fde047;
  opacity: 0.85;
  animation: welcomeChestSparkle 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
.welcome-chest-sparkle.s1 { top: 0.65rem; right: 1.1rem; animation-delay: 0s; }
.welcome-chest-sparkle.s2 { top: 2.4rem; right: 2.6rem; width: 0.3rem; height: 0.3rem; animation-delay: .6s; }
.welcome-chest-sparkle.s3 { top: 1.2rem; left: 1.4rem; animation-delay: 1.1s; }
@keyframes welcomeChestSparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes welcomeChestIn {
  0% { opacity: 0; transform: scale(0.88) translateY(18px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.welcome-chest-header {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #3f6f29 0%, #6ab04a 45%, #c49a20 100%) !important;
  border-bottom: 3px solid #0d0a07 !important;
  padding: 0.95rem 1rem 1rem !important;
  overflow: hidden;
}
.welcome-chest-header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.welcome-chest-titles { min-width: 0; flex: 1; }
.welcome-chest-title {
  font-family: "Press Start 2P", "Courier New", monospace !important;
  font-size: 11px !important;
  line-height: 1.85 !important;
  font-weight: 400 !important;
  color: #fff8e7 !important;
  text-shadow: 2px 2px 0 #0d0a07 !important;
  letter-spacing: 0.02em !important;
  overflow: visible !important;
}
.welcome-chest-subtitle {
  font-family: Nunito, "Segoe UI", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: rgba(255, 248, 231, 0.9) !important;
  margin-top: 4px !important;
  line-height: 1.35 !important;
}
.welcome-chest-gift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  flex-shrink: 0;
  border-radius: 0 !important;
  border: 2px solid #0d0a07 !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(0,0,0,0.15)) !important;
  color: #fff8e7 !important;
  box-shadow: 2px 2px 0 #0d0a07 !important;
  font-size: 1.35rem;
  animation: welcomeChestGift 2.8s ease-in-out infinite;
}
@keyframes welcomeChestGift {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-3px); }
}
.welcome-chest-badge-free {
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 0 !important;
  border: 2px solid #0d0a07 !important;
  background: linear-gradient(180deg, #fde68a, #e8b830) !important;
  color: #1a1410 !important;
  font-family: "Press Start 2P", monospace !important;
  font-size: 8px !important;
  line-height: 1.6 !important;
  padding: 5px 8px !important;
  box-shadow: 2px 2px 0 #0d0a07 !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em;
}
.welcome-chest-body {
  position: relative;
  z-index: 1;
  padding: 1rem 1.05rem 1.15rem !important;
}
.welcome-chest-reward {
  display: flex;
  align-items: center;
  gap: 0.75rem !important;
  padding: 0.8rem !important;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, rgba(42, 31, 20, 0.95), rgba(26, 20, 16, 0.98)) !important;
  border: 2px solid rgba(232, 184, 48, 0.45) !important;
  border-radius: 0 !important;
  box-shadow: 3px 3px 0 #0d0a07 !important;
}
.welcome-chest-plant-wrap {
  position: relative;
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-chest-plant-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 176, 74, 0.35) 0%, transparent 70%);
  animation: welcomeChestGlow 2.4s ease-in-out infinite;
}
@keyframes welcomeChestGlow {
  0%, 100% { transform: scale(0.92); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 1; }
}
.welcome-chest-reward .art-img-wrap,
.welcome-chest-reward .crop-art-img {
  position: relative;
  z-index: 1;
  width: 4.5rem !important;
  height: 4.5rem !important;
  max-width: 4.5rem;
  max-height: 4.5rem;
  filter: drop-shadow(0 6px 10px rgba(5, 150, 105, 0.28));
}
.welcome-chest-reward-info { min-width: 0; text-align: left; }
.welcome-chest-plant-name {
  font-family: Nunito, system-ui, sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #fde68a !important;
  line-height: 1.3 !important;
}
.welcome-chest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.welcome-chest-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 0 !important;
  font-family: Nunito, system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  border: 1px solid rgba(0,0,0,0.35) !important;
}
.welcome-chest-chip--green {
  color: #d9f99d !important;
  background: rgba(106, 176, 74, 0.25) !important;
  border-color: rgba(106, 176, 74, 0.5) !important;
}
.welcome-chest-chip--gold {
  color: #fde68a !important;
  background: rgba(232, 184, 48, 0.18) !important;
  border-color: rgba(232, 184, 48, 0.45) !important;
}
.welcome-chest-chip--blue {
  color: #bae6fd !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}
.welcome-chest-hint {
  margin-top: 0.4rem;
  color: #b8a99a !important;
  font-family: Nunito, system-ui, sans-serif !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}
.welcome-chest-notice {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.55rem !important;
  margin: 0.75rem 0 0.9rem !important;
  padding: 0.7rem 0.8rem !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 2px solid rgba(248, 113, 113, 0.35) !important;
  border-radius: 0 !important;
  color: #fecaca !important;
  font-family: Nunito, system-ui, sans-serif !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
}
.welcome-chest-notice strong { color: #fde68a !important; }
.welcome-chest-notice-icon {
  color: #f87171 !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
}
.welcome-chest-btn {
  width: 100% !important;
  border-radius: 0 !important;
  border: 3px solid #0d0a07 !important;
  background: linear-gradient(180deg, #86d46a 0%, #6ab04a 55%, #3f6f29 100%) !important;
  color: #0d0a07 !important;
  font-family: "Press Start 2P", monospace !important;
  font-size: 10px !important;
  line-height: 1.8 !important;
  font-weight: 400 !important;
  padding: 14px 12px !important;
  box-shadow: 3px 3px 0 #0d0a07 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  white-space: normal !important;
}
.welcome-chest-btn:hover { filter: brightness(1.08) !important; }
.welcome-chest-btn:disabled { opacity: 0.65 !important; cursor: wait !important; }
.welcome-chest-footer {
  margin-top: 0.65rem !important;
  text-align: center !important;
  font-family: Nunito, system-ui, sans-serif !important;
  font-size: 11px !important;
  color: #8a7a6a !important;
  line-height: 1.35 !important;
}
.welcome-chest-emoji {
  font-size: 2.6rem !important;
  line-height: 1 !important;
  position: relative;
  z-index: 1;
}
@media (max-width: 480px) {
  .welcome-chest-title { font-size: 9px !important; }
  .welcome-chest-btn { font-size: 9px !important; padding: 12px 10px !important; }
  .welcome-chest-reward { flex-direction: column; text-align: center; }
  .welcome-chest-reward-info { text-align: center; }
  .welcome-chest-chips { justify-content: center; }
}
