/* GhostPurge Pro — Telegram Ghost & Deleted Account Purger
   Modern Dark Theme with Telegram Blue (#229ED9) & Cyber Purple (#7928CA) Accents */

:root {
  --bg-dark: #0a0e17;
  --bg-card: #121826;
  --bg-card-hover: #172033;
  --bg-glass: rgba(18, 24, 38, 0.75);
  --border-color: #202b3f;
  --border-focus: #2da5f3;
  --tg-blue: #229ED9;
  --tg-blue-hover: #1b8ac0;
  --tg-blue-glow: rgba(34, 158, 217, 0.25);
  --tg-purple: #7928ca;
  --tg-purple-hover: #6a21b3;
  --tg-purple-glow: rgba(121, 40, 202, 0.25);
  --cyan-accent: #06b6d4;
  --gold-star: #fbbf24;
  --ton-blue: #0098ea;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(34, 158, 217, 0.12), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(121, 40, 202, 0.10), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.08), transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 1.5rem 1rem 3rem;
}

/* Required CSS specifications */
input, select, textarea {
  min-width: 0;
}

.lang-switcher {
  flex-shrink: 0;
}

.brand {
  min-width: 0;
}

.brand-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.36);
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.25), rgba(121, 40, 202, 0.35));
  border: 1px solid rgba(34, 158, 217, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px rgba(34, 158, 217, 0.25);
  animation: floatIcon 4s ease-in-out infinite alternate;
}

@keyframes floatIcon {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-4px) rotate(2deg); }
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff 10%, #70c7ff 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pro-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #229ED9, #7928ca);
  color: #fff;
  -webkit-text-fill-color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  vertical-align: middle;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lang-switcher {
  display: flex;
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  background: var(--tg-blue);
  color: #fff;
  box-shadow: 0 2px 8px var(--tg-blue-glow);
}

/* Primary Header Action: Add Bot */
.btn-header-bot {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #229ED9 0%, #1e87bb 100%);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px var(--tg-blue-glow);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-header-bot:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.45);
  background: linear-gradient(135deg, #2da5f3 0%, #229ED9 100%);
}

/* Hero Trust Alert Banner */
.hero-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(90deg, rgba(34, 158, 217, 0.12) 0%, rgba(121, 40, 202, 0.12) 100%);
  border: 1px solid rgba(34, 158, 217, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #229ED9, #7928ca);
}

.hero-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  background: rgba(34, 158, 217, 0.15);
  border: 1px solid rgba(34, 158, 217, 0.3);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-badge-trust {
  font-size: 0.72rem;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.hero-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Key Metrics HUD */
.hud-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 960px) {
  .hud-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .hud-grid {
    grid-template-columns: 1fr;
  }
}

.hud-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  position: relative;
  transition: var(--transition);
}

.hud-card:hover {
  border-color: rgba(34, 158, 217, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.hud-card.alert {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.hud-card.healthy {
  border-color: rgba(16, 185, 129, 0.35);
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hud-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.hud-value {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: -0.02em;
}

.hud-sub {
  font-size: 0.82rem;
  font-weight: 600;
}

.hud-sub.danger { color: #f87171; }
.hud-sub.warning { color: #fbbf24; }
.hud-sub.success { color: #34d399; }
.hud-sub.blue { color: #38bdf8; }

.hud-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* Main Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Styling */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.85rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-icon {
  font-size: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(34, 158, 217, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(34, 158, 217, 0.3);
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
}

.form-helper {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.input-box {
  width: 100%;
  background: #0d121c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--transition);
}

.input-box:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(34, 158, 217, 0.2);
}

.input-box::placeholder {
  color: #475569;
}

.input-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 580px) {
  .input-group-row {
    grid-template-columns: 1fr;
  }
}

/* Presets Section */
.presets-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.presets-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media (max-width: 580px) {
  .presets-grid {
    grid-template-columns: 1fr;
  }
}

.preset-btn {
  background: rgba(13, 18, 28, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.preset-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(34, 158, 217, 0.4);
  transform: translateY(-1px);
}

.preset-btn.active {
  background: rgba(34, 158, 217, 0.15);
  border-color: var(--tg-blue);
  box-shadow: 0 0 12px var(--tg-blue-glow);
}

.preset-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preset-ratio {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.preset-ratio.high {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.preset-ratio.low {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.preset-ratio.med {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.preset-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #229ED9 0%, #1782b6 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--tg-blue-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2da5f3 0%, #229ED9 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(34, 158, 217, 0.45);
}

.btn-purple {
  background: linear-gradient(135deg, #7928ca 0%, #6320a8 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--tg-purple-glow);
}

.btn-purple:hover {
  background: linear-gradient(135deg, #8a34de 0%, #7928ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(121, 40, 202, 0.45);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--tg-blue);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
}

/* Scanner Loading Animation */
.scan-progress-panel {
  display: none;
  background: #0d121c;
  border: 1px solid rgba(34, 158, 217, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  flex-direction: column;
  gap: 0.85rem;
}

.scan-progress-panel.active {
  display: flex;
}

.scan-header-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #229ED9, #7928ca, #06b6d4);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 999px;
  transition: width 0.3s ease;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.scan-stage-log {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Score & Health Visualization Panel */
.health-score-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(13, 18, 28, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  flex-wrap: wrap;
}

.gauge-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

.gauge-meter {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.5s;
}

.gauge-text-wrap {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-score {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.gauge-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}

.health-summary-info {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.health-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  width: fit-content;
}

.health-status-badge.critical {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.health-status-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.health-status-badge.healthy {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.health-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Distribution Segment Bar */
.dist-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dist-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.dist-seg {
  height: 100%;
  transition: width 0.6s ease;
  position: relative;
}

.dist-seg.active { background: #10b981; }
.dist-seg.inactive { background: #f59e0b; }
.dist-seg.deleted { background: #ef4444; }
.dist-seg.bots { background: #7928ca; }

.dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.76rem;
}

.dist-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}

.dist-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.dist-dot.active { background: #10b981; }
.dist-dot.inactive { background: #f59e0b; }
.dist-dot.deleted { background: #ef4444; }
.dist-dot.bots { background: #7928ca; }

/* Member Inspection Table */
.table-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.35rem;
  background: #0d121c;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.filter-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab-btn:hover {
  color: #fff;
}

.filter-tab-btn.active {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.table-search-input {
  max-width: 200px;
  background: #0d121c;
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
}

.table-selection-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -0.25rem;
}

.table-scroll-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #0b0f19;
  max-height: 380px;
  overflow-y: auto;
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.member-table th {
  background: #111726;
  color: var(--text-muted);
  padding: 0.75rem 0.85rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.member-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.member-table tr:hover {
  background: rgba(34, 158, 217, 0.04);
}

.member-user-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.76rem;
  color: #fff;
  flex-shrink: 0;
}

.member-avatar.deleted { background: #475569; }
.member-avatar.inactive { background: #b45309; }
.member-avatar.bot { background: #6b21a8; }
.member-avatar.active { background: #047857; }

.member-name-block {
  display: flex;
  flex-direction: column;
}

.member-display-name {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.member-id {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.tag-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.tag-badge.deleted {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tag-badge.inactive {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-badge.bot {
  background: rgba(121, 40, 202, 0.15);
  color: #c084fc;
  border: 1px solid rgba(121, 40, 202, 0.3);
}

.tag-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.flag-reason-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Rate Limit Engine & Live Purge Runner */
.rate-limit-card {
  border: 1px solid rgba(34, 158, 217, 0.3);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(13, 18, 28, 0.9) 100%);
}

.floodwait-explainer {
  background: rgba(34, 158, 217, 0.08);
  border: 1px solid rgba(34, 158, 217, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.floodwait-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.floodwait-text {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.floodwait-text strong {
  color: #fff;
}

.purge-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 680px) {
  .purge-controls-grid {
    grid-template-columns: 1fr;
  }
}

.toggle-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d121c;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.toggle-label-wrap {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}

.toggle-subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #232f45;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--tg-blue);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Terminal Console */
.terminal-window {
  background: #070a10;
  border: 1px solid #1a2336;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.terminal-header {
  background: #0d1320;
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1a2336;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.terminal-body {
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  min-height: 180px;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #cbd5e1;
}

.log-entry {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  word-break: break-all;
  line-height: 1.4;
}

.log-ts {
  color: var(--text-dim);
  flex-shrink: 0;
}

.log-tag {
  font-size: 0.68rem;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-weight: 700;
  flex-shrink: 0;
}

.log-tag.purge { background: rgba(239, 68, 68, 0.25); color: #f87171; }
.log-tag.jitter { background: rgba(34, 158, 217, 0.25); color: #38bdf8; }
.log-tag.safe { background: rgba(16, 185, 129, 0.25); color: #34d399; }
.log-tag.warn { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }

.purge-live-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  background: #090e18;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

@media (max-width: 600px) {
  .purge-live-hud {
    grid-template-columns: repeat(2, 1fr);
  }
}

.live-hud-stat {
  display: flex;
  flex-direction: column;
}

.live-hud-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.live-hud-num {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

/* Pricing & Monetization Section */
.pricing-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-headline {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1080px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
  transition: var(--transition);
}

.price-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 158, 217, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.price-card.featured {
  border-color: rgba(34, 158, 217, 0.6);
  background: linear-gradient(180deg, #151d30 0%, #111827 100%);
  box-shadow: 0 8px 30px rgba(34, 158, 217, 0.2);
}

.price-badge-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #229ED9, #7928ca);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.price-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.price-plan-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.price-plan-tagline {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.price-amount-box {
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
}

.price-primary-amt {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.price-sec-amt {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.price-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.price-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.price-features-list li .check-icon {
  color: #34d399;
  font-weight: 800;
}

/* Free Unlock Referral Card */
.free-unlock-card {
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
  border: 1px dashed rgba(34, 158, 217, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.free-unlock-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  min-width: 260px;
}

.free-unlock-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  background: rgba(34, 158, 217, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.free-unlock-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.free-unlock-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.group-invite-stepper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.invite-badge-box {
  display: flex;
  gap: 0.5rem;
}

.invite-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(13, 18, 28, 0.8);
  border: 2px dashed #334155;
  color: var(--text-dim);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.invite-slot.unlocked {
  background: #10b981;
  border-color: #34d399;
  color: #fff;
  border-style: solid;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Bot Add CTA Banner */
.bot-cta-banner {
  background: radial-gradient(circle at 10% 50%, rgba(34, 158, 217, 0.25), transparent 60%),
              linear-gradient(135deg, #131b2e 0%, #17112c 100%);
  border: 1px solid rgba(34, 158, 217, 0.4);
  border-radius: var(--radius-xl);
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.bot-cta-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.bot-cta-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 620px;
}

.bot-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #229ED9 0%, #7928ca 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(34, 158, 217, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: var(--transition);
}

.bot-cta-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 35px rgba(121, 40, 202, 0.5);
}

/* Setup Steps & Command Reference */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-item {
  display: flex;
  gap: 1rem;
  background: rgba(13, 18, 28, 0.6);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--tg-blue);
  color: #fff;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--tg-blue-glow);
}

.step-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.step-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.commands-table-wrap {
  overflow-x: auto;
}

.commands-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.commands-table th {
  background: #111726;
  color: var(--text-muted);
  padding: 0.65rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.commands-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.code-badge {
  font-family: var(--font-mono);
  background: rgba(34, 158, 217, 0.15);
  color: #38bdf8;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(34, 158, 217, 0.25);
  font-size: 0.76rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: rgba(13, 18, 28, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-chevron {
  transition: transform 0.3s;
  color: var(--tg-blue);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 250px;
  padding: 0 1.25rem 1.25rem;
}

/* Portal Backlink */
.portal-backlink-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0.5rem 0.5rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portal-backlink {
  color: var(--tg-blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.portal-backlink:hover {
  color: #70c7ff;
  text-decoration: underline;
}

.portal-sub {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  border: 1px solid var(--tg-blue);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Payment & Modal Dialog */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: #141b2b;
  border: 1px solid rgba(34, 158, 217, 0.4);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #fff;
}

.payment-method-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #0d121c;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.pay-method-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.pay-method-btn.active {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.qr-box {
  background: #fff;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  width: 140px;
  height: 140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box svg {
  width: 100%;
  height: 100%;
}

.crypto-addr-box {
  background: #090e18;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.copy-mini-btn {
  background: rgba(34, 158, 217, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(34, 158, 217, 0.4);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
}
