/*
  NaFunny HUB 1.4 Ultimate Telegram Feed styles
*/

.telegram-feed-section {
  margin-top: 72px;
}

.telegram-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.telegram-channel-block {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(91, 231, 255, 0.28);
  border-radius: 28px;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 0%, rgba(63, 226, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(8, 17, 38, 0.82), rgba(7, 9, 25, 0.72));
  box-shadow:
    0 0 30px rgba(27, 213, 255, 0.18),
    inset 0 0 22px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

[data-theme="purple"] .telegram-channel-block {
  border-color: rgba(220, 126, 255, 0.34);
  background:
    radial-gradient(circle at 15% 0%, rgba(222, 83, 255, 0.2), transparent 35%),
    linear-gradient(180deg, rgba(27, 10, 46, 0.84), rgba(12, 8, 30, 0.74));
  box-shadow:
    0 0 30px rgba(221, 83, 255, 0.18),
    inset 0 0 22px rgba(255, 255, 255, 0.04);
}

[data-theme="storm"] .telegram-channel-block {
  border-color: rgba(218, 232, 255, 0.28);
  background:
    radial-gradient(circle at 15% 0%, rgba(220, 235, 255, 0.14), transparent 35%),
    linear-gradient(180deg, rgba(15, 22, 34, 0.86), rgba(6, 8, 17, 0.76));
  box-shadow:
    0 0 30px rgba(210, 230, 255, 0.16),
    inset 0 0 22px rgba(255, 255, 255, 0.04);
}

.telegram-channel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.telegram-channel-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 18px rgba(57, 230, 255, 0.18);
  font-size: 24px;
}

.telegram-channel-head strong {
  display: block;
  color: #effbff;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(74, 229, 255, 0.35);
}

.telegram-channel-head small {
  display: block;
  margin-top: 3px;
  color: rgba(231, 243, 255, 0.62);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.telegram-channel-posts {
  display: grid;
  gap: 16px;
}

.telegram-post-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px;
  background: rgba(5, 9, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.035);
}

.telegram-post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-120%);
  animation: telegramCardShine 5.5s linear infinite;
}

.telegram-post-image {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
  margin-bottom: 14px;
  border-radius: 18px;
  object-fit: cover;
  max-height: 280px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.24);
}

.telegram-post-text {
  position: relative;
  z-index: 1;
  color: rgba(245, 250, 255, 0.92);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-line;
}

.telegram-post-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.telegram-post-date,
.telegram-post-views {
  color: rgba(232, 242, 255, 0.58);
  font-size: 13px;
}

.telegram-post-link {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 14px;
  color: #03111d;
  background: linear-gradient(135deg, #92f7ff, #28d8ff);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(44, 216, 255, 0.28);
}

[data-theme="purple"] .telegram-post-link {
  background: linear-gradient(135deg, #f2b3ff, #bf6cff);
  color: #17051f;
}

[data-theme="storm"] .telegram-post-link {
  background: linear-gradient(135deg, #ffffff, #b9d5ff);
  color: #07101c;
}

.telegram-feed-loading,
.telegram-feed-empty {
  grid-column: 1 / -1;
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  color: rgba(240, 248, 255, 0.8);
  background: rgba(5, 9, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.telegram-feed-loading span {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 50%;
  background: #38f5ff;
  box-shadow: 0 0 18px #38f5ff;
  animation: telegramPulse 1.2s ease-in-out infinite;
}

@keyframes telegramCardShine {
  0% { transform: translateX(-120%); }
  58% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

@keyframes telegramPulse {
  0%, 100% { opacity: .4; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 820px) {
  .telegram-feed-grid {
    grid-template-columns: 1fr;
  }

  .telegram-channel-block {
    padding: 16px;
    border-radius: 24px;
  }

  .telegram-post-card {
    padding: 16px;
  }

  .telegram-post-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .telegram-post-link {
    text-align: center;
  }
}

/* NaFunny HUB 1.5 Stable */
.telegram-feed-updated {
  grid-column: 1 / -1;
  justify-self: center;
  margin: -10px 0 4px;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(235, 250, 255, 0.82);
  background: rgba(6, 14, 32, 0.56);
  border: 1px solid rgba(110, 235, 255, 0.22);
  box-shadow: 0 0 18px rgba(35, 215, 255, 0.12);
  font-size: 13px;
  letter-spacing: 0.02em;
}

@media (max-width: 820px) {
  .telegram-feed-updated {
    margin-top: -4px;
    text-align: center;
  }
}

/* NaFunny HUB 1.5 Stable Feed Avatars */
.telegram-channel-avatar {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(116, 232, 255, 0.34);
  box-shadow:
    0 0 18px rgba(57, 230, 255, 0.22),
    inset 0 0 18px rgba(255, 255, 255, 0.06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.telegram-channel-block:hover .telegram-channel-avatar {
  transform: translateY(-1px) scale(1.035);
  border-color: rgba(125, 242, 255, 0.58);
  box-shadow:
    0 0 24px rgba(57, 230, 255, 0.34),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
}

[data-theme="purple"] .telegram-channel-avatar {
  border-color: rgba(224, 134, 255, 0.38);
  box-shadow:
    0 0 18px rgba(221, 83, 255, 0.24),
    inset 0 0 18px rgba(255, 255, 255, 0.06);
}

[data-theme="purple"] .telegram-channel-block:hover .telegram-channel-avatar {
  border-color: rgba(239, 176, 255, 0.62);
  box-shadow:
    0 0 24px rgba(221, 83, 255, 0.38),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
}

[data-theme="storm"] .telegram-channel-avatar {
  border-color: rgba(221, 235, 255, 0.36);
  box-shadow:
    0 0 18px rgba(210, 230, 255, 0.20),
    inset 0 0 18px rgba(255, 255, 255, 0.06);
}

[data-theme="storm"] .telegram-channel-block:hover .telegram-channel-avatar {
  border-color: rgba(245, 250, 255, 0.62);
  box-shadow:
    0 0 24px rgba(210, 230, 255, 0.34),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
}

@media (max-width: 520px) {
  .telegram-channel-avatar,
  .telegram-channel-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 16px;
  }
}
