:root {
  --bg: #f6f3ef;
  --ink: #1f2933;
  --muted: #5f6b7a;
  --accent: #ff5f52;
  --accent-2: #ffb347;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(31, 41, 55, 0.12);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 95, 82, 0.2), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(255, 179, 71, 0.25), transparent 40%),
    var(--bg);
  min-height: 100vh;
}

.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 32px 20px;
  border-right: 1px solid rgba(31, 41, 55, 0.08);
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

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

.nav-item {
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.nav-item.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.1);
}

.feed {
  padding: 36px 40px 60px;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.feed-header h1 {
  margin: 0;
  font-size: 32px;
}

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

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

.composer input {
  width: 280px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e4e0da;
  background: #fff;
}

.stories {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.story {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd5c2, #ffbfa1);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.cards {
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.card-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #20293a, #364152);
}

.card-media {
  height: 220px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fce4d8, #f6b8a9);
  margin-top: 14px;
}

.card-media.tall {
  height: 300px;
}

.card-actions {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.card-actions button {
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--muted);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 95, 82, 0.3);
}

.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid #e5e0d8;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
}

.modal {
  background: #fff;
  padding: 28px;
  border-radius: 20px;
  max-width: 420px;
  box-shadow: var(--shadow);
  text-align: left;
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffe6d8;
  color: #b94e36;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal h2 {
  margin: 0 0 10px;
}

.modal p {
  margin: 0 0 18px;
  color: var(--muted);
}

.modal-error {
  min-height: 18px;
  margin-bottom: 16px;
  color: #b42318;
  font-weight: 600;
  font-size: 13px;
}

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

  .sidebar {
    display: none;
  }

  .feed-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .composer input {
    width: 100%;
  }
}
