.trpro-app * { box-sizing: border-box; }
.trpro-app {
  background: #FFFFFF;
  color: #1e293b;
  font-family: 'Cairo', 'Tajawal', -apple-system, sans-serif;
  padding: 24px 20px;
  min-height: 100vh;
  direction: rtl;
  width: 100%;
}
.trpro-hero {
  margin: 0 0 24px;
  padding: 24px 20px 0;
}
.trpro-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
}
.trpro-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #0f172a;
  letter-spacing: -1px;
}
.trpro-hero p { color: #64748b; font-size: 14px; margin: 0; }

.trpro-controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.trpro-control-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.trpro-select {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
  min-width: 160px;
}
.trpro-select:hover { border-color: #6366f1; }
.trpro-select:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.trpro-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.trpro-tab {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 22px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #475569;
  cursor: pointer;
  transition: all .2s;
}
.trpro-tab:hover { color: #0f172a; border-color: #94a3b8; }
.trpro-tab.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}

.trpro-live {
  display: inline-flex; align-items: center; gap: 10px;
  background: #ECFDF5;
  color: #047857;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #A7F3D0;
}
.trpro-pulse-dot {
  width: 9px; height: 9px;
  background: #10b981;
  border-radius: 50%;
  animation: trpro-pulse 2s infinite;
}
@keyframes trpro-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
  50% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
}

/* Grid 3 columns FULL WIDTH */
.trpro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  align-items: stretch;
  transition: opacity .3s;
}
.trpro-col {
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,23,42,0.03);
  display: flex;
  flex-direction: column;
}
.trpro-col-google { border-top: 3px solid #34A853; }
.trpro-col-x { border-top: 3px solid #1DA1F2; }
.trpro-col-tiktok { border-top: 3px solid #fe2c55; }

.trpro-col-head {
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.trpro-col-title { display: flex; align-items: center; gap: 10px; }
.trpro-col-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.trpro-col-title h2 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
}
.trpro-badge-ok { background: #D1FAE5; color: #047857; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.trpro-badge-fail { background: #FEF3C7; color: #92400e; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.trpro-badge-pending { background: #E0E7FF; color: #4338ca; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }

.trpro-list {
  list-style: none;
  margin: 0; padding: 8px 0;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 600px;
}
.trpro-item {
  padding: 14px 20px;
  border-bottom: 1px solid #F8FAFC;
  transition: all .2s;
  position: relative;
}
.trpro-item:last-child { border-bottom: none; }
.trpro-item:hover { background: #F8FAFC; }

/* Glow effect for top 3 (rising) */
.trpro-item-rising {
  background: linear-gradient(90deg, rgba(16,185,129,0.06), transparent);
  border-right: 3px solid #10b981;
  box-shadow: inset 0 0 24px rgba(16,185,129,0.08);
}
.trpro-item-rising::before {
  content: '🔥';
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 13px;
  animation: trpro-flame 1.5s infinite alternate;
}
@keyframes trpro-flame {
  0% { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(1.15) rotate(3deg); }
}

.trpro-item-row { display: flex; align-items: center; gap: 10px; }
.trpro-rank {
  background: #F1F5F9;
  color: #475569;
  font-weight: 800;
  font-size: 12px;
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trpro-item:nth-child(1) .trpro-rank { background: #FEF3C7; color: #B45309; }
.trpro-item:nth-child(2) .trpro-rank { background: #E2E8F0; color: #334155; }
.trpro-item:nth-child(3) .trpro-rank { background: #FED7AA; color: #9A3412; }

.trpro-term {
  flex: 1;
  color: #0f172a;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  word-break: break-word;
  line-height: 1.3;
}
.trpro-term:hover { color: #1d4ed8; }
.trpro-traffic {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  background: #F8FAFC;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.trpro-bar {
  height: 3px;
  background: #F1F5F9;
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.trpro-bar-fill { height: 100%; border-radius: 2px; transition: width .4s; }
.trpro-bar-google { background: linear-gradient(90deg, #34A853, #4ade80); }
.trpro-bar-x { background: linear-gradient(90deg, #1DA1F2, #60a5fa); }
.trpro-bar-tiktok { background: linear-gradient(90deg, #fe2c55, #f87171); }

.trpro-vip-mini {
  margin-top: 10px;
  padding: 10px 12px;
  background: #F0F9FF;
  border-radius: 8px;
  border: 1px solid #BAE6FD;
  font-size: 12px;
}
.trpro-vip-mini strong {
  display: block;
  color: #0c4a6e;
  margin-bottom: 4px;
  font-weight: 700;
}
.trpro-vip-mini span {
  color: #475569;
  font-size: 11px;
  line-height: 1.5;
}
.trpro-vip-mini-locked {
  margin-top: 10px;
  padding: 8px 12px;
  background: #FEF3C7;
  color: #92400e;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
  font-weight: 600;
  border: 1px dashed #FCD34D;
}

.trpro-empty {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.trpro-col-footer {
  padding: 12px 20px;
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.trpro-col-footer-time { font-weight: 700; color: #475569; }
.trpro-col-footer-ksa {
  background: #1e293b; color: #fff;
  padding: 3px 9px; border-radius: 4px;
  font-weight: 700; font-size: 10px;
}

/* Skeleton Loader */
.trpro-skeleton-item {
  padding: 14px 20px;
  border-bottom: 1px solid #F8FAFC;
}
.trpro-skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  margin-bottom: 6px;
  animation: trpro-skeleton 1.4s ease-in-out infinite;
}
.trpro-skeleton-line.w-30 { width: 30%; }
.trpro-skeleton-line.w-50 { width: 50%; }
.trpro-skeleton-line.w-90 { width: 90%; }
.trpro-skeleton-bar {
  height: 3px;
  background: #F1F5F9;
  border-radius: 2px;
  margin-top: 6px;
}
@keyframes trpro-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* VIP Glassmorphism */
.trpro-vip-glass {
  position: relative;
  margin: 24px auto 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(236,72,153,0.08));
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 16px;
  padding: 30px 24px;
  backdrop-filter: blur(20px);
  text-align: center;
}
.trpro-vip-content h2 { margin: 0 0 8px; font-size: 24px; color: #0f172a; }
.trpro-vip-content p { color: #475569; margin: 0 0 18px; font-size: 14px; }
.trpro-vip-btn {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(99,102,241,0.3);
  transition: transform .2s;
}
.trpro-vip-btn:hover { transform: scale(1.05); color: #fff; }

/* Mobile */
@media (max-width: 980px) {
  .trpro-grid { grid-template-columns: 1fr; gap: 14px; }
  .trpro-app { padding: 18px 10px; }
  .trpro-hero { padding: 16px 10px 0; }
  .trpro-hero h1 { font-size: 26px; }
  .trpro-hero-top { flex-direction: column; align-items: stretch; }
  .trpro-tabs { flex-wrap: wrap; }
  .trpro-tab { flex: 1; min-width: 140px; padding: 10px 14px; font-size: 12.5px; }
  .trpro-list { min-height: auto; max-height: 500px; }
  .trpro-controls { width: 100%; }
  .trpro-select { width: 100%; }
}