@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

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

body {
  font-family: 'Poppins', sans-serif;
  background: #080812;
  color: #fff;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* ── HEADER ── */
.header {
  background: linear-gradient(135deg, #12122a, #1a1a35);
  padding: 14px 20px;
  border-bottom: 2px solid #ff2244;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(255,34,68,0.2);
}
.logo {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.logo em {
  color: #ff2244;
  font-style: normal;
}
.pro-tag {
  background: linear-gradient(135deg, #f0c040, #ff8c00);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}
.live-dot {
  color: #00e676;
  font-size: 12px;
  font-weight: 600;
  animation: blink 1.2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── TABS ── */
.tabs {
  display: flex;
  background: #0e0e20;
  border-bottom: 1px solid #252545;
  position: sticky;
  top: 52px;
  z-index: 99;
}
.tab-btn {
  flex: 1;
  padding: 12px 4px;
  background: none;
  border: none;
  color: #5555aa;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  text-align: center;
}
.tab-btn.active {
  color: #fff;
  border-bottom-color: #ff2244;
}
.tab-btn span { display: block; font-size: 16px; margin-bottom: 2px; }

/* ── TAB PANELS ── */
.tab-panel { display: none; padding: 16px; }
.tab-panel.active { display: block; }

/* ── TIMER ── */
.timer-box {
  background: linear-gradient(135deg, #12122a, #1a1a35);
  border: 1px solid #252545;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
}
.period-lbl { color: #7070a0; font-size: 11px; font-weight: 600; letter-spacing: 1px; }
.period-val { color: #f0c040; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.timer-ring { position: relative; width: 110px; height: 110px; margin: 0 auto 14px; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: #252545; }
.ring-fill { stroke: #00e676; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.5s; }
.timer-num {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 28px; font-weight: 800; color: #fff;
}
.timer-sub { color: #5555aa; font-size: 11px; }

/* ── PREDICTION CARD ── */
.pred-card {
  background: linear-gradient(135deg, #12122a, #1a1a35);
  border: 1px solid #252545;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}
.pred-title {
  color: #7070a0; font-size: 11px; font-weight: 600;
  letter-spacing: 1px; text-align: center; margin-bottom: 14px;
}
.pred-main {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.pred-bs {
  flex: 1;
  padding: 16px 10px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid transparent;
}
.pred-bs.big { background: rgba(255,34,68,0.1); border-color: #ff2244; }
.pred-bs.small { background: rgba(0,230,118,0.1); border-color: #00e676; }
.pred-bs-lbl { font-size: 10px; font-weight: 600; color: #7070a0; margin-bottom: 4px; }
.pred-bs-val { font-size: 22px; font-weight: 800; }
.pred-bs.big .pred-bs-val { color: #ff2244; }
.pred-bs.small .pred-bs-val { color: #00e676; }
.pred-bs-conf { font-size: 11px; font-weight: 600; margin-top: 4px; }

.pred-num-row {
  display: flex;
  gap: 10px;
}
.pred-num-box {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  background: rgba(176,96,255,0.1);
  border: 2px solid #b060ff;
}
.pred-num-box.color-red { background: rgba(255,34,68,0.1); border-color: #ff2244; }
.pred-num-box.color-green { background: rgba(0,230,118,0.1); border-color: #00e676; }
.pred-num-box.color-violet { background: rgba(176,96,255,0.1); border-color: #b060ff; }
.pred-num-lbl { font-size: 10px; color: #7070a0; font-weight: 600; margin-bottom: 4px; }
.pred-num-val { font-size: 26px; font-weight: 800; color: #fff; }
.pred-num-col { font-size: 11px; font-weight: 700; margin-top: 2px; }
.color-red .pred-num-col { color: #ff2244; }
.color-green .pred-num-col { color: #00e676; }
.color-violet .pred-num-col { color: #b060ff; }

/* ── SIGNAL BAR ── */
.signal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0e0e20;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid #252545;
}
.signal-icon { font-size: 20px; }
.signal-text { flex: 1; }
.signal-label { font-size: 10px; color: #7070a0; font-weight: 600; }
.signal-val { font-size: 14px; font-weight: 700; color: #f0c040; }
.signal-strength {
  display: flex;
  gap: 3px;
  align-items: center;
}
.sig-bar {
  width: 6px;
  border-radius: 3px;
  background: #252545;
  transition: background 0.3s;
}
.sig-bar.h1 { height: 8px; }
.sig-bar.h2 { height: 12px; }
.sig-bar.h3 { height: 16px; }
.sig-bar.h4 { height: 20px; }
.sig-bar.h5 { height: 24px; }
.sig-bar.active { background: #00e676; }

/* ── HISTORY DOTS ── */
.history-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  background: #0e0e20;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #252545;
}
.hist-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  border: 2px solid transparent;
}
.hist-dot.big { background: rgba(255,34,68,0.2); border-color: #ff2244; color: #ff2244; }
.hist-dot.small { background: rgba(0,230,118,0.2); border-color: #00e676; color: #00e676; }
.hist-dot.empty { background: #1a1a30; border-color: #252545; color: #333; }

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat-box {
  background: #0e0e20;
  border: 1px solid #252545;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.stat-val { font-size: 20px; font-weight: 800; color: #fff; }
.stat-lbl { font-size: 10px; color: #5555aa; font-weight: 600; margin-top: 2px; }
.stat-box.wins .stat-val { color: #00e676; }
.stat-box.losses .stat-val { color: #ff2244; }
.stat-box.streak .stat-val { color: #f0c040; }

/* ══ PROTECTION TAB ══ */
.shield-main {
  text-align: center;
  padding: 20px 0;
  margin-bottom: 14px;
}
.shield-icon {
  font-size: 70px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 20px rgba(0,230,118,0.5));
  animation: shieldPulse 2s infinite;
}
@keyframes shieldPulse {
  0%,100% { filter: drop-shadow(0 0 20px rgba(0,230,118,0.5)); }
  50% { filter: drop-shadow(0 0 40px rgba(0,230,118,0.9)); }
}
.shield-status {
  font-size: 18px; font-weight: 800;
  margin-bottom: 4px;
}
.shield-status.active { color: #00e676; }
.shield-status.warning { color: #f0c040; }
.shield-status.danger { color: #ff2244; }
.shield-sub { color: #7070a0; font-size: 12px; }

.protect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.protect-card {
  background: #0e0e20;
  border: 1px solid #252545;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}
.protect-card-icon { font-size: 28px; margin-bottom: 6px; }
.protect-card-val { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.protect-card-lbl { font-size: 10px; color: #5555aa; font-weight: 600; }
.protect-card.safe .protect-card-val { color: #00e676; }
.protect-card.warn .protect-card-val { color: #f0c040; }
.protect-card.danger .protect-card-val { color: #ff2244; }

.protect-rules {
  background: #0e0e20;
  border: 1px solid #252545;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.protect-rules-title {
  font-size: 12px; font-weight: 700; color: #f0c040;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.rule-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #1a1a30;
  font-size: 12px;
}
.rule-item:last-child { border-bottom: none; }
.rule-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rule-dot.green { background: #00e676; }
.rule-dot.yellow { background: #f0c040; }
.rule-dot.red { background: #ff2244; }
.rule-text { flex: 1; color: #aaaacc; }
.rule-status { font-weight: 700; font-size: 11px; }
.rule-status.ok { color: #00e676; }
.rule-status.warn { color: #f0c040; }
.rule-status.bad { color: #ff2244; }

.protect-alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}
.protect-alert.safe { background: rgba(0,230,118,0.1); border: 1px solid #00e676; color: #00e676; }
.protect-alert.warn { background: rgba(240,192,64,0.1); border: 1px solid #f0c040; color: #f0c040; }
.protect-alert.danger { background: rgba(255,34,68,0.1); border: 1px solid #ff2244; color: #ff2244; }
.protect-alert-icon { font-size: 20px; }

/* ══ ANALYSIS TAB ══ */
.analysis-section {
  background: #0e0e20;
  border: 1px solid #252545;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.analysis-title {
  font-size: 12px; font-weight: 700; color: #00c8ff;
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}

/* Number frequency bars */
.num-freq-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 8px;
}
.num-freq-item { text-align: center; }
.num-freq-bar-wrap {
  height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 4px;
}
.num-freq-bar {
  width: 20px;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.5s;
}
.num-freq-bar.color-red { background: linear-gradient(180deg,#ff2244,#ff6688); }
.num-freq-bar.color-green { background: linear-gradient(180deg,#00e676,#69f0ae); }
.num-freq-bar.color-violet { background: linear-gradient(180deg,#b060ff,#d090ff); }
.num-freq-num { font-size: 12px; font-weight: 700; color: #fff; }
.num-freq-cnt { font-size: 10px; color: #5555aa; }

/* Big Small ratio bar */
.ratio-bar-wrap { margin-bottom: 8px; }
.ratio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
.ratio-labels .big-lbl { color: #ff2244; }
.ratio-labels .small-lbl { color: #00e676; }
.ratio-bar {
  height: 12px;
  background: #1a1a30;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
}
.ratio-big { background: linear-gradient(90deg,#ff2244,#ff6688); transition: width 0.5s; }
.ratio-small { background: linear-gradient(90deg,#00e676,#69f0ae); transition: width 0.5s; }

/* Color distribution */
.color-dist {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
}
.color-dist-item {
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #252545;
}
.color-dist-item.red { background: rgba(255,34,68,0.1); border-color: #ff2244; }
.color-dist-item.green { background: rgba(0,230,118,0.1); border-color: #00e676; }
.color-dist-item.violet { background: rgba(176,96,255,0.1); border-color: #b060ff; }
.color-dist-emoji { font-size: 20px; margin-bottom: 4px; }
.color-dist-cnt { font-size: 18px; font-weight: 800; color: #fff; }
.color-dist-pct { font-size: 10px; color: #7070a0; }

/* Pattern analysis */
.pattern-list { display: flex; flex-direction: column; gap: 8px; }
.pattern-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #12122a;
  border-radius: 10px;
  border: 1px solid #252545;
}
.pattern-name { flex: 1; font-size: 12px; font-weight: 600; color: #aaaacc; }
.pattern-strength {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}
.pattern-strength.strong { background: rgba(0,230,118,0.2); color: #00e676; }
.pattern-strength.medium { background: rgba(240,192,64,0.2); color: #f0c040; }
.pattern-strength.weak { background: rgba(255,34,68,0.2); color: #ff2244; }

/* Hot/Cold numbers */
.hot-cold-row {
  display: flex;
  gap: 8px;
}
.hot-box, .cold-box {
  flex: 1;
  background: #12122a;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  border: 1px solid #252545;
}
.hot-box { border-color: #ff2244; }
.cold-box { border-color: #00c8ff; }
.hc-title { font-size: 10px; font-weight: 700; margin-bottom: 8px; }
.hot-box .hc-title { color: #ff2244; }
.cold-box .hc-title { color: #00c8ff; }
.hc-nums { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.hc-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.hot-box .hc-num { background: rgba(255,34,68,0.2); color: #ff2244; border: 1px solid #ff2244; }
.cold-box .hc-num { background: rgba(0,200,255,0.2); color: #00c8ff; border: 1px solid #00c8ff; }

/* Trend arrows */
.trend-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.trend-arrow {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.trend-arrow.up { background: rgba(255,34,68,0.2); }
.trend-arrow.down { background: rgba(0,230,118,0.2); }

/* ── HISTORY TABLE ── */
.hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.hist-table th {
  background: #12122a;
  color: #7070a0;
  padding: 8px 6px;
  text-align: center;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.5px;
}
.hist-table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid #1a1a30;
  color: #aaaacc;
}
.hist-table tr:last-child td { border-bottom: none; }
.td-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.td-num.red { background: rgba(255,34,68,0.2); color: #ff2244; border: 1px solid #ff2244; }
.td-num.green { background: rgba(0,230,118,0.2); color: #00e676; border: 1px solid #00e676; }
.td-num.violet { background: rgba(176,96,255,0.2); color: #b060ff; border: 1px solid #b060ff; }
.td-big { color: #ff2244; font-weight: 700; }
.td-small { color: #00e676; font-weight: 700; }
.td-win { color: #00e676; font-weight: 700; }
.td-loss { color: #ff2244; font-weight: 700; }

/* ── REFRESH BTN ── */
.refresh-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff2244, #cc0033);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(255,34,68,0.3);
  transition: transform 0.1s;
}
.refresh-btn:active { transform: scale(0.98); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 30px;
  color: #3a3a60;
  font-size: 13px;
}
.empty-state div { font-size: 40px; margin-bottom: 10px; }