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

:root {
  --black: #000000;
  --white: #FFFFFF;
  --red: #FF0033;
  --red-dim: rgba(255, 0, 51, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text: #FFFFFF;
  --text-2: rgba(255, 255, 255, 0.6);
  --text-3: rgba(255, 255, 255, 0.35);
  --radius: 20px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% -10%, rgba(255, 0, 51, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(255, 255, 255, 0.03), transparent);
  pointer-events: none;
  z-index: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.logo img { width: 28px; height: 28px; }

.lang-switch {
  padding: 4px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
}

.lang-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
}

.lang-btn:hover { color: var(--text); background: var(--glass-bg-hover); }

main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.hero {
  text-align: center;
  padding: 60px 0 80px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero .accent { color: var(--red); }

.hero p {
  font-size: 18px;
  color: var(--text-2);
  max-width: 600px;
  margin: 0 auto;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 0, 51, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.news-card .image-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #0a0a0a;
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover img { transform: scale(1.05); }

.news-card.no-image .image-wrapper { display: none; }
.news-card.no-image .content { padding-top: 28px; }

.news-card .badge {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 12px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,0,51,0.3);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red);
}

.news-card .content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.news-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  transition: color 0.3s;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  min-height: calc(19px * 1.3 * 3);
  max-height: calc(19px * 1.3 * 3);
}

.news-card:hover h3 { color: var(--red); }

.news-card .meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  font-size: 12px;
  color: var(--text-3);
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0;
}

.article h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 32px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.75) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #FFFFFF;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(24px);
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-2);
}

.article-meta .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-3);
}

.article figure {
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.article figure img { width: 100%; display: block; }

.article figcaption {
  padding: 12px 20px;
  background: var(--glass-bg);
  font-size: 12px;
  color: var(--text-3);
  border-top: 1px solid var(--glass-border);
}

.article figcaption a { color: var(--red); text-decoration: none; }

.article .content {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255,255,255,0.85);
}

.article .content h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 32px 0;
  color: var(--text);
}

.article .content h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 56px 0 24px 0;
  color: var(--text);
  padding-left: 20px;
  border-left: 4px solid var(--red);
  position: relative;
}

.article .content h2:first-child {
  margin-top: 0;
}

.article .content h2::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  transform: translateY(-50%);
}

.article .content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text);
}

.article .content p {
  margin: 0 0 20px 0;
  max-width: 65ch;
  text-wrap: pretty;
}

.article .content p + p {
  margin-top: 0;
}

.article .content ul,
.article .content ol {
  margin: 20px 0;
  padding-left: 24px;
}

.article .content li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.article .content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 32px 0;
}

.article .content blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--red);
  background: var(--glass-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-2);
}

.article .content a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid var(--red-dim);
}

.article .content a:hover { border-bottom-color: var(--red); }

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 12px 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.source-link:hover {
  border-color: var(--red);
  box-shadow: 0 0 24px rgba(255,0,51,0.2);
}

footer {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  padding: 32px 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

::selection { background: var(--red); color: var(--white); }

@media (max-width: 640px) {
  header { padding: 12px 16px; }
  main { padding: 24px 16px 60px; }
  .hero { padding: 32px 0 48px; }
  .news-grid { grid-template-columns: 1fr; gap: 16px; }
  .article { padding: 20px 0; }
  .article .content { font-size: 16px; }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tg-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
}

.tg-link:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.tg-link svg {
  color: #29B6F6;
  transition: color 0.3s;
}

.tg-link:hover svg {
  color: white;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-tg,
.footer-rss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.footer-tg:hover {
  background: rgba(41, 182, 246, 0.15);
  border-color: #29B6F6;
  color: #29B6F6;
}

.footer-rss:hover {
  background: rgba(255, 159, 10, 0.15);
  border-color: #FF9F0A;
  color: #FF9F0A;
}

/* Apple-style scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.99);
  filter: blur(6px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform, filter;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* Load More */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 48px 0 0;
}

.load-more-btn {
  padding: 14px 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

.load-more-btn:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 0, 51, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  padding: 16px 0;
  border-top: 1px solid var(--glass-border);
}

.page-link {
  padding: 10px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.page-link:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 0, 51, 0.3);
}

.page-info {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 500;
}

/* Discussion Widget — matches AMOLED Liquid Glass theme.
   NOTE: telegram widget renders inside a cross-origin iframe,
   so inner message styles can't be overridden. We style the
   card, header, frame (bg, radius, border) and CTA instead. */
.discussion-section {
  margin-top: 56px;
  padding: 28px;
  border-radius: var(--radius);
}

.discussion-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-left: 20px;
  border-left: 4px solid var(--red);
  position: relative;
}

.discussion-header::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  transform: translateY(-50%);
}

.discussion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: rgba(255, 0, 51, 0.12);
  border: 1px solid rgba(255, 0, 51, 0.3);
  color: var(--red);
}

.discussion-titles h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

.discussion-titles p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.telegram-widget-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #000;
  min-height: 220px;
}

.telegram-widget-frame iframe {
  width: 100% !important;
  display: block;
  border: 0 !important;
  background: #000 !important;
}

.discussion-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.discussion-cta svg {
  color: #29B6F6;
  transition: color 0.3s;
}

.discussion-cta:hover {
  border-color: var(--red);
  box-shadow: 0 0 24px rgba(255, 0, 51, 0.2);
  transform: translateY(-2px);
}

.discussion-cta:hover svg {
  color: var(--red);
}

.discussion-cta-arrow {
  color: var(--text-3);
}

@media (max-width: 640px) {
  .discussion-section {
    padding: 20px 16px;
  }
}
