:root {
  --bg-app: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-ton: #0098ea;
  --accent-sol: #14f195;
  --accent-eth: #627eea;
  --accent-tron: #ef0027;
  --accent-stars: #f59e0b;
  --accent-green: #22c55e;
  --border-color: #334155;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 5rem;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-wrap h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.badge-mini {
  background: rgba(0, 152, 234, 0.15);
  color: var(--accent-ton);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Viral Referral Banner */
.viral-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid var(--accent-stars);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.banner-left h3 {
  font-size: 0.95rem;
  color: var(--accent-stars);
  margin-bottom: 0.2rem;
}

.banner-left p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-invite {
  background: var(--accent-stars);
  color: #0b0f19;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

/* Gas Grid */
.section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
}

.gas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.gas-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  position: relative;
  transition: transform 0.2s ease;
}

.gas-card:hover {
  transform: translateY(-2px);
}

.chain-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.chain-name {
  font-weight: 700;
  font-size: 0.85rem;
}

.chain-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.tag-low { background: rgba(34, 197, 94, 0.2); color: var(--accent-green); }
.tag-med { background: rgba(245, 158, 11, 0.2); color: var(--accent-stars); }
.tag-high { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.gas-val {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.gas-cost-usd {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Whale Alert Feed */
.whale-feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.whale-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.whale-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.6rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 6px;
  font-size: 0.8rem;
}

.whale-tx {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.whale-amount {
  color: var(--accent-stars);
  font-weight: 700;
}

/* Unlock Alert Card */
.unlock-card {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--accent-stars);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.unlock-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.unlock-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn-stars {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b0f19;
  border: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.alt-pay-links {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.alt-pay-links a {
  color: var(--accent-ton);
  text-decoration: none;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
}
