/* GAMA777 - Matka App (Matka Lover UI) */
:root {
  --bg: #0d0d0f;
  --bg-card: #12121a;
  --surface: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.1);
  --red: #e53935;
  --red-dark: #c62828;
  --green: #00e676;
  --green-dark: #00c853;
  --gold: #ffd700;
  --gold-dim: #ffb300;
  --text: #fff;
  --muted: rgba(255,255,255,0.75);
  --r: 12px;
  --space: 14px;
  --space-lg: 20px;
}

*,*::before,*::after { box-sizing: border-box; }
html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes shine {
  to { transform: translateX(100%); }
}

body {
  margin: 0;
  width: 100%;
  min-width: 0;
  font-family: "Poppins", "Inter", sans-serif;
  color: var(--text);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  line-height: 1.5;
  background: var(--bg);
  background-image:
    radial-gradient(70% 50% at 10% 10%, rgba(229,57,53,0.15) 0%, transparent 50%),
    radial-gradient(60% 50% at 90% 20%, rgba(0,230,118,0.12) 0%, transparent 50%),
    radial-gradient(50% 40% at 50% 90%, rgba(255,215,0,0.08) 0%, transparent 45%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #000; }

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  min-width: 0;
  padding: var(--space-lg);
  padding-left: max(var(--space-lg), env(safe-area-inset-left));
  padding-right: max(var(--space-lg), env(safe-area-inset-right));
  padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
}

/* Hero */
.hero {
  border-radius: var(--r);
  padding: 0 0 var(--space-lg) 0;
  background: var(--bg-card);
  border: 1px solid rgba(229,57,53,0.4);
  border-top: 4px solid var(--red);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
  text-align: left;
  min-width: 0;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 50%, var(--green) 100%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero-top {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg) var(--space-lg) 0;
}

.logo {
  width: 80px;
  height: 80px;
  max-width: 25vw;
  max-height: 25vw;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 2px rgba(229,57,53,0.3), 0 8px 24px rgba(255,215,0,0.25);
  object-fit: cover;
  flex-shrink: 0;
  animation: pulse 3s ease-in-out infinite;
}
img { max-width: 100%; height: auto; vertical-align: middle; }

.hero-copy { min-width: 0; }

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(255,215,0,0.4), 0 2px 8px rgba(0,0,0,0.5);
}

.subtitle {
  margin: 6px 0 0;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--green);
  text-shadow: 0 0 16px rgba(0,230,118,0.35);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(0,230,118,0.12);
  border: 1px solid rgba(0,230,118,0.3);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
}

.badge i { color: var(--gold); }

.banner {
  margin: var(--space) var(--space-lg) 0;
  padding: 12px var(--space);
  border-radius: 8px;
  background: var(--red);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 20px rgba(229,57,53,0.5);
  font-weight: 900;
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  text-align: center;
  color: #fff;
  letter-spacing: 0.03em;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

/* Stats */
.stats {
  margin-top: var(--space);
  padding: 0 var(--space-lg);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: stretch;
}

.stat {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.stat:nth-child(1) { border-left-color: var(--gold); }
.stat:nth-child(2) { border-left-color: var(--green); }
.stat:nth-child(3) { border-left-color: var(--green); }

.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.stat-icon {
  grid-row: 1 / -1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(0,230,118,0.2);
  font-size: 1rem;
  color: var(--green);
}

.stat:nth-child(1) .stat-icon { background: rgba(255,215,0,0.2); color: var(--gold); }

.stat-value { font-weight: 900; font-size: 0.95rem; color: #fff; }
.stat-label { color: var(--muted); font-size: 0.78rem; font-weight: 600; }

/* Buttons */
.btn-download-top,
.btn-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space);
}

.btn-download-top { margin-top: var(--space); padding: 0 var(--space-lg); }
.btn-container { margin-top: var(--space); }

.btn {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  min-width: 0;
  width: 100%;
  max-width: 320px;
  min-height: 48px;
  border-radius: 10px;
  font: 800 1.05rem "Poppins", sans-serif;
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  -webkit-tap-highlight-color: transparent;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}

.btn:hover::after { transform: translateX(100%); }
.btn:active { transform: translateY(-1px) scale(1); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn-primary { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.btn-primary:hover { box-shadow: 0 18px 44px rgba(59,130,246,0.45); }

.btn-support { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.btn-support:hover { box-shadow: 0 18px 44px rgba(34,197,94,0.45); }

.btn-apk {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  box-shadow: 0 8px 24px rgba(0,230,118,0.4);
  animation: pulse 2.5s ease-in-out infinite;
}
.btn-apk:hover {
  box-shadow: 0 12px 32px rgba(0,230,118,0.5);
  animation: none;
}

.btn i { font-size: 1.25rem; }

/* Content */
.content { margin-top: var(--space-lg); min-width: 0; }

.game-rate { margin-bottom: var(--space-lg); }

.card > .section-title { margin-bottom: 0; }

.rate-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 var(--space-lg);
  margin-top: var(--space);
}

.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  transition: background 0.2s, border-color 0.2s;
  min-width: 0;
}

.rate-row:hover {
  background: rgba(255,255,255,0.05);
  border-left-color: var(--green);
}

.rate-name { font-weight: 800; color: var(--gold); min-width: 0; font-size: 0.95rem; }
.rate-value { font-weight: 900; color: var(--green); font-size: 1rem; flex-shrink: 0; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
  min-width: 0;
}

.card {
  border-radius: var(--r);
  padding: 0 0 var(--space-lg) 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.card:hover {
  border-top-color: var(--green);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.game-rate { border-top-color: var(--gold); }
.winners { border-top-color: var(--green); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  margin-bottom: 12px;
  flex-wrap: wrap;
  padding: 0 var(--space-lg);
}

.section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  min-width: 0;
  padding: var(--space) var(--space-lg);
  background: rgba(255,215,0,0.08);
  border-bottom: 1px solid rgba(255,215,0,0.2);
}

.card > .section-title { margin-bottom: 0; padding: var(--space) var(--space-lg); }

.section-title i { color: var(--gold); opacity: 0.95; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 900;
  color: #000;
  background: var(--green);
  box-shadow: 0 2px 10px rgba(0,230,118,0.4);
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #000;
  animation: blink 1s ease-in-out infinite;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 var(--space-lg);
}

.card > .list { margin-top: var(--space); }

.winner-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  transition: background 0.2s, border-color 0.2s;
  min-width: 0;
}

.winner-item:hover {
  background: rgba(255,255,255,0.04);
  border-left-color: var(--gold);
}

.winner-name { font-weight: 800; color: var(--gold); min-width: 0; font-size: 0.95rem; }
.winner-amount {
  font-weight: 900;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 2px 10px rgba(0,230,118,0.35);
  flex-shrink: 0;
}

/* Reveal – by default visible (JS add kare to scroll pe animate ho sakta hai) */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.footer {
  margin-top: var(--space-lg);
  padding-top: var(--space);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.footer p { margin: 6px 0; }

/* Responsive – sabhi phones ke liye */
@media (max-width: 720px) {
  .container { padding: 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .hero-top { padding: 12px 12px 0; }
  .hero-copy h1 { font-size: clamp(1.25rem, 5.5vw, 1.75rem); }
  .content { margin-top: 12px; }
  .game-rate { margin-bottom: 12px; }
  .card { padding-bottom: 12px; }
  .rate-list, .list { padding-left: 12px; padding-right: 12px; }
  .section-title { padding: 10px 12px; font-size: clamp(0.9rem, 2.5vw, 1rem); }
  .section-head { padding: 0 12px; }
  .banner { margin-left: 12px; margin-right: 12px; padding: 10px 12px; }
  .stats { padding: 0 12px; }
}

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .btn { max-width: none; width: 100%; padding: 14px 16px; font-size: clamp(0.9rem, 2.5vw, 1rem); }
  .btn-download-top { padding: 0 12px; width: 100%; }
  .btn-download-top .btn { width: 100%; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 6px; min-width: 0; }
  .stat { padding: 8px; grid-template-columns: 28px 1fr; gap: 2px 6px; min-width: 0; }
  .stat-icon { width: 28px; height: 28px; font-size: 0.85rem; }
  .stat-value { font-size: 0.8rem; }
  .stat-label { font-size: 0.65rem; }
}

@media (max-width: 480px) {
  .container { padding: 10px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .hero { padding: 0 0 12px 0; text-align: center; border-radius: 10px; }
  .hero-top { flex-direction: column; align-items: center; gap: 10px; padding: 10px 10px 0; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; min-width: 0; }
  .hero-copy h1 { font-size: clamp(1.2rem, 6vw, 1.45rem); letter-spacing: 0.04em; }
  .subtitle { font-size: clamp(0.9rem, 2.5vw, 1rem); text-align: center; }
  .badges { justify-content: center; margin-top: 6px; gap: 6px; flex-wrap: wrap; }
  .badge { font-size: 0.72rem; padding: 5px 8px; }
  .logo { width: 64px; height: 64px; max-width: 64px; max-height: 64px; }
  .banner { margin: 8px 10px 0; font-size: clamp(0.65rem, 2.2vw, 0.75rem); padding: 8px 10px; line-height: 1.35; }
  .stats { grid-template-columns: 1fr; gap: 6px; padding: 0 10px; margin-top: 10px; }
  .stat { grid-template-columns: 32px 1fr; padding: 10px; }
  .stat-icon { width: 32px; height: 32px; font-size: 0.9rem; }
  .stat-value { font-size: 0.9rem; }
  .stat-label { font-size: 0.75rem; }
  .btn-download-top { margin-top: 10px; padding: 0 10px; }
  .btn { min-height: 46px; padding: 12px 14px; font-size: 0.95rem; }
  .rate-list { margin-top: 8px; padding: 0 10px; }
  .rate-row { padding: 8px 10px; gap: 6px; min-width: 0; }
  .rate-name { font-size: clamp(0.8rem, 2.2vw, 0.9rem); }
  .rate-value { font-size: clamp(0.8rem, 2.2vw, 0.9rem); }
  .card > .section-title { padding: 10px; }
  .section-head { flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6px; padding: 0 10px; }
  .section-title { font-size: clamp(0.85rem, 2.5vw, 0.95rem); }
  .list { padding: 0 10px; gap: 6px; }
  .winner-item { padding: 8px 10px; gap: 6px; min-width: 0; }
  .winner-name { font-size: clamp(0.8rem, 2.2vw, 0.9rem); }
  .winner-amount { font-size: clamp(0.75rem, 2vw, 0.85rem); padding: 5px 8px; }
  .footer { margin-top: 12px; padding-top: 10px; font-size: 0.8rem; }
  .footer p { margin: 4px 0; }
}

@media (max-width: 360px) {
  .container { padding: 8px; padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .hero { padding-bottom: 10px; }
  .hero-top { padding: 8px 8px 0; gap: 8px; }
  h1 { font-size: 1.15rem; }
  .subtitle { font-size: 0.85rem; }
  .badge { font-size: 0.65rem; padding: 4px 6px; }
  .banner { margin: 6px 8px 0; font-size: 0.62rem; padding: 6px 8px; }
  .stats { padding: 0 8px; gap: 6px; }
  .stat { padding: 8px; }
  .btn-download-top { padding: 0 8px; margin-top: 8px; }
  .btn { padding: 10px 12px; font-size: 0.9rem; min-height: 44px; }
  .rate-list, .list { padding-left: 8px; padding-right: 8px; }
  .rate-row, .winner-item { padding: 6px 8px; }
  .rate-name, .rate-value, .winner-name, .winner-amount { font-size: 0.78rem; }
  .section-title, .card > .section-title { padding: 8px; font-size: 0.85rem; }
  .section-head { padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,.btn::after,.reveal,.winner-item,.card,.stat,.logo,.pill::before { animation: none !important; transition: none; }
  .reveal { opacity: 1; transform: none; }
  .logo { animation: none; }
  .btn-apk { animation: none; }
  .pill::before { opacity: 1; }
}
