/**
 * Harsh Number King - Ultra Premium Light Cyber/Slate Mobile Layout
 */

:root {
  --bg-gradient: radial-gradient(circle at 50% 50%, #f1f5f9 0%, #e2e8f0 100%);
  --card-bg: rgba(255, 255, 255, 0.85);
  --primary: #0088cc;               /* Telegram Blue */
  --primary-dark: #0066b3;
  --primary-gradient: linear-gradient(135deg, #0088cc 0%, #0055cc 100%);
  --accent-purple: #7c3aed;         /* Modern Violet */
  --success-green: #10b981;         /* Emerald Green */
  --warning-gold: #f59e0b;          /* Gold / Amber */
  --text-primary: #0f172a;          /* Deep Slate */
  --text-secondary: #475569;        /* Slate Gray */
  --text-light: #94a3b8;            /* Light Slate */
  --card-border: rgba(255, 255, 255, 0.8);
  --inner-border: rgba(15, 23, 42, 0.06);
  --card-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.05), 
    0 20px 40px -10px rgba(59, 130, 246, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

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

html { 
  scroll-behavior: smooth; 
}

body {
  background: var(--bg-gradient);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 12px;
  overflow-x: hidden;
  position: relative;
}

/* ═══════════════════════════════════
   PARTICLE CANVAS
   ═══════════════════════════════════ */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════
   BACKGROUND LAYERS
   ═══════════════════════════════════ */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 136, 204, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 136, 204, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle, black 40%, transparent 80%);
  z-index: 0;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

.orb-1 {
  width: 500px; height: 500px;
  background: rgba(0, 136, 204, 0.2);
  top: -10%; left: -20%;
  animation: orbFloat1 15s ease-in-out infinite alternate;
}

.orb-2 {
  width: 450px; height: 450px;
  background: rgba(124, 58, 237, 0.15);
  bottom: -15%; right: -10%;
  animation: orbFloat2 12s ease-in-out infinite alternate;
}

.orb-3 {
  width: 300px; height: 300px;
  background: rgba(16, 185, 129, 0.12);
  top: 40%; left: 30%;
  animation: orbFloat3 18s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(80px, 100px) scale(1.2); }
}
@keyframes orbFloat2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, -80px) scale(1.15); }
}
@keyframes orbFloat3 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -40px) scale(1.3); }
}

/* ═══════════════════════════════════
   MAIN WRAPPER
   ═══════════════════════════════════ */
.wrapper {
  width: 100%;
  max-width: 410px;
  position: relative;
  z-index: 10;
}

/* ═══════════════════════════════════
   LIVE NOTIFICATION ALERT
   ═══════════════════════════════════ */
.live-alert-container {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.03);
  animation: fadeSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.live-dot {
  width: 8px; height: 8px;
  background: var(--success-green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulseDot 1.6s infinite;
  box-shadow: 0 0 8px var(--success-green);
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { transform: scale(1.1); opacity: 0.8; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.live-alert-wrapper {
  flex: 1;
  overflow: hidden;
  height: 20px;
}

.live-alert-text {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  height: 20px;
  line-height: 20px;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-alert-text.slide-out {
  opacity: 0;
  transform: translateY(-20px);
}

.live-alert-text.slide-in {
  opacity: 0;
  transform: translateY(20px);
}

/* ═══════════════════════════════════
   MAIN CARD
   ═══════════════════════════════════ */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 24px 16px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  animation: cardEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntry {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top active border animation */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-purple), var(--success-green), var(--primary));
  background-size: 300% 100%;
  animation: borderFlow 6s linear infinite;
}

@keyframes borderFlow {
  from { background-position: 0% 0; }
  to { background-position: 300% 0; }
}

/* ═══════════════════════════════════
   AVATAR
   ═══════════════════════════════════ */
.avatar-container {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 14px;
}

.avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple), var(--primary));
  padding: 2px;
  animation: spinRing 8s linear infinite;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.avatar-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #ffffff;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.avatar-container:hover .avatar-inner img {
  transform: scale(1.08);
}

.verified-icon {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid #ffffff;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 136, 204, 0.3);
  animation: bounceVerified 2s infinite ease-in-out;
}

.verified-icon svg {
  width: 12px;
  height: 12px;
  fill: #ffffff;
}

@keyframes bounceVerified {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ═══════════════════════════════════
   TYPOGRAPHY & BRAND
   ═══════════════════════════════════ */
.brand {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 6px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 70%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 13px;
  color: #1e3a8a;
  background: rgba(0, 136, 204, 0.05);
  border: 1px solid rgba(0, 136, 204, 0.1);
  padding: 6px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.4;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.member-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--success-green);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.member-count .dot {
  width: 6px; height: 6px;
  background: var(--success-green);
  border-radius: 50%;
  animation: pulseDot 1.6s infinite;
}

/* ═══════════════════════════════════
   TAG PILLS
   ═══════════════════════════════════ */
.tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.tag {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
}

.tag-cyan {
  color: var(--primary);
  border-color: rgba(0, 136, 204, 0.15);
  background: rgba(0, 136, 204, 0.05);
}

.tag-purple {
  color: var(--accent-purple);
  border-color: rgba(124, 58, 237, 0.15);
  background: rgba(124, 58, 237, 0.05);
}

.tag-gold {
  color: var(--warning-gold);
  border-color: rgba(245, 158, 11, 0.15);
  background: rgba(245, 158, 11, 0.05);
}

/* ═══════════════════════════════════
   STATS MICRO-CARDS
   ═══════════════════════════════════ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.stat {
  background: #ffffff;
  border: 1px solid var(--inner-border);
  border-radius: 16px;
  padding: 14px 4px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  cursor: default;
}

.stat-tips { border-top: 3px solid var(--primary); }
.stat-winrate { border-top: 3px solid var(--success-green); }
.stat-rating { border-top: 3px solid var(--accent-purple); }

.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

.stat-val {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.stat-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 600;
}

.color-cyan { color: var(--primary); }
.color-green { color: var(--success-green); }
.color-purple { color: var(--accent-purple); }

/* ═══════════════════════════════════
   FEATURES GRID
   ═══════════════════════════════════ */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.feature {
  background: #ffffff;
  border: 1px solid var(--inner-border);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
}

.feature:hover {
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.04);
}

.feature-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 6px;
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.08), rgba(124, 58, 237, 0.04));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h4 {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.feature p {
  font-size: 9px;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════
   REDIRECT CARD (Premium widget)
   ═══════════════════════════════════ */
.redirect-card {
  background: #ffffff;
  border: 1px solid var(--inner-border);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 22px;
  text-align: left;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.redirect-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.redirect-spinner {
  font-size: 16px;
  color: var(--primary);
}

.redirect-text {
  flex: 1;
}

.redirect-text h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.redirect-text p {
  font-size: 11px;
  color: var(--text-secondary);
}

.redirect-text strong {
  color: var(--primary);
  font-weight: 700;
}

.progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(0, 136, 204, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-purple) 100%);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* ═══════════════════════════════════
   CTA BUTTON
   ═══════════════════════════════════ */
.cta-container {
  display: flex;
  flex-direction: column;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 20px 28px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.cta-telegram {
  background: linear-gradient(135deg, #00b0ff, #0088cc, #0055cc, #00b0ff);
  background-size: 300% 100%;
  animation: gradientMove 4s ease infinite, buttonPulse 2s infinite;
  box-shadow: 0 10px 25px rgba(0, 136, 204, 0.28);
}

.cta-telegram i {
  font-size: 20px;
  display: inline-block;
  animation: iconPulse 2s infinite ease-in-out;
}

.cta:hover {
  transform: translateY(-3px) scale(1.04);
}

.cta-telegram:hover {
  box-shadow: 0 18px 40px rgba(0, 136, 204, 0.48);
}

.cta:active {
  transform: scale(0.96);
}

.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  30% { left: 120%; }
  100% { left: 120%; }
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes buttonPulse {
  0% { box-shadow: 0 8px 24px rgba(0, 136, 204, 0.25), 0 0 0 0 rgba(0, 136, 204, 0.4); }
  50% { box-shadow: 0 18px 38px rgba(0, 136, 204, 0.4), 0 0 0 12px rgba(0, 136, 204, 0); }
  100% { box-shadow: 0 8px 24px rgba(0, 136, 204, 0.25), 0 0 0 0 rgba(0, 136, 204, 0.4); }
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(-8deg); }
}

/* ═══════════════════════════════════
   FLOATING BUTTONS
   ═══════════════════════════════════ */
.floating-widgets {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 999;
}

.float-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.float-btn:hover {
  transform: scale(1.08) translateY(-2px);
}

.float-tg {
  background: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════
   WINNING POPUP TOAST
   ═══════════════════════════════════ */
.win-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 340px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  color: var(--text-primary);
}

.win-popup.show {
  transform: translateX(-50%) translateY(0);
}

.win-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.win-info {
  flex: 1;
  text-align: left;
}

.win-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.win-amount {
  font-size: 10px;
  color: var(--success-green);
  font-weight: 600;
}

.win-time {
  font-size: 9px;
  color: var(--text-light);
  flex-shrink: 0;
}

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */
.footer {
  text-align: center;
  margin-top: 16px;
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.6;
  animation: fadeSlideDown 1s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════
   RESPONSIVE SCALING
   ═══════════════════════════════════ */
@media (max-width: 375px) {
  .card { padding: 24px 14px 20px; }
  .brand { font-size: 21px; }
  .stat-val { font-size: 16px; }
  .stat-label { font-size: 8px; }
  .cta { padding: 14px; font-size: 12px; }
  .features { gap: 6px; }
  .feature { padding: 10px 6px; }
}
