.smx-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px 16px 40px;
  position: relative;
}

.smx-page.is-loading {
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.smx-side {
  position: sticky;
  top: 86px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.smx-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.smx-brandLogo {
  display: block;
  width: auto;
  height: 42px;
  object-fit: contain;
}

.smx-writeCta,
.smx-premiumCard a,
.smx-btn,
.smx-filterForm button,
.smx-miniBtn {
  text-decoration: none;
}

.smx-writeCta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f8cff, #1d68f2);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 18px 38px rgba(29, 104, 242, 0.18);
}

.smx-navGroup,
.smx-premiumCard,
.smx-panel,
.smx-hero,
.smx-continueCard,
.smx-trendingCard,
.smx-storyCard,
.smx-discoverCard,
.smx-genreCard {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.smx-navGroup {
  padding: 16px;
}

.smx-navTitle {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.smx-navItem {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: #1e293b;
  text-decoration: none;
  font-weight: 700;
}

.smx-navItem.is-active {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.smx-premiumCard {
  padding: 18px;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(18, 51, 109, 0.98), rgba(15, 31, 84, 0.98)),
    url("../img/storymania_sidebar_promo_ai.png");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right -28px bottom -6px;
  background-size: auto, 132px;
  color: #fff;
}

.smx-premiumCard p {
  margin: 8px 0 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.smx-premiumCard a {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: #12336d;
  font-weight: 800;
}

.smx-shell {
  min-width: 0;
}

.smx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.smx-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.smx-search input,
.smx-filterForm select {
  border: none;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-weight: 600;
}

.smx-search input {
  flex: 1 1 auto;
  min-width: 0;
}

.smx-search button,
.smx-filterForm button {
  border: none;
  cursor: pointer;
  font-weight: 800;
}

.smx-search button {
  padding: 9px 12px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
}

.smx-topActions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.smx-topBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 14px;
  background: #fff;
  color: #1e293b;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.smx-topBtn.is-primary,
.smx-btn.is-primary,
.smx-filterForm button,
.smx-miniBtn.is-wide {
  background: linear-gradient(135deg, #2f8cff, #1d68f2);
  color: #fff;
}

.smx-userMini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.smx-userMini img,
.smx-authorItem img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.smx-userMini b,
.smx-authorMeta a,
.smx-storyBody b,
.smx-discoverBody b,
.smx-trendingBody b,
.smx-continueBody b {
  color: #0f172a;
}

.smx-userMini small,
.smx-authorMeta small,
.smx-heading p,
.smx-continueBody small,
.smx-storyBody small,
.smx-discoverBody small,
.smx-trendingBody small,
.smx-hero p,
.smx-inlineMeta,
.smx-filterForm span,
.smx-empty,
.smx-tipPanel p {
  color: #64748b;
}

.smx-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.smx-main,
.smx-right {
  min-width: 0;
}

.smx-heading h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
  color: #0f172a;
}

.smx-heading p {
  margin: 8px 0 0;
  font-size: 16px;
}

.smx-sectionHead p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.smx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}

.smx-tab,
.smx-chip,
.smx-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.smx-tab {
  padding: 10px 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
}

.smx-tab.is-active {
  background: linear-gradient(135deg, #2f8cff, #1d68f2);
  color: #fff;
}

.smx-hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  margin-bottom: 22px;
  background: #0f172a;
}

.smx-heroImage,
.smx-heroImage img {
  width: 100%;
  height: 100%;
}

.smx-heroImage img {
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.smx-heroOverlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  min-height: 330px;
  padding: 28px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.18) 100%);
  color: #fff;
}

.smx-heroOverlay h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.04;
}

.smx-heroOverlay p,
.smx-heroMeta {
  max-width: 580px;
  color: rgba(255, 255, 255, 0.82);
}

.smx-heroBadge,
.smx-status {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.smx-heroMeta,
.smx-inlineMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.smx-heroActions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.smx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.smx-section {
  margin-bottom: 24px;
}

.smx-sectionHead,
.smx-panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.smx-sectionHead h3,
.smx-panelHead h4,
.smx-tipPanel h4 {
  margin: 0;
  font-size: 28px;
  color: #0f172a;
}

.smx-sectionHead a,
.smx-panelHead a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.smx-cardRow,
.smx-storyGrid,
.smx-genreGrid,
.smx-discoverGrid {
  display: grid;
  gap: 16px;
}

.smx-cardRow {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.smx-storyGrid,
.smx-discoverGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.smx-genreGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.smx-trendingGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.smx-continueCard,
.smx-storyCard,
.smx-discoverCard,
.smx-trendingCard,
.smx-genreCard {
  overflow: hidden;
}

.smx-continueThumb,
.smx-storyThumb,
.smx-discoverThumb,
.smx-trendingThumb {
  aspect-ratio: 1.15 / 1;
  background: #e2e8f0;
}

.smx-continueThumb img,
.smx-storyThumb img,
.smx-discoverThumb img,
.smx-trendingThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.smx-continueBody,
.smx-storyBody,
.smx-discoverBody,
.smx-trendingBody,
.smx-genreCard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.smx-chip {
  align-self: flex-start;
  padding: 6px 10px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
}

.smx-progress {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.smx-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, #2f8cff, #1d68f2);
  border-radius: inherit;
}

.smx-progressText {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
}

.smx-trendingCard {
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0;
}

.smx-rank,
.smx-rankDot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb347, #ff8c42);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.smx-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
}

.smx-discoverTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.smx-genreCard b {
  font-size: 18px;
}

.smx-panel {
  padding: 18px;
}

.smx-filterForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.smx-filterForm label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smx-filterForm select {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.smx-filterForm button {
  padding: 13px 16px;
  border-radius: 14px;
}

.smx-authorList {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.smx-authorItem {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.smx-authorMeta {
  min-width: 0;
}

.smx-authorMeta a {
  display: block;
  text-decoration: none;
  font-weight: 800;
}

.smx-miniBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
}

.smx-miniBtn.is-wide {
  width: 100%;
  padding: 11px 14px;
}

.smx-tagCloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.smx-tag {
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 13px;
}

.smx-tipPanel {
  background: linear-gradient(180deg, #eef6ff, #dcecff);
}

.smx-empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

@media (max-width: 1320px) {
  .smx-cardRow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .smx-storyGrid,
  .smx-discoverGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .smx-page,
  .smx-content {
    grid-template-columns: 1fr;
  }

  .smx-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .smx-topbar,
  .smx-topActions,
  .smx-heroActions {
    flex-direction: column;
    align-items: stretch;
  }

  .smx-cardRow,
  .smx-storyGrid,
  .smx-discoverGrid,
  .smx-genreGrid,
  .smx-trendingGrid {
    grid-template-columns: 1fr;
  }

  .smx-heading h1,
  .smx-heroOverlay h2 {
    font-size: 32px;
  }
}
