:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-secondary: #101626;
  --card: rgba(21, 26, 38, 0.92);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #e6e8f2;
  --muted: #9aa3b2;
  --accent: #44f4c2;
  --accent-2: #ffb562;
  --danger: #ff5d5d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

.app-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  font-size: 22px;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, rgba(68, 244, 194, 0.15), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(255, 181, 98, 0.14), transparent 50%),
    radial-gradient(circle at 60% 80%, rgba(72, 95, 255, 0.12), transparent 50%),
    var(--bg);
}

.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(68, 244, 194, 0.05), transparent 40%),
    linear-gradient(220deg, rgba(255, 181, 98, 0.08), transparent 45%);
  mix-blend-mode: screen;
  z-index: 0;
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  animation: fade-in 0.6s ease-out;
}

.page-title {
  font-family: "Unbounded", sans-serif;
  font-size: 34px;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
}

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

.feed {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-card {
  position: relative;
  padding: 28px 28px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(21, 26, 38, 0.95), rgba(16, 20, 32, 0.95));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise-in 0.6s ease-out both;
  animation-delay: var(--delay, 0s);
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 1px solid transparent;
  background: linear-gradient(120deg, rgba(68, 244, 194, 0.25), transparent 40%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.comment-card {
  --comment-indent: 0px;
  margin-left: var(--comment-indent);
  width: calc(100% - var(--comment-indent));
}

.comment-card.is-hidden {
  display: none;
}

.comment-highlight {
  border-color: rgba(120, 255, 164, 0.35);
  background: linear-gradient(135deg, rgba(120, 255, 164, 0.16), rgba(16, 20, 32, 0.95));
}

.comment-new {
  border-color: rgba(255, 132, 132, 0.6);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 132, 132, 0.25);
}

.comment-new.comment-highlight {
  border-color: rgba(255, 150, 150, 0.7);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-meta-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.post-meta-stack .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.post-meta .meta-left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.post-meta .meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.comment-preview .post-meta {
  flex-direction: column;
  gap: 10px;
}

.comment-preview .post-meta .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.comment-preview .post-meta .meta-right {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.comment-depth {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.24em;
}

.post-meta .meta-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
}

.post-meta .meta-pill.meta-pill-new {
  border-color: rgba(255, 140, 140, 0.45);
  background: rgba(255, 140, 140, 0.16);
  color: rgba(255, 226, 226, 0.95);
}

.post-meta .meta-pill.meta-pill-author {
  border-color: rgba(186, 132, 255, 0.45);
  background: rgba(186, 132, 255, 0.18);
  color: rgba(241, 221, 255, 0.95);
}

.rating {
  font-size: 16px;
  font-weight: 600;
}

.rating.positive {
  color: var(--accent);
}

.rating.negative {
  color: var(--danger);
}

.comment-actions {
  display: flex;
  gap: 8px;
}

.comment-action {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.comment-action:hover {
  transform: translateY(-1px);
  border-color: rgba(68, 244, 194, 0.5);
  background: rgba(68, 244, 194, 0.12);
  color: var(--text);
}

.post-body {
  color: var(--text);
  line-height: 1.65;
}

.post-body img {
  max-width: 100%;
  max-height: 600px;
  width: auto;
  height: auto;
  display: block;
  margin: 16px auto;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.post-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(68, 244, 194, 0.3);
}

.post-body a:hover {
  color: #7ef6d5;
  border-bottom-color: #7ef6d5;
}

.post-body .spoiler,
.post-body .inner_spoiler {
  color: transparent;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0 4px;
  transition: color 0.2s ease;
}

.post-body .spoiler a,
.post-body .inner_spoiler a {
  color: transparent;
  border-bottom-color: transparent;
}

.post-body .spoiler:hover,
.post-body .spoiler:focus,
.post-body .inner_spoiler:hover,
.post-body .inner_spoiler:focus {
  color: var(--text);
}

.post-body .spoiler:hover a,
.post-body .spoiler:focus a,
.post-body .inner_spoiler:hover a,
.post-body .inner_spoiler:focus a {
  color: var(--accent);
  border-bottom-color: rgba(68, 244, 194, 0.3);
}

.post-footer {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comments {
  font-size: 14px;
  color: var(--muted);
}

.comments a {
  color: var(--accent-2);
  text-decoration: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button_to {
  margin: 0;
}

.actions form {
  display: inline-block;
}

.button,
.actions button,
.actions input[type="submit"],
.link-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.actions button:hover,
.actions input[type="submit"]:hover,
.link-button:hover {
  transform: translateY(-1px);
  border-color: rgba(68, 244, 194, 0.6);
  background: rgba(68, 244, 194, 0.12);
}

.link-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.comment-nav {
  position: fixed;
  left: 24px;
  top: 45%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.nav-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 20, 32, 0.8);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.nav-button:hover {
  transform: translateY(-1px);
  border-color: rgba(68, 244, 194, 0.6);
  background: rgba(68, 244, 194, 0.12);
}

.video-wrapper {
  margin: 18px 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.video-wrapper .video-js {
  width: 100% !important;
  height: 600px;
}

.video-wrapper iframe {
  width: 100%;
  height: 600px;
  border: 0;
  display: block;
}

.video-wrapper .vjs-poster {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.video-wrapper .vjs-poster img,
.video-wrapper .vjs-poster picture {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: center;
}

.empty-state {
  max-width: 800px;
  margin: 80px auto 0;
  padding: 32px;
  border-radius: 18px;
  background: rgba(21, 26, 38, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  text-align: center;
  color: var(--muted);
}

@keyframes rise-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: 40px 18px 72px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title {
    font-size: 28px;
  }

  .post-card {
    padding: 22px;
  }

  .comment-nav {
    left: 12px;
    top: auto;
    bottom: 24px;
    transform: none;
  }
}
