/* Telelinking — MTProto Proxy Directory (Mobile-First Cards) */
.tl-proxy-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 14px 70px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1e293b;
}

@media (min-width: 640px) {
  .tl-proxy-wrap {
    padding: 36px 20px 80px;
  }
}

.tl-header {
  text-align: center;
  margin-bottom: 24px;
}

.tl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.tl-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #2563eb;
  animation: tlPing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes tlPing {
  75%, 100% { transform: scale(1.8); opacity: 0; }
}

.tl-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}

@media (min-width: 640px) {
  .tl-title {
    font-size: 2.4rem;
  }
}

.tl-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  max-width: 720px;
  margin: 0 auto 14px;
  line-height: 1.5;
}

.tl-pills-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tl-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 11px;
  color: #334155;
  font-weight: 500;
}

/* Controls */
.tl-controls-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  padding: 12px 14px;
}

.tl-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tl-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

@media (min-width: 768px) {
  .tl-tabs {
    width: auto;
  }
}

.tl-tab {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  background: #f1f5f9;
  color: #475569;
  transition: all 0.15s;
  flex: 1;
  text-align: center;
}

@media (min-width: 640px) {
  .tl-tab {
    flex: initial;
  }
}

.tl-tab.active, .tl-tab:hover {
  background: #2563eb;
  color: #ffffff;
}

.tl-search-group {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

@media (min-width: 768px) {
  .tl-search-group {
    width: auto;
    flex: 1;
    max-width: 380px;
  }
}

.tl-select, .tl-input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
  background: #ffffff;
}

.tl-select {
  flex: 1;
}

@media (min-width: 640px) {
  .tl-select {
    flex: initial;
  }
}

/* ==========================================================================
   CARDS GRID
   ========================================================================== */
.tl-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 36px;
}

@media (min-width: 640px) {
  .tl-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .tl-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

.tl-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tl-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.1);
}

.tl-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tl-card-loc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.tl-card-ping {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #f8fafc;
}

.tl-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tl-tag-tls {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.tl-tag-pad {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.tl-tag-dir {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.tl-card-host {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: monospace;
  font-size: 12px;
}

.tl-card-addr {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}

.tl-btn-action-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #2563eb;
  color: #ffffff;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
  transition: all 0.15s;
  min-height: 40px;
}

.tl-btn-action-full:hover, .tl-btn-action-full:active {
  background: #1d4ed8;
}

.tl-guide {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-top: 32px;
}

.tl-guide h2 {
  font-size: 1.25rem;
  color: #0f172a;
  margin: 0 0 10px;
}

.tl-guide p {
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}

/* Telegram Channel Subscription Card */
.tl-channel-banner {
  width: 100% !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%) !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  margin-bottom: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 14px !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08) !important;
}

@media (min-width: 768px) {
  .tl-channel-banner {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 24px !important;
  }
}

.tl-channel-content {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.tl-channel-avatar {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  border: 2px solid #2563eb !important;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.25) !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  background: #0f172a !important;
}

.tl-channel-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.tl-channel-text {
  min-width: 0 !important;
  flex: 1 !important;
}

.tl-channel-badge-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 3px !important;
}

.tl-channel-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.tl-channel-tag {
  background: #dbeafe !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.tl-channel-desc {
  font-size: 12.5px !important;
  color: #475569 !important;
  margin: 0 !important;
  line-height: 1.45 !important;
}

.tl-channel-desc strong {
  color: #0f172a !important;
}

.tl-channel-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  padding: 11px 20px !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

.tl-channel-btn:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4) !important;
  transform: translateY(-1px) !important;
}

