:root {
  --ink: #1a1a1a;
  --ink-light: #555;
  --ink-faint: #bbb;
  --ink-ghost: #e5e5e5;
  --bg: #fafafa;
  --white: #fff;
  --accent-blue: #2563eb;
  --accent-blue-bg: rgba(37, 99, 235, 0.06);
  --accent-red: #dc2626;
  --accent-red-bg: rgba(220, 38, 38, 0.06);
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
  --sans: 'Heebo', 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  direction: rtl;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink-light);
}

.blueprint-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--ink-ghost) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-ghost) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.4;
}

/* TICKER */
.ticker-bar {
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  z-index: 102;
  height: 32px;
}

.ticker-label {
  background: var(--accent-red);
  color: #fff;
  padding: 0 0.75rem;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 1;
}

.ticker-label .mono {
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  direction: ltr;
}

.ticker-content {
  display: inline-flex;
  white-space: nowrap;
  gap: 3rem;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-family: var(--sans);
  color: #eee;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
  direction: rtl;
}

.ticker-item:hover {
  color: #fff;
}

.ticker-dot {
  width: 4px;
  height: 4px;
  background: var(--accent-red);
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* HEADER */
header {
  background: var(--white);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 101;
  border-bottom: 1px solid var(--ink);
}

header::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink-ghost);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.logo-frame {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: block;
  text-decoration: none;
}

.header-logo {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--ink);
  position: relative;
  z-index: 1;
}

.logo-corners .corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--ink);
  border-style: solid;
  z-index: 2;
}

.corner.tl { top: -3px; right: -3px; border-width: 1px 1px 0 0; }
.corner.tr { top: -3px; left: -3px; border-width: 1px 0 0 1px; }
.corner.bl { bottom: -3px; right: -3px; border-width: 0 1px 1px 0; }
.corner.br { bottom: -3px; left: -3px; border-width: 0 0 1px 1px; }

.header-text {
  position: relative;
  min-width: 0;
}

.dimension-line.top-dim {
  position: absolute;
  top: -6px;
  right: 0;
  width: 60px;
  height: 1px;
  background: var(--ink-faint);
}

.dimension-line.top-dim::before,
.dimension-line.top-dim::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--ink-faint);
}

.dimension-line.top-dim::before { right: 0; }
.dimension-line.top-dim::after { left: 0; }

header h1 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtitle {
  font-size: 0.78rem;
  color: var(--ink-light);
  font-weight: 300;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.callout-line {
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--ink-faint);
  vertical-align: middle;
}

/* Floating push button */
.push-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 300;
  cursor: pointer;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}
.push-banner-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-family: var(--sans);
}
.push-banner-content svg { stroke: var(--white); flex-shrink: 0; }
.push-banner-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 0.3rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.push-banner-close:hover { opacity: 1; }

.install-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--ink);
  color: var(--white);
  border: none;
  font-size: 0.82rem;
  font-family: var(--sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: opacity 0.2s;
}
.install-btn:hover { opacity: 0.85; }
.install-btn svg { stroke: var(--white); }

.push-fab {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--ink-ghost);
  color: var(--ink-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.push-fab:hover {
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.push-fab.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: var(--white);
}

.push-fab.active svg { stroke: var(--white); }
.push-fab.active:hover { opacity: 0.85; }

/* MAIN */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 160px);
  position: relative;
  z-index: 1;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--ink-ghost);
}

.section-label .mono {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--ink-faint);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--white);
  border: 1px solid var(--ink-ghost);
  padding: 0.6rem 1rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

.search-bar:focus-within { border-color: var(--ink); }
.search-bar svg { color: var(--ink-faint); flex-shrink: 0; }

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
}

.search-bar input::placeholder { color: var(--ink-faint); }

/* POST CARDS */
.post-card {
  background: var(--white);
  border: 1px solid var(--ink-ghost);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: all 0.25s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.post-card::before,
.post-card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
}

.post-card::before {
  top: -1px; right: -1px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}

.post-card::after {
  bottom: -1px; left: -1px;
  border-bottom: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}

.post-card:hover {
  border-color: var(--ink-faint);
  box-shadow: 8px 8px 0 var(--ink-ghost);
}

.post-title-link {
  color: inherit;
  text-decoration: none;
}
.post-title-link:hover {
  text-decoration: underline;
}

.post-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  line-height: 1.7;
  font-weight: 700;
  color: var(--ink);
  position: relative;
  padding-right: 1rem;
}

.post-card h2::before {
  content: '';
  position: absolute;
  right: 0; top: 0.55em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-red);
}

.post-card .post-content {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--ink-light);
  white-space: pre-line;
  padding-right: 1rem;
  border-right: 1px solid var(--ink-ghost);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-card .post-image {
  width: 100%;
  margin-top: 1.25rem;
  border: 1px solid var(--ink-ghost);
  display: block;
}

.post-card .post-video {
  width: 100%;
  margin-top: 1.25rem;
  border: 1px solid var(--ink-ghost);
  background: #000;
  display: block;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--ink-ghost);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-card .post-date {
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-family: var(--mono);
}

.post-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-views {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-family: var(--mono);
}

.post-views svg { opacity: 0.5; }

/* Share bar */
.share-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

.share-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--sans);
  border: 1px solid var(--ink-ghost);
  background: var(--white);
  color: var(--ink-light);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.share-link:hover { border-color: var(--ink-faint); color: var(--ink); }

.copy-toast {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  animation: toast-fade 1.5s ease forwards;
}

@keyframes toast-fade {
  0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 1; }
  100% { opacity: 0; }
}
.share-link.whatsapp:hover { border-color: #25d366; color: #25d366; }
.share-link.telegram:hover { border-color: #0088cc; color: #0088cc; }
.share-link.twitter:hover { border-color: #1da1f2; color: #1da1f2; }

/* Back to feed */
.back-to-feed-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--ink-ghost);
  font-size: 0.85rem;
  font-family: var(--sans);
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1.25rem;
}

.back-to-feed-btn:hover { border-color: var(--ink); color: var(--ink); }
.back-to-feed-btn .mono { color: var(--accent-blue); }

/* Comments */
.comment-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.delete-comment-btn {
  background: none;
  border: none;
  font-size: 0.7rem;
  color: var(--accent-red);
  cursor: pointer;
  font-family: var(--sans);
  padding: 0;
}

.delete-comment-btn:hover { text-decoration: underline; }

.comments-section {
  margin-top: 1rem;
  border-top: 1px dashed var(--ink-ghost);
  padding-top: 0.75rem;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-light);
}

.toggle-comments-btn {
  background: none;
  border: 1px solid var(--ink-ghost);
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-comments-btn:hover { border-color: var(--ink); color: var(--ink); }

.comments-body { margin-top: 0.75rem; }
.comments-list { margin-bottom: 1rem; }

.comment {
  padding: 0.75rem;
  border: 1px solid var(--ink-ghost);
  margin-bottom: 0.5rem;
  background: var(--bg);
}

.comment.comment-reply {
  margin-right: 1.5rem;
  border-right: 3px solid var(--accent-blue);
}

.comment-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.comment-author { font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.comment-time { font-size: 0.65rem; font-family: var(--mono); color: var(--ink-faint); }

.comment-body {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-light);
  word-wrap: break-word;
}

.reply-btn {
  background: none;
  border: none;
  font-size: 0.7rem;
  color: var(--accent-blue);
  cursor: pointer;
  font-family: var(--sans);
  margin-top: 0.3rem;
  padding: 0;
}

.reply-btn:hover { text-decoration: underline; }

.no-comments, .comment-error {
  font-size: 0.82rem;
  color: var(--ink-faint);
  text-align: center;
  padding: 1rem;
}

.comment-form { display: flex; flex-direction: column; gap: 0.5rem; }

.comment-nickname {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--ink-ghost);
  font-size: 0.85rem;
  font-family: var(--sans);
  outline: none;
  background: var(--white);
}

.comment-nickname:focus { border-color: var(--ink); }

.comment-text {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--ink-ghost);
  font-size: 0.85rem;
  font-family: var(--sans);
  outline: none;
  resize: vertical;
  min-height: 50px;
  background: var(--white);
}

.comment-text:focus { border-color: var(--ink); }

.comment-reply-label { font-size: 0.75rem; color: var(--accent-blue); padding: 0.25rem 0; }

.cancel-reply {
  background: none;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  font-size: 0.75rem;
  margin-right: 0.5rem;
}

.comment-submit {
  align-self: flex-start;
  padding: 0.45rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  border: none;
  font-size: 0.82rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: opacity 0.2s;
}

.comment-submit:hover { opacity: 0.8; }

/* Load more */
.load-more-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--white);
  border: 1px dashed var(--ink-faint);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink-light);
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  text-align: center;
}

.load-more-btn:hover { border-style: solid; border-color: var(--ink); color: var(--ink); }
.load-more-btn .mono { color: var(--accent-blue); }

.loader { text-align: center; padding: 3rem; }

.spinner {
  width: 32px; height: 32px;
  border: 1px solid var(--ink-ghost);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-msg {
  text-align: center;
  color: var(--ink-faint);
  padding: 5rem 1rem;
  font-size: 0.95rem;
  line-height: 2;
}

/* Footer */
.footer-about-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-light);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.footer-about-link:hover { color: var(--ink); }

/* About page */
.about-page {
  background: var(--white);
  border: 1px solid var(--ink-ghost);
  padding: 2.5rem;
  position: relative;
}

.about-page::before,
.about-page::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
}

.about-page::before { top: -1px; right: -1px; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.about-page::after { bottom: -1px; left: -1px; border-bottom: 2px solid var(--ink); border-left: 2px solid var(--ink); }

.about-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 2rem;
  padding-right: 1rem;
  position: relative;
}

.about-title::before {
  content: '';
  position: absolute;
  right: 0; top: 0.45em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-red);
}

.about-section { margin-bottom: 2rem; }

.about-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--ink-ghost);
}

.about-section p {
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--ink-light);
  margin-bottom: 0.75rem;
}

.about-list { list-style: none; padding: 0; }

.about-list li {
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--ink-light);
  padding-right: 1.25rem;
  position: relative;
  margin-bottom: 0.35rem;
}

.about-list li::before {
  content: '';
  position: absolute;
  right: 0; top: 0.7em;
  width: 5px; height: 5px;
  border: 1px solid var(--accent-blue);
  transform: rotate(45deg);
}

.contact-telegram-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--ink-ghost);
  color: var(--ink-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--sans);
  transition: all 0.2s;
}

.contact-telegram-link:hover { border-color: var(--ink); color: var(--ink); }

.about-page .back-to-feed-btn { margin-top: 2rem; }

footer {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-inner p {
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  padding: 1rem 0;
}

.dimension-line-h {
  height: 1px;
  background: var(--ink-ghost);
  position: relative;
}

.dimension-line-h::before,
.dimension-line-h::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--ink-faint);
}

.dimension-line-h::before { right: 0; }
.dimension-line-h::after { left: 0; }

/* MOBILE */
@media (max-width: 600px) {
  header { padding: 0.75rem 1rem; }
  header h1 { font-size: 1rem; }
  .header-logo { width: 40px; height: 40px; }
  .logo-frame { width: 44px; height: 44px; }
  .header-brand { gap: 0.75rem; }
  .dimension-line.top-dim { display: none; }
  .callout-line { display: none; }
  .push-btn { padding: 0.35rem 0.65rem; font-size: 0.7rem; }
  .push-label { display: none; }
  .subtitle { font-size: 0.7rem; }
  main { padding: 1.25rem 0.75rem; }
  .section-label { margin-bottom: 1.25rem; }
  .post-card { padding: 1.15rem; margin-bottom: 1rem; }
  .post-card h2 { font-size: 1rem; }
  .post-card .post-content { font-size: 0.85rem; padding-right: 0.75rem; }
  .post-footer { flex-direction: column; align-items: flex-start; }
  .comment.comment-reply { margin-right: 0.75rem; }
  .share-link { font-size: 0.7rem; padding: 0.35rem 0.6rem; }
  .about-page { padding: 1.5rem; }
  footer { padding: 1.5rem 1rem; }
}

@media (max-width: 380px) {
  header h1 { font-size: 0.9rem; }
  .header-logo { width: 34px; height: 34px; }
  .logo-frame { width: 38px; height: 38px; }
  .post-card { padding: 1rem; }
}
