/* Android WebView fallback styles. Keep colors as hex because older WebView
   builds may ignore Tailwind v4 oklch color variables. */
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 32px;
}

html.lobby-bg,
body.lobby-bg {
  background: #ffd915 url("/assets/homepage-bg-top-bg2.png") center top / cover no-repeat fixed !important;
}

html.lobby-bg #root,
body.lobby-bg #root {
  background: transparent !important;
}

.gold-gradient,
.btn-gold {
  color: #1a1000 !important;
  background: linear-gradient(135deg, #ffd966 0%, #f5c842 38%, #d4a017 70%, #a66a00 100%) !important;
  border-color: #d4a017 !important;
  box-shadow: 0 4px 14px rgba(212, 160, 23, 0.25) !important;
}

.gold-gradient span,
.btn-gold span,
.text-dark {
  color: #1a1000 !important;
}

.bg-white,
.bg-white\/80,
.bg-white\/90 {
  background-color: #ffffff !important;
}

.bg-gray-50 {
  background-color: #f9fafb !important;
}

.bg-gray-100 {
  background-color: #f3f4f6 !important;
}

.bg-gray-200 {
  background-color: #e5e7eb !important;
}

.bg-red-500 {
  background-color: #ef4444 !important;
}

.bg-blue-50 {
  background-color: #eff6ff !important;
}

.bg-amber-100 {
  background-color: #fef3c7 !important;
}

.bg-green-50 {
  background-color: #f0fdf4 !important;
}

.text-black {
  color: #000000 !important;
}

.text-white {
  color: #ffffff !important;
}

.text-gray-400 {
  color: #9ca3af !important;
}

.text-gray-500 {
  color: #6b7280 !important;
}

.text-gray-600 {
  color: #4b5563 !important;
}

.text-gray-700 {
  color: #374151 !important;
}

.text-gray-800 {
  color: #1f2937 !important;
}

.text-red-300 {
  color: #fca5a5 !important;
}

.text-red-400 {
  color: #f87171 !important;
}

.text-red-500 {
  color: #ef4444 !important;
}

.text-red-600 {
  color: #dc2626 !important;
}

.text-blue-600 {
  color: #2563eb !important;
}

.text-amber-500 {
  color: #f59e0b !important;
}

.text-amber-700 {
  color: #b45309 !important;
}

.text-green-600 {
  color: #16a34a !important;
}

.border,
.border-2 {
  border-style: solid !important;
}

.border-gray-100 {
  border-color: #f3f4f6 !important;
}

.border-gray-200 {
  border-color: #e5e7eb !important;
}

.border-gray-300 {
  border-color: #d1d5db !important;
}

.border-red-400 {
  border-color: #f87171 !important;
}

.border-red-500 {
  border-color: #ef4444 !important;
}

.border-sky-400,
.border-cyan-500,
.border-blue-500 {
  border-color: #0ea5e9 !important;
}

.border-emerald-400,
.border-green-500 {
  border-color: #34d399 !important;
}

.border-amber-300,
.border-amber-400,
.border-amber-500,
.border-orange-500 {
  border-color: #f59e0b !important;
}

.shadow,
.shadow-md,
.shadow-lg {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
}

a[href^="/game/"].card-hover,
a[href^="#/game/"].card-hover {
  border: 0 !important;
  outline: 0 !important;
  background-color: transparent !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10) !important;
}

a[href^="/game/"].card-hover img,
a[href^="#/game/"].card-hover img {
  border: 0 !important;
  outline: 0 !important;
}

a[href^="/game/"] span.gold-gradient,
a[href^="#/game/"] span.gold-gradient {
  color: #ffffff !important;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%) !important;
  border: 0 !important;
}

.rounded-full {
  border-radius: 9999px !important;
}

.rounded-lg {
  border-radius: 8px !important;
}

.rounded-xl {
  border-radius: 12px !important;
}

.rounded-2xl {
  border-radius: 16px !important;
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops, #ef4444, #f97316)) !important;
}

.from-rose-500,
.via-red-500,
.to-orange-400 {
  --tw-gradient-stops: #f43f5e, #ef4444, #fb923c;
}

@supports not (color: oklch(50% 0.1 180)) {
  * {
    color-scheme: light;
  }
}

.hg-app-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #fde68a;
  background: linear-gradient(135deg, #fff7d6 0%, #ffffff 58%, #fff1b8 100%);
  box-shadow: 0 6px 18px rgba(180, 120, 0, 0.12);
}

.hg-app-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1000;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffd966, #d4a017);
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.28);
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
}

.hg-app-card__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hg-app-card__text {
  min-width: 0;
  flex: 1;
}

.hg-app-card__title {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.hg-app-card__desc {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}

.hg-app-card__btn {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  flex-shrink: 0;
}

.hg-app-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.hg-app-modal.is-open {
  display: flex;
}

.hg-app-modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.hg-app-modal__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  border-radius: 18px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.hg-app-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 9999px;
  color: #6b7280;
  background: #f3f4f6;
  font-size: 20px;
  line-height: 1;
}

.hg-app-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hg-app-modal__logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1000;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffd966, #d4a017);
  overflow: hidden;
  flex-shrink: 0;
}

.hg-app-modal__logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hg-app-modal__title {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.hg-app-modal__sub {
  color: #6b7280;
  font-size: 12px;
  margin-top: 2px;
}

.hg-app-modal__android,
.hg-app-modal__ios {
  display: flex;
  width: 100%;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.hg-app-modal__android {
  color: #ffffff !important;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  margin-bottom: 10px;
}

.hg-app-modal__ios {
  color: #6b7280;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}
