:root {
  --bg: #08080d;
  --panel: #12121b;
  --panel-2: #171722;
  --stroke: rgba(255, 255, 255, 0.09);
  --text: #f4f4f7;
  --muted: #9b9bb0;
  --accent: #ff8a3d;
  --accent-2: #ff4d8d;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(50% 40% at 15% 0%, rgba(255, 138, 61, 0.1), transparent 70%),
    radial-gradient(45% 35% at 85% 5%, rgba(255, 77, 141, 0.1), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.hidden { display: none !important; }

/* --------------------------------------------------------------- Header */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(8, 8, 13, 0.8);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #150a05;
  box-shadow: 0 6px 20px rgba(255, 110, 90, 0.3);
}

.logo-mark svg { width: 20px; height: 20px; }

.logo-text b {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-user-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-user-text b { font-size: 13.5px; }
.nav-user-text small { color: var(--muted); font-size: 11.5px; }

/* -------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn.primary {
  color: #1a0a04;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(255, 100, 100, 0.22);
}

.btn.primary:hover { box-shadow: 0 14px 32px rgba(255, 100, 100, 0.32); transform: translateY(-1px); }

.btn.ghost {
  color: var(--text);
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.04);
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.08); }

.btn.small { padding: 7px 13px; font-size: 12.5px; }
.btn.wide { width: 100%; padding: 13px 18px; font-size: 15px; }

.btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ----------------------------------------------------------------- Page */

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 36px 24px 60px;
}

/* ----------------------------------------------------------------- Hero */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  padding: 28px 0 44px;
}

.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16.5px;
  max-width: 52ch;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 26px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 13px;
}

.hero-stats b { color: var(--text); font-size: 16px; margin-right: 4px; }

.hero-card {
  background: linear-gradient(160deg, rgba(255, 138, 61, 0.12), rgba(255, 77, 141, 0.08)), var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(1.4deg);
}

.hero-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hero-card-top b { display: block; font-size: 15px; }
.hero-card .callsign { margin-top: 2px; display: inline-block; }

.hero-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-meter b { color: #fff; font-size: 15px; }

.meter {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.hero-card p { margin: 0 0 14px; color: #d8d8e6; font-size: 14px; }

.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-tags span {
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 3px 9px;
}

/* --------------------------------------------------------------- Layout */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  scroll-margin-top: 90px;
}

.feed { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------- Avatar */

.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #120b05;
  background: linear-gradient(135deg, var(--c, #ff8a3d), rgba(255, 255, 255, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.avatar.tiny { width: 32px; height: 32px; font-size: 11px; }

/* ------------------------------------------------------------ Composer */

.composer { padding: 16px; }

.composer-top { display: flex; gap: 12px; align-items: flex-start; }

.composer textarea {
  flex: 1;
  min-height: 78px;
  resize: vertical;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  padding: 9px 4px;
}

.composer textarea::placeholder { color: #6f6f85; }

.composer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
  flex-wrap: wrap;
}

.file-btn { position: relative; overflow: hidden; }

.hint { color: var(--muted); font-size: 11.5px; margin-right: auto; }

.preview {
  position: relative;
  margin: 12px 0 0 54px;
  width: fit-content;
  max-width: calc(100% - 54px);
}

.preview img {
  max-height: 220px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
}

.preview-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: #1b1b26;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: linear-gradient(120deg, rgba(255, 138, 61, 0.1), rgba(255, 77, 141, 0.08)), var(--panel);
}

.cta b { font-size: 15px; }
.cta p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; max-width: 52ch; }

/* ---------------------------------------------------------------- Posts */

.posts { display: flex; flex-direction: column; gap: 16px; }

.post { padding: 16px 16px 10px; }

.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }

.post-head .who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-head b { font-size: 14.5px; }

.callsign {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.08);
  border-radius: 999px;
  padding: 2px 7px;
}

.post-head time {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.post-text {
  margin: 0 0 12px;
  font-size: 15.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-text:empty { display: none; }

.post-media {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: #06060a;
  cursor: zoom-in;
}

.post-media img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.post-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 2px 6px;
}

.like {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 8px;
}

.like svg { width: 19px; height: 19px; transition: transform 0.15s ease; }
.like:hover { color: #ff8fa8; }
.like:hover svg { transform: scale(1.12); }
.like.liked { color: var(--accent-2); }
.like.liked svg { fill: var(--accent-2); stroke: var(--accent-2); }
.like b { font-weight: 600; font-variant-numeric: tabular-nums; }

.feed-status { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0; }

.load-more { align-self: center; padding: 10px 22px; }

/* -------------------------------------------------------------- Sidebar */

.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }

.side-card { padding: 18px; }
.side-card h2 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.top-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.top-list li { color: #cfcfdd; }
.top-list li b { font-weight: 650; }
.top-list li span { color: var(--muted); font-size: 11.5px; display: block; }
.top-list li.muted { color: var(--muted); list-style: none; margin-left: -20px; }

.about p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.about .fine { font-size: 11.5px; color: #6f6f85; margin: 0; }

/* --------------------------------------------------------------- Footer */

.foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 28px 20px 40px;
  color: #6f6f85;
  font-size: 12.5px;
  border-top: 1px solid var(--stroke);
}

.foot b { color: var(--muted); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.dot-sep { opacity: 0.5; }

/* ---------------------------------------------------------------- Modal */

.modal, .lightbox {
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: var(--panel-2);
  color: var(--text);
  padding: 26px;
  width: min(430px, calc(100vw - 32px));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}

.modal::backdrop, .lightbox::backdrop { background: rgba(3, 3, 7, 0.72); backdrop-filter: blur(3px); }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.modal-head h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.modal-head p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px;
  border-radius: 9px;
  cursor: pointer;
}

.tab.active { background: rgba(255, 255, 255, 0.1); color: var(--text); }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field small { color: #6f6f85; }

.field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: rgba(255, 138, 61, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.14);
}

.form-error {
  min-height: 18px;
  margin: 0 0 10px;
  color: #ff8fa8;
  font-size: 12.5px;
}

.form-error:empty { min-height: 0; margin: 0; }

.modal-note { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }

/* -------------------------------------------------------------- Lightbox */

.lightbox {
  width: min(1000px, calc(100vw - 32px));
  padding: 12px;
  background: #0d0d14;
}

.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 12px; }

/* ------------------------------------------------------------ Responsive */

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; order: 2; display: grid; grid-template-columns: 1fr 1fr; }
  .sidebar .about { grid-column: span 2; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 12px; }
  .hero-card { transform: none; max-width: 460px; }
}

@media (max-width: 640px) {
  .nav { padding: 12px 14px; }
  .page { padding: 22px 14px 44px; }
  .logo { font-size: 20px; }
  .nav-user-text { display: none; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 15px; }
  .cta { flex-direction: column; align-items: flex-start; }
  .cta .btn { width: 100%; }
  .sidebar { grid-template-columns: 1fr; }
  .sidebar .about { grid-column: auto; }
  .composer-actions .hint { order: 3; width: 100%; margin: 0; }
  .post-head time { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
