:root {
  --bg: #080710;
  --panel: rgba(17, 14, 31, 0.88);
  --panel-strong: #12101f;
  --panel-soft: #18152a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f8f5ff;
  --muted: #aaa3bd;
  --accent: #8b2ff7;
  --accent-2: #d72bc9;
  --accent-soft: rgba(142, 58, 255, 0.18);
  --green: #41c781;
  --yellow: #e8b84b;
  --red: #d45a71;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 70% 10%, rgba(112, 27, 177, 0.18), transparent 28%),
    radial-gradient(circle at 20% 60%, rgba(190, 37, 143, 0.12), transparent 30%),
    linear-gradient(180deg, #080710 0%, #0b0913 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1600px, calc(100% - 32px));
  margin: 18px auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  border: 1px solid var(--line);
  background: rgba(10, 8, 19, 0.86);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 22px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #5d2ae6, #ca3db9);
  box-shadow: 0 0 25px rgba(137, 47, 247, 0.35);
}

.brand strong {
  display: block;
  font-size: 15px;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: #ba69ff;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 11px;
  color: #c8c3d5;
  transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  background: linear-gradient(90deg, rgba(113, 50, 214, 0.42), rgba(72, 31, 122, 0.2));
}

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.sidebar-card strong {
  font-size: 13px;
}

.sidebar-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.content {
  display: grid;
  gap: 18px;
}

.card,
.stream-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 13, 29, 0.96), rgba(12, 10, 22, 0.96));
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  position: relative;
}

.hero-copy {
  padding: 58px 54px;
  z-index: 2;
}

.eyebrow {
  color: #b669ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 12px 0 14px;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.02;
  max-width: 760px;
}

h2 {
  margin: 8px 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 8px;
}

.hero p,
.submission p {
  color: #d4cedf;
}

.muted {
  color: var(--muted) !important;
}

.primary-btn,
.ghost-btn,
.category,
.filters button,
.tab,
.approve,
.skip,
.delete {
  border: 0;
  cursor: pointer;
}

.primary-btn {
  margin-top: 22px;
  padding: 14px 24px;
  color: white;
  border-radius: 10px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(147, 39, 245, 0.25);
}

.primary-btn:hover {
  filter: brightness(1.08);
}

.primary-btn.full {
  width: 100%;
}

.primary-btn.small,
.ghost-btn.small {
  margin-top: 0;
  padding: 10px 13px;
}

.ghost-btn {
  padding: 10px 13px;
  color: #eee8f7;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.mailbox-art,
.envelope-art {
  position: relative;
  min-height: 100%;
}

.mailbox-art {
  background:
    radial-gradient(circle at 60% 55%, rgba(216, 41, 194, 0.25), transparent 25%),
    radial-gradient(circle at 62% 36%, rgba(117, 55, 220, 0.32), transparent 28%);
}

.mailbox-box {
  position: absolute;
  width: 220px;
  height: 145px;
  right: 92px;
  top: 126px;
  border-radius: 72px 18px 18px 18px;
  background: linear-gradient(135deg, #43216f, #25133f 70%);
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(120, 29, 196, 0.3);
}

.mailbox-door {
  position: absolute;
  inset: 12px auto 12px 12px;
  width: 92px;
  border-radius: 58px 12px 12px 58px;
  background: linear-gradient(160deg, #773bc7, #32175c);
}

.mailbox-slot {
  position: absolute;
  width: 70px;
  height: 8px;
  left: 24px;
  top: 42px;
  border-radius: 12px;
  background: #0b0612;
}

.mailbox-letter {
  position: absolute;
  left: 36px;
  top: 63px;
  font-size: 64px;
  filter: drop-shadow(0 0 20px rgba(255, 95, 186, 0.45));
}

.post {
  position: absolute;
  width: 24px;
  height: 155px;
  right: 126px;
  top: 255px;
  border-radius: 8px;
  background: linear-gradient(#9f34ef, #371554);
}

.ground-glow {
  position: absolute;
  width: 350px;
  height: 120px;
  right: 20px;
  bottom: 16px;
  background: radial-gradient(ellipse, rgba(192, 39, 162, 0.28), transparent 60%);
  filter: blur(8px);
}

.moon {
  position: absolute;
  width: 76px;
  height: 76px;
  border: 5px solid #9f55f0;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  right: 50px;
  top: 44px;
  opacity: 0.7;
  transform: rotate(-25deg);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.mini-card,
.letter-card {
  border: 1px solid var(--line);
  background: rgba(16, 13, 28, 0.82);
  border-radius: 14px;
}

.mini-card {
  display: flex;
  gap: 14px;
  padding: 22px;
}

.mini-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
}

.mini-card p,
.letter-card p,
.message p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.section-head,
.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-head a {
  color: #c66dff;
  font-size: 13px;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.letter-card {
  padding: 18px;
}

.letter-card small,
.message small,
.detail-top small {
  color: #7f788e;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.tag.love {
  background: rgba(220, 55, 142, 0.15);
  color: #ff7cc4;
}

.tag.confession {
  background: rgba(210, 122, 62, 0.15);
  color: #ffb578;
}

.tag.question {
  background: rgba(115, 94, 255, 0.15);
  color: #b9a9ff;
}

.tag.worry {
  background: rgba(236, 184, 59, 0.14);
  color: #ffd77a;
}

.submission {
  min-height: 520px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  overflow: hidden;
}

.submission-copy {
  padding: 46px;
}

.steps {
  display: flex;
  align-items: center;
  margin: 28px 0;
}

.step {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #232037;
  color: #8e879f;
  font-size: 12px;
}

.step.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.line {
  height: 2px;
  flex: 1;
  background: #262239;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.category {
  min-height: 54px;
  padding: 10px 12px;
  text-align: left;
  color: #d8d1e3;
  background: #151223;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.category:hover,
.category.active {
  border-color: rgba(180, 87, 255, 0.75);
  background: rgba(118, 40, 206, 0.18);
}

.privacy-note {
  margin: 18px 0 0;
  font-size: 12px;
  color: #8d859c !important;
}

.envelope-art {
  background:
    radial-gradient(circle at 50% 50%, rgba(132, 48, 223, 0.26), transparent 28%),
    radial-gradient(circle at 65% 62%, rgba(218, 39, 157, 0.18), transparent 28%);
}

.envelope {
  position: absolute;
  width: 290px;
  height: 190px;
  right: 72px;
  top: 150px;
  border-radius: 16px;
  background: linear-gradient(145deg, #9a4cca, #4e1d7c);
  transform: rotate(-8deg);
  box-shadow: 0 32px 80px rgba(173, 48, 210, 0.25);
}

.envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 50% 55%, 100% 0);
  background: rgba(255, 255, 255, 0.08);
}

.paper-lines {
  position: absolute;
  width: 225px;
  height: 138px;
  left: 32px;
  top: -65px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(180deg, transparent 0 19px, rgba(141, 89, 117, 0.18) 20px),
    linear-gradient(#ffe6ee, #ffd4e2);
}

.heart-seal {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: #ff83c6;
  font-size: 34px;
}

.spark {
  position: absolute;
  color: #ff66bf;
}

.spark-a {
  right: 92px;
  top: 78px;
}

.spark-b {
  right: 340px;
  top: 220px;
}

.stream-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(137, 29, 203, 0.23), transparent 31%),
    linear-gradient(180deg, #171024, #0a0811);
}

.stream-topbar,
.stream-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(155, 63, 255, 0.28);
}

.stream-brand {
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ef8fff;
}

.counter {
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(65, 40, 91, 0.6);
  font-size: 12px;
}

.stream-layout {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 16px;
  padding: 16px;
}

.stream-side {
  display: grid;
  gap: 12px;
}

.stream-info,
.stream-actions,
.chat {
  padding: 16px;
  border-radius: 13px;
  background: rgba(11, 8, 19, 0.82);
  border: 1px solid rgba(148, 54, 242, 0.44);
}

.stream-actions p {
  font-weight: 700;
}

.paper {
  min-height: 430px;
  padding: 58px 68px;
  border-radius: 16px;
  color: #44223e;
  font-family: Georgia, serif;
  font-size: 23px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.45), transparent 25%),
    linear-gradient(180deg, #f7c8db, #efb2cc);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  position: relative;
}

.paper::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(103, 41, 86, 0.08);
  pointer-events: none;
}

.paper-heart {
  text-align: center;
  color: #b43786;
  margin-top: 26px;
  font-size: 36px;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.chat-line {
  font-size: 12px;
  color: #d5ccde;
}

.chat-line strong {
  color: #d260ff;
}

.chat input {
  margin-top: auto;
  width: 100%;
  padding: 11px 12px;
  color: white;
  background: #0f0b18;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
}

.stream-footer {
  border-top: 1px solid rgba(155, 63, 255, 0.28);
  border-bottom: 0;
  justify-content: flex-start;
  gap: 48px;
  font-size: 12px;
  color: #aaa0b8;
}

.stream-footer strong {
  color: white;
  display: block;
}

.dashboard {
  padding: 34px;
}

.tabs {
  display: flex;
  gap: 22px;
  margin: 26px 0 18px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 0 0 12px;
  color: #9f97ad;
  background: transparent;
  position: relative;
}

.tab.active {
  color: white;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.tab span {
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #2e243c;
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 16px;
}

.inbox,
.message-detail {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 8, 18, 0.5);
}

.inbox {
  padding: 14px;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filters button {
  padding: 10px 12px;
  color: #a9a1b5;
  background: #151222;
  border-radius: 9px;
}

.message {
  padding: 14px;
  border-radius: 11px;
  border: 1px solid transparent;
}

.message + .message {
  margin-top: 8px;
}

.message.active {
  background: rgba(93, 35, 154, 0.18);
  border-color: rgba(156, 73, 239, 0.55);
}

.message small {
  display: block;
  margin-top: 8px;
}

.message-detail {
  padding: 22px;
}

.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-detail > p {
  margin: 24px 0;
  line-height: 1.8;
  color: #ded8e7;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.approve,
.skip,
.delete {
  padding: 11px 14px;
  border-radius: 9px;
  color: white;
}

.approve {
  background: rgba(42, 150, 97, 0.28);
  color: #86f2b9;
}

.skip {
  background: rgba(204, 150, 36, 0.22);
  color: #ffd66d;
}

.delete {
  background: rgba(179, 54, 83, 0.22);
  color: #ff91a8;
}

.info-box {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(151, 74, 235, 0.55);
  background: rgba(83, 30, 143, 0.12);
  border-radius: 11px;
  color: #bcb3c7;
  line-height: 1.6;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .sidebar-card {
    display: none;
  }

  .stream-layout {
    grid-template-columns: 180px 1fr;
  }

  .chat {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .hero,
  .submission,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .mailbox-art,
  .envelope-art {
    min-height: 320px;
  }

  .feature-grid,
  .recent-grid {
    grid-template-columns: 1fr 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stream-layout {
    grid-template-columns: 1fr;
  }

  .paper {
    min-height: 0;
    padding: 40px 28px;
  }

  .stream-footer {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 18px, 1600px);
    margin: 9px auto;
  }

  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .hero-copy,
  .submission-copy,
  .dashboard {
    padding: 28px 20px;
  }

  .feature-grid,
  .recent-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .dashboard-head,
  .detail-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    overflow-x: auto;
  }

  .mailbox-box {
    right: 50%;
    transform: translateX(50%);
  }

  .post {
    right: 50%;
  }

  .envelope {
    right: 50%;
    transform: translateX(50%) rotate(-8deg);
  }
}
