/* ============================================================
   1805 App Download — Stats Shortcode Styles
   Author: 1805loaded | t.me/i1805loaded
   ============================================================ */

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

.adl-stats-wrap {
  font-family: 'Outfit', system-ui, sans-serif;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #1a1a2e;
}

/* ── HEADER ─────────────────────────────────────────────── */
.adl-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0f0c29, #1a1060, #0d1a40);
  padding: 22px 26px;
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 4px 28px rgba(15,12,41,0.3);
}
.adl-stats-header__left { display: flex; align-items: center; gap: 14px; }
.adl-stats-header__icon { font-size: 2rem; }
.adl-stats-header__title {
  font-size: 1.25rem; font-weight: 800;
  margin: 0 0 3px; letter-spacing: -0.02em;
}
.adl-stats-header__sub { font-size: 0.8rem; color: rgba(200,200,255,0.65); margin: 0; }
.adl-stats-header__badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 14px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600;
  color: rgba(200,255,200,0.9);
}
/* Pulsing green dot */
.adl-pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: adlPulse 1.8s ease-in-out infinite;
}
@keyframes adlPulse {
  0%  { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  60% { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
  100%{ box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ── KPI GRID ───────────────────────────────────────────── */
.adl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 600px) {
  .adl-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .adl-kpi-grid { grid-template-columns: 1fr; }
}

.adl-kpi {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  padding: 20px 18px 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: adlKpiIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
.adl-kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}
@keyframes adlKpiIn {
  from { opacity:0; transform: translateY(14px) scale(0.96); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
.adl-kpi:nth-child(1) { animation-delay: 0.04s; }
.adl-kpi:nth-child(2) { animation-delay: 0.08s; }
.adl-kpi:nth-child(3) { animation-delay: 0.12s; }
.adl-kpi:nth-child(4) { animation-delay: 0.16s; }
.adl-kpi:nth-child(5) { animation-delay: 0.20s; }
.adl-kpi:nth-child(6) { animation-delay: 0.24s; }

.adl-kpi__icon { font-size: 1.6rem; flex-shrink: 0; }
.adl-kpi__num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.9rem; font-weight: 700;
  line-height: 1; letter-spacing: -0.03em;
  color: #1a1a2e;
}
.adl-kpi__label {
  font-size: 0.72rem; font-weight: 600;
  color: #888; text-transform: uppercase;
  letter-spacing: 0.06em; margin-top: 3px;
}

/* Color accents */
.adl-kpi--total  { border-top: 3px solid #6C63FF; }
.adl-kpi--total .adl-kpi__num  { color: #6C63FF; }
.adl-kpi--android { border-top: 3px solid #22c55e; }
.adl-kpi--android .adl-kpi__num { color: #16a34a; }
.adl-kpi--iphone  { border-top: 3px solid #6366f1; }
.adl-kpi--iphone .adl-kpi__num  { color: #4f46e5; }
.adl-kpi--today  { border-top: 3px solid #f59e0b; }
.adl-kpi--today .adl-kpi__num  { color: #d97706; }
.adl-kpi--week   { border-top: 3px solid #06b6d4; }
.adl-kpi--week .adl-kpi__num   { color: #0891b2; }
.adl-kpi--month  { border-top: 3px solid #ec4899; }
.adl-kpi--month .adl-kpi__num  { color: #db2777; }

/* Bottom progress bar (android/iphone split) */
.adl-kpi__bar {
  position: absolute;
  bottom: 0; left: 0; height: 3px;
  background: currentColor;
  opacity: 0.18;
  border-radius: 0 3px 0 0;
  transition: width 1.2s cubic-bezier(0.22,1,0.36,1);
}

/* Glow on hover */
.adl-kpi__glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(108,99,255,0.08), transparent 70%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.adl-kpi:hover .adl-kpi__glow { opacity: 1; }

/* ── SECTION TITLE ──────────────────────────────────────── */
.adl-section-title {
  font-size: 0.95rem; font-weight: 700;
  color: #1a1a2e; margin: 0 0 18px;
  letter-spacing: -0.01em;
}

/* ── PLATFORM SPLIT CARD ────────────────────────────────── */
.adl-split-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
}
.adl-split-bars { display: flex; flex-direction: column; gap: 14px; }
.adl-split-row {
  display: grid;
  grid-template-columns: 110px 1fr 46px 60px;
  align-items: center;
  gap: 12px;
}
@media (max-width: 480px) {
  .adl-split-row { grid-template-columns: 90px 1fr 42px 50px; gap: 8px; }
}
.adl-split-label { font-size: 0.85rem; font-weight: 600; color: #444; }
.adl-split-track {
  height: 10px; background: #f0f0f8;
  border-radius: 100px; overflow: hidden;
}
.adl-split-fill {
  height: 100%; border-radius: 100px;
  transition: width 1.4s cubic-bezier(0.22,1,0.36,1) 0.3s;
}
.adl-split-fill--android { background: linear-gradient(90deg, #22c55e, #4ade80); }
.adl-split-fill--iphone  { background: linear-gradient(90deg, #6366f1, #818cf8); }
.adl-split-pct { font-size: 0.85rem; font-weight: 700; color: #555; text-align: right; }
.adl-split-count { font-size: 0.78rem; color: #999; text-align: right; }
.adl-peak-info {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid #f0f0f8;
  font-size: 0.83rem; color: #666;
}
.adl-peak-info strong { color: #1a1a2e; }

/* ── CHART CARD ─────────────────────────────────────────── */
.adl-chart-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
}
.adl-chart-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 8px;
}
.adl-chart-legend {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.78rem; color: #666; font-weight: 500;
}
.adl-legend-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; margin-right: 4px;
}
.adl-legend-dot--android { background: #22c55e; }
.adl-legend-dot--iphone  { background: #6366f1; }
.adl-chart-outer {
  position: relative;
  width: 100%; overflow-x: auto;
}
.adl-chart-outer canvas { display: block; width: 100% !important; }

/* ── RECENT ACTIVITY ────────────────────────────────────── */
.adl-recent-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
}
.adl-recent-list { display: flex; flex-direction: column; gap: 0; }
.adl-recent-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f4f4f8;
  animation: adlRowIn 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
.adl-recent-row:last-child { border-bottom: none; }
@keyframes adlRowIn {
  from { opacity:0; transform: translateX(-8px); }
  to   { opacity:1; transform: translateX(0); }
}
@media (max-width: 480px) {
  .adl-recent-row { grid-template-columns: 1fr 1fr; }
  .adl-recent-row__ip { display: none; }
}
.adl-recent-row__platform {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.8rem; font-weight: 700;
  padding: 4px 10px; border-radius: 8px;
  width: fit-content;
}
.adl-recent-row__platform--android { background:#dcfce7; color:#15803d; }
.adl-recent-row__platform--iphone  { background:#ede9fe; color:#4f46e5; }
.adl-recent-row__time {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.78rem; color: #888;
}
.adl-recent-row__ip { font-size: 0.76rem; color: #bbb; font-family: monospace; }

/* Empty state */
.adl-recent-card--empty { text-align: center; }
.adl-empty-state { padding: 28px 0; }
.adl-empty-state__icon { font-size: 2.5rem; margin-bottom: 10px; }
.adl-empty-state p { font-size: 0.9rem; color: #999; }

/* ── FOOTER ─────────────────────────────────────────────── */
.adl-stats-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 4px 0;
  border-top: 1px solid #eee;
  flex-wrap: wrap; gap: 8px;
}
.adl-stats-footer__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.76rem; font-weight: 600;
  color: #29A8E2; text-decoration: none;
  transition: opacity 0.2s;
}
.adl-stats-footer__link:hover { opacity: 0.75; }
.adl-stats-footer__time { font-size: 0.74rem; color: #bbb; }

/* ── Yesterday card ───────────────────────────────────── */
.adl-kpi--yesterday { border-top: 3px solid #f97316; }
.adl-kpi--yesterday .adl-kpi__num { color: #ea6c0a; }

/* ── Total card — spans full width ───────────────────── */
.adl-kpi--full {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(62,207,207,0.06));
    border-top: 3px solid #6C63FF;
    border-left: 1px solid rgba(108,99,255,0.2);
    border-right: 1px solid rgba(108,99,255,0.2);
    border-bottom: 1px solid rgba(108,99,255,0.1);
}
.adl-kpi__num--big {
    font-size: 2.6rem !important;
    letter-spacing: -0.04em;
}
.adl-kpi--full .adl-kpi__icon { font-size: 2rem; }
.adl-kpi--full .adl-kpi__label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* ── Percentage sub-label on platform cards ───────────── */
.adl-kpi__pct {
    font-size: 0.7rem;
    color: #bbb;
    margin-top: 2px;
    font-weight: 500;
}

/* ── Dark-background overrides for full-page mode ──────── */
.adl-stats-wrap .adl-kpi--full {
    background: linear-gradient(135deg, rgba(108,99,255,0.15), rgba(62,207,207,0.08));
    border-color: rgba(108,99,255,0.35);
}
.adl-stats-wrap .adl-kpi__pct { color: rgba(200,200,255,0.45); }
