:root {
  --bg: #0d0f14;
  --panel: #161a22;
  --panel-soft: #11141b;
  --text: #f2f4f8;
  --muted: #a7acb8;
  --purple: #9b7bff;
  --purple-dark: #7b5ee6;
  --teal: #42d1c6;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

a {
  color: #a7baff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 {
  margin: 0 auto;
}

.main-title {
  line-height: 1;
  max-width: 1200px;
  margin: 20px auto;
  font-size: 35px;
  padding: 10px;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #10131a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
}

.brand {
  font-size: 28px;
  font-weight: 700;
}

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

.nav-links {
  display: flex;
  gap: 18px;
  font-weight: 600;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  text-align: center;
}

.nav-links a.active,
.nav-links a:hover {
  background: var(--purple);
  color: #fff;
}

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

.social {
  display: flex;
  gap: 10px;
  margin: 0 auto;
}

.social a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  /* background: rgba(255, 255, 255, 0.06); */
  font-size: 14px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(123, 77, 255, 0.45);
}

.btn:hover {
  background: var(--purple-dark);
}

.subscribe {
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--text);
  border-radius: 6px;
}

.content {
  padding: 0 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.feed-text {
  padding: 15px;
}

.post-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 26px;
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 22px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.post-card::after {
  content: '';
  position: absolute;
  inset: 50% -40% auto auto;
  width: 300px;
  height: 200px;
  background: radial-gradient(circle at 30% 30%, rgba(155, 123, 255, 0.22), transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(66, 209, 198, 0.22), transparent 55%);
  transform: translateY(-40%);
  pointer-events: none;
}

.media {
  display: flex;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
}

.placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.placeholder img {
  border-radius: 10px;
  width: 100%;
}

.chip-action {
  position: absolute;
  right: 12px;
  top: 12px;
  border: none;
  background: var(--purple);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(123, 77, 255, 0.4);
  cursor: pointer;
  font-size: 16px;
}

.body h2 {
  margin: 10px 0 12px;
  line-height: 1.3;
  font-size: 26px;
}

.body p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.badge-primary {
  background: var(--purple);
}

.badge-teal {
  background: #E91E63;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 110px;
  align-self: flex-start;
}

.card {
  background: var(--panel);
  border-radius: 18px;
  padding: 18px 18px 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-card {
  background: var(--panel);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 2px solid #2a2f3a;
  border-radius: 18px;
  background: var(--panel-soft);
}

.search-box {
  margin: 16px 0 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: var(--panel-soft);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box input {
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: var(--text);
}

.search-box .btn {
  width: 110px;
  box-shadow: 0 8px 18px rgba(123, 77, 255, 0.3);
}

.recent-card {
  padding-bottom: 18px;
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.recent-list li {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.recent-list li:last-child {
  border-bottom: none;
}

.recommendations {
  padding: 0 24px 40px;
}

.rec-card {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  padding: 18px 18px 24px;
}

.rec-card__title {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 2px solid #2a2f3a;
  border-radius: 18px;
  background: var(--panel-soft);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.rec-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  background: var(--panel-soft);
  border-radius: 16px;
  padding: 6px 6px 12px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.rec-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  min-height: 140px;
  background: #1e222b;
  display: grid;
  align-items: end;
}

.rec-thumb .badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
}

.rec-placeholder {
  background: linear-gradient(135deg, #ffb35c, #f76b82, #5fb7ff, #37c7b3);
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.rec-item p {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 16px 18px;
  }

  .nav {
    position: absolute;
    top: 72px;
    right: 18px;
    left: 18px;
    flex-direction: column;
    background: var(--panel);
    border-radius: 14px;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
    padding: 14px 16px;
    gap: 12px;
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .subscribe {
    width: 100%;
    justify-content: center;
  }

  .nav-toggle {
    display: flex;
  }

  .content {
    padding: 0 0;
  }

  .post-card {
    padding: 14px 14px 20px;
  }

  .body h2 {
    font-size: 22px;
  }

  .recommendations {
    padding: 0 16px 28px;
  }

  .rec-card {
    padding: 16px 12px 18px;
  }

  .rec-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .rec-item {
    scroll-snap-align: start;
  }
}

.img-box {
  width: 100%;
  height: auto;
  overflow: hidden;
  margin: 0px auto 15px auto;
}

.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

footer {
  padding: 10px;
  margin: 0 auto;
  text-align: center;
}


.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 15px 10px;
  background: linear-gradient(145deg, #f74b57, #e40310);
  border-radius: 0.75rem;
  transition: all 0.1s ease;
  max-width: 350px;
  height: 60px;
  color: var(--light-primary);
  margin: 17px auto;
}

.button:hover {
  background: linear-gradient(145deg, #e73844, #c7020f);
}

.button:active {
  letter-spacing: 0px;
  transform: skew(-10deg) translateY(6px); 
  background: linear-gradient(145deg, #c7020f, #a0020d); 
}