:root {
  --glow-1: #7c3aed;
  --glow-2: #2563eb;
  --glow-3: #f59e0b;
  --glow-4: #ec4899;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(120deg, rgba(27, 33, 80, 0.72), rgba(55, 28, 129, 0.78));
  color: #f8f8ff;
  padding: 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 40px rgba(22, 22, 46, 0.25);
}

.topbar h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  font-size: 0.75rem;
}

.topbar p {
  margin: 8px 0 0 0;
  opacity: 0.9;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(167, 139, 250, 0.2), transparent 48%),
    radial-gradient(700px 380px at 90% -8%, rgba(59, 130, 246, 0.2), transparent 44%),
    radial-gradient(600px 300px at 15% 120%, rgba(244, 114, 182, 0.2), transparent 45%),
    var(--color-bg);
  overflow-x: hidden;
}

.aurora {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.aurora-a {
  width: 420px;
  height: 420px;
  background: var(--glow-1);
  top: 8%;
  right: -130px;
  animation: drift-a 16s ease-in-out infinite alternate;
}

.aurora-b {
  width: 380px;
  height: 380px;
  background: var(--glow-3);
  bottom: 12%;
  left: -110px;
  animation: drift-b 14s ease-in-out infinite alternate;
}

.aurora-c {
  width: 320px;
  height: 320px;
  background: var(--glow-2);
  top: 55%;
  right: 20%;
  animation: drift-c 18s ease-in-out infinite alternate;
}

.wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 18px;
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.card {
  --_shine: linear-gradient(140deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.65));
  box-shadow:
    0 20px 35px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 18px;
  color: #101828;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.card.is-visible {
  animation: reveal-card 680ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.card-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: var(--_shine);
  opacity: 0.9;
  mix-blend-mode: soft-light;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow:
    0 24px 38px rgba(79, 70, 229, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.card h2 {
  margin: 0;
  font-size: 1.22rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-desc {
  margin: 8px 0 12px;
  color: var(--color-subtle);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chip-badge {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  color: #334155;
  background: rgba(79, 70, 229, 0.1);
}

.quick-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .quick-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: inset 0 0 0 0 rgba(79, 70, 229, 0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.chip:hover {
  transform: translateY(-1px);
}

.chip.is-selected {
  border-color: rgba(79, 70, 229, 0.8);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18);
}

form {
  display: grid;
  gap: 8px;
}

.label {
  font-size: 0.92rem;
  color: var(--color-subtle);
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: var(--radius-sm);
  padding: 10px;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  border-color: rgba(79, 70, 229, 0.8);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
  outline: none;
}

.checkbox-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: white;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

.btn-primary:active {
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: white;
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.btn-small {
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  padding: 6px 10px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.muted {
  color: var(--color-subtle);
  font-size: 0.9rem;
}

.poll-box {
  display: grid;
  gap: 10px;
}

.poll-question {
  margin: 0;
  font-weight: 600;
}

.poll-btn-wrap {
  display: grid;
  gap: 8px;
}

.poll-stats {
  margin-top: 6px;
  color: var(--color-subtle);
  font-size: 0.9rem;
  line-height: 1.6;
}

.meter {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.meter-row {
  display: grid;
  gap: 5px;
}

.meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #334155;
}

.bar {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  transition: width 500ms ease;
}

.mission-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.mission-text {
  margin-top: 8px;
}

.msg-item {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.75);
  transform-origin: top;
  animation: card-pop 420ms ease;
}

.msg-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #6366f1, #ec4899);
}

.msg-item .meta {
  font-size: 0.82rem;
  color: var(--color-subtle);
  margin-left: 8px;
}

.msg-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.likes {
  font-weight: bold;
}

.photo-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.photo-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.photo-item {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  transform: perspective(600px) rotateX(0deg);
  animation: photo-enter 540ms ease;
}

.photo-item:hover {
  transform: perspective(600px) rotateX(2deg);
}

.photo-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.photo-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 10px 0;
  color: var(--color-subtle);
  font-size: 0.78rem;
}

.photo-item p {
  margin: 0;
  padding: 8px 10px 12px;
  font-size: 0.91rem;
}

.footer {
  width: min(1080px, 100%);
  margin: 16px auto;
  padding: 0 16px 24px;
  text-align: right;
  color: #475569;
}

a {
  color: #3b82f6;
}

@keyframes reveal-card {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-pop {
  0% {
    transform: scale(0.98);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes photo-enter {
  0% {
    transform: scale(0.97) translateY(12px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes drift-a {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-24px, 24px) scale(1.05);
  }
}

@keyframes drift-b {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(24px, -20px) scale(1.08);
  }
}

@keyframes drift-c {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-18px, 18px) scale(1.02);
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.45);
  }
  70% {
    box-shadow: 0 0 0 13px rgba(168, 85, 247, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

.btn.pop {
  animation: pulse-ring 700ms ease;
}
