:root {
  --bg: #07090d;
  --panel: #10141b;
  --panel-2: #171d27;
  --line: rgba(150, 169, 198, 0.18);
  --text: #f4f7fb;
  --muted: #9ba8ba;
  --soft: #6f7b8d;
  --accent: #58c7ff;
  --black: #07090d;
  --danger: #ff5b5b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 10%, rgba(88, 199, 255, 0.14), transparent 32%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.hidden { display: none !important; }

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
}

.brand-panel, .app-panel, .sidebar, .main-stage {
  border: 1px solid var(--line);
  background: rgba(16, 20, 27, 0.8);
  backdrop-filter: blur(18px);
}

.brand-panel {
  min-height: 680px;
  padding: 44px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-panel {
  min-height: 680px;
  padding: 22px;
  border-radius: 28px;
}

.mark {
  width: 64px;
  height: 64px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(88, 199, 255, 0.46);
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 34px;
}

.mark.small {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 900;
}

h1, h2, h3, p { letter-spacing: 0; }
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(44px, 7vw, 76px); line-height: 0.94; }
h2 { font-size: clamp(28px, 4vw, 40px); }

.lead {
  max-width: 520px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  margin: 22px 0 34px;
}

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

.proof-grid div, .profile-stats div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.proof-grid strong, .proof-grid span, .profile-stats strong, .profile-stats span {
  display: block;
}

.proof-grid span, .profile-stats span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.auth-card { height: 100%; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 18px;
}

.tab, .ghost {
  border: 0;
}

.tab {
  min-height: 44px;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.tab.active, .primary {
  background: var(--accent);
  color: var(--black);
}

.form, .composer {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  min-height: 48px;
  padding: 0 14px;
  outline: none;
}

select option { color: #10141b; }
textarea { min-height: 110px; padding-top: 14px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(88, 199, 255, 0.68); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.primary {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
}

.compact { min-height: 48px; }
.message { color: var(--muted); min-height: 22px; font-size: 13px; }

.social-app {
  width: min(1420px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 18px;
  padding: 18px 0;
}

.sidebar {
  border-radius: 26px;
  padding: 18px;
  min-height: calc(100vh - 36px);
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.side-brand strong, .side-brand span { display: block; }
.side-brand span { color: var(--muted); font-size: 12px; margin-top: 3px; }

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

.nav-item {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  text-align: left;
  padding: 0 14px;
  font-weight: 900;
}

.nav-item.active {
  color: var(--black);
  background: var(--accent);
}

.logout {
  margin-top: auto;
}

.main-stage {
  border-radius: 26px;
  padding: 22px;
  min-height: calc(100vh - 36px);
}

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

.search-box {
  width: min(420px, 45%);
}

.ghost {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 21px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 900;
}

.view { display: none; }
.active-view { display: block; }

.story-strip, .trend-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
}

.story {
  min-width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.035);
}

.story.live { border-color: rgba(255, 91, 91, 0.7); }
.add-story { color: var(--accent); font-size: 28px; background: transparent; }

.composer, .post, .feature-card, .topic-card, .camera-preview, .tool-list, .thread-list, .chat-panel, .profile-hero, .settings-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.composer {
  padding: 14px;
  margin-bottom: 16px;
}

.trend-row span {
  color: var(--accent);
  border: 1px solid rgba(88, 199, 255, 0.34);
  border-radius: 16px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
}

.feed, .profile-feed {
  display: grid;
  gap: 12px;
}

.post { padding: 16px; }

.post-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.source { font-weight: 900; }
.meta, .summary, .stats { color: var(--muted); }
.meta, .stats { font-size: 12px; }
.headline { font-size: 20px; line-height: 1.25; font-weight: 900; margin: 0 0 8px; }
.summary { line-height: 1.45; margin: 0 0 12px; }

.pill {
  align-self: flex-start;
  border: 1px solid rgba(88, 199, 255, 0.36);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.action-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-line button, .tool-list button, .topic-card button {
  min-height: 36px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  padding: 0 12px;
  font-weight: 800;
}

.feature-card {
  padding: 24px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: clamp(26px, 4vw, 42px);
  max-width: 780px;
}

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

.topic-card {
  padding: 16px;
  min-height: 150px;
}

.topic-card p {
  color: var(--muted);
  line-height: 1.45;
}

.studio-layout, .message-layout {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 14px;
}

.camera-preview {
  min-height: 520px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(88, 199, 255, 0.08), rgba(0, 0, 0, 0.28)), var(--panel);
}

.camera-preview span {
  color: var(--danger);
  font-weight: 900;
  margin-bottom: auto;
}

.camera-preview strong {
  font-size: 34px;
}

.camera-preview p {
  color: var(--muted);
}

.tool-list {
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.message-layout {
  grid-template-columns: 320px 1fr;
}

.thread-list, .chat-panel {
  padding: 14px;
}

.thread {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  color: var(--text);
  padding: 14px 4px;
  font-weight: 900;
}

.thread span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.bubble {
  width: fit-content;
  max-width: 72%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  color: var(--text);
}

.bubble.me {
  margin-left: auto;
  background: var(--accent);
  color: var(--black);
  font-weight: 900;
}

.chat-input {
  margin-top: 26px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.profile-hero {
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 32px;
  border: 1px solid rgba(88,199,255,0.45);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
  flex: 0 0 auto;
}

.profile-hero p {
  color: var(--muted);
  margin: 6px 0 0;
}

.profile-stats {
  margin-bottom: 14px;
}

.settings-panel {
  padding: 18px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 16px 0;
}

.settings-row span {
  color: var(--muted);
  text-align: right;
}

@media (max-width: 980px) {
  .shell, .social-app, .studio-layout, .message-layout {
    grid-template-columns: 1fr;
  }

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

  .side-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .main-stage {
    min-height: auto;
  }

  .app-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell, .social-app {
    width: min(100% - 18px, 1420px);
  }

  .brand-panel, .app-panel, .main-stage, .sidebar {
    padding: 16px;
    border-radius: 20px;
  }

  .proof-grid, .profile-stats, .side-nav {
    grid-template-columns: 1fr;
  }

  .story {
    min-width: 70px;
    height: 70px;
  }
}
