:root {
  --public-shell-border: rgba(157, 46, 197, 0.14);
  --public-surface: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(248, 241, 255, 0.9)
  );
  --public-surface-soft: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.94),
    rgba(250, 245, 255, 0.9)
  );
  --public-copy-muted: #665d77;
}

body {
  position: relative;
  overflow-x: clip;
  background: #fbf9ff;
}

body::before {
  content: "";
  position: fixed;
  inset: -10% -8%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(220, 200, 255, 0.72), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 220, 238, 0.42), transparent 20%),
    radial-gradient(circle at 20% 74%, rgba(220, 200, 255, 0.24), transparent 20%),
    radial-gradient(circle at 82% 68%, rgba(255, 220, 238, 0.18), transparent 18%),
    linear-gradient(180deg, #fcfbff 0%, #f5efff 44%, #fbf9ff 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(157, 46, 197, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 46, 197, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 78%);
}

header#header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 0;
  padding: 22px 20px 28px;
  background: transparent;
}

#header .topbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 18px;
  border-radius: 24px;
  border: 1px solid var(--public-shell-border);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 20px 48px rgba(95, 64, 148, 0.12);
  backdrop-filter: blur(18px);
}

#header .left-wrap {
  gap: 28px;
}

#header .brand {
  gap: 14px;
}

#header .brand-logo {
  width: 52px;
  height: 52px;
}

#header .nav {
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(157, 46, 197, 0.08);
  background: rgba(157, 46, 197, 0.05);
}

#header .nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #635a76;
  font-weight: 600;
}

#header .nav-link:hover {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(157, 46, 197, 0.14);
  box-shadow: 0 10px 22px rgba(157, 46, 197, 0.1);
}

#header .nav-link.active {
  color: var(--brand);
  border-color: rgba(157, 46, 197, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 238, 255, 0.96));
  box-shadow:
    0 10px 24px rgba(157, 46, 197, 0.12),
    inset 0 -2px 0 var(--brand);
}

#header .actions {
  gap: 12px;
}

#header .header-btn,
#header .notif-btn,
#header .avatar,
#header .mobile-menu-btn {
  border-radius: 999px;
}

#header .header-btn {
  padding: 11px 16px;
}

#header .header-btn-ghost,
#header .notif-btn,
#header .mobile-menu-btn {
  border-color: rgba(157, 46, 197, 0.14);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 20px rgba(157, 46, 197, 0.08);
}

#header .header-btn-ghost:hover,
#header .notif-btn:hover,
#header .mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(157, 46, 197, 0.22);
}

#header .notif-btn,
#header .avatar {
  width: 40px;
  height: 40px;
}

#header .avatar {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  box-shadow: 0 12px 28px rgba(157, 46, 197, 0.24);
}

#header .notif-menu,
#header .menu {
  top: calc(100% + 12px);
  border-radius: 20px;
  border-color: rgba(157, 46, 197, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 48px rgba(73, 48, 120, 0.16);
  backdrop-filter: blur(18px);
}

.page-content {
  max-width: 1280px;
  min-height: auto;
  margin: 0 auto;
  padding: 0 20px 72px;
}

.page-head {
  position: relative;
  overflow: hidden;
  padding: 38px 34px;
  border-radius: 34px;
  border: 1px solid var(--public-shell-border);
  background: var(--public-surface);
  box-shadow:
    0 28px 70px rgba(112, 77, 173, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.76), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(157, 46, 197, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 40%);
}

.head-left {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.page-head h1 {
  margin: 0 0 10px;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.muted {
  margin: 0;
  color: var(--public-copy-muted);
  line-height: 1.8;
}

.panel {
  padding-top: 24px;
}

.feed-status {
  margin: 14px 6px 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--public-copy-muted);
}

.feed-status[data-tone="loading"] {
  color: var(--brand);
}

.feed-status[data-tone="error"] {
  color: #c14b61;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 14px;
  align-items: center;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid rgba(157, 46, 197, 0.14);
  background: var(--public-surface-soft);
  box-shadow:
    0 18px 40px rgba(90, 61, 140, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(157, 46, 197, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.search svg {
  color: var(--brand);
  flex: 0 0 auto;
}

.search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.search input::placeholder {
  color: #9186a6;
}

.dropdown {
  position: relative;
  min-width: 180px;
}

.dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(157, 46, 197, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.dropdown-btn:hover,
.dropdown.open .dropdown-btn {
  border-color: rgba(157, 46, 197, 0.22);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(157, 46, 197, 0.12);
}

.dropdown-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 100%;
  margin: 0;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(157, 46, 197, 0.14);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 48px rgba(73, 48, 120, 0.16);
  backdrop-filter: blur(18px);
  list-style: none;
  display: none;
  z-index: 20;
}

.dropdown.open .dropdown-list {
  display: block;
}

.dropdown-list li {
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.dropdown-list li:hover {
  background: rgba(157, 46, 197, 0.08);
}

.dropdown-list li.selected {
  background: rgba(157, 46, 197, 0.12);
  color: var(--brand);
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.task-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(157, 46, 197, 0.14);
  background: var(--public-surface);
  box-shadow:
    0 18px 40px rgba(90, 61, 140, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(157, 46, 197, 0.92), rgba(157, 46, 197, 0));
}

.task-card::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -36px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 46, 197, 0.16), transparent 70%);
  pointer-events: none;
}

.task-card:hover {
  transform: translateY(-4px);
  border-color: rgba(157, 46, 197, 0.2);
  box-shadow:
    0 24px 46px rgba(90, 61, 140, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.task-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.task-header h3 {
  margin: 0;
  font-size: 1.36rem;
  letter-spacing: -0.03em;
}

.task-card p {
  position: relative;
  z-index: 1;
  line-height: 1.72;
}

.task-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-completed {
  background: var(--pill-done);
  color: #0b7a3a;
}

.status-processing {
  background: var(--pill-pre);
  color: #3b5ccc;
}

.user-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.user-link:hover {
  text-decoration: underline;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(157, 46, 197, 0.12);
  background: rgba(157, 46, 197, 0.06);
  color: #786e8b;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}

.like-btn:hover {
  background: rgba(157, 46, 197, 0.1);
  border-color: rgba(157, 46, 197, 0.18);
}

.like-btn[disabled],
.like-btn[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.78;
}

.like-btn[data-liked="true"] {
  color: #d84761;
  background: rgba(216, 71, 97, 0.1);
  border-color: rgba(216, 71, 97, 0.18);
}

.like-btn[data-liked="true"] svg {
  fill: currentColor;
}

.like-count {
  font-size: 0.9rem;
  font-weight: 700;
}

.public-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

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

.public-btn-ghost {
  color: var(--brand);
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(157, 46, 197, 0.14);
}

.public-btn-ghost:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(157, 46, 197, 0.2);
}

.public-btn-sm {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 0.9rem;
}

.public-btn[disabled],
.public-btn[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  flex-wrap: wrap;
}

.pagination button {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(157, 46, 197, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.pagination button:hover,
.pagination button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  border-color: transparent;
  color: #fff;
}

.site-footer {
  background: transparent;
  padding: 0 20px 22px;
  text-align: center;
}

.site-footer .line {
  height: 1px;
  margin: 0 auto 16px;
  max-width: 1200px;
  background: linear-gradient(90deg, transparent, rgba(157, 46, 197, 0.18), transparent);
}

.site-footer p {
  margin: 0;
  color: #7c738d;
}

html[data-theme="dark"] body {
  background: #0d1524;
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 50% -4%, rgba(161, 96, 235, 0.12), transparent 16%),
    radial-gradient(circle at top left, rgba(161, 96, 235, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(69, 124, 255, 0.1), transparent 20%),
    radial-gradient(circle at 14% 22%, rgba(44, 68, 108, 0.16), transparent 18%),
    radial-gradient(circle at 86% 26%, rgba(161, 96, 235, 0.1), transparent 18%),
    radial-gradient(circle at 18% 64%, rgba(37, 60, 97, 0.14), transparent 20%),
    radial-gradient(circle at 84% 62%, rgba(161, 96, 235, 0.08), transparent 18%),
    radial-gradient(circle at 52% 92%, rgba(26, 42, 67, 0.16), transparent 24%),
    linear-gradient(180deg, #0b1220 0%, #0e1625 48%, #0d1524 100%);
}

html[data-theme="dark"] body::after {
  opacity: 0.28;
}

html[data-theme="dark"] #header .topbar {
  border-color: #304158;
  background: rgba(13, 20, 34, 0.78);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] #header .nav {
  border-color: rgba(161, 96, 235, 0.16);
  background: rgba(161, 96, 235, 0.08);
}

html[data-theme="dark"] #header .nav-link {
  color: #d1d8e4;
}

html[data-theme="dark"] #header .nav-link:hover {
  background: rgba(22, 32, 48, 0.92);
  border-color: rgba(161, 96, 235, 0.2);
  color: #f2e8ff;
}

html[data-theme="dark"] #header .nav-link.active {
  background: linear-gradient(180deg, rgba(27, 39, 59, 0.96), rgba(19, 28, 43, 0.96));
  border-color: rgba(161, 96, 235, 0.24);
}

html[data-theme="dark"] #header .header-btn-ghost,
html[data-theme="dark"] #header .notif-btn,
html[data-theme="dark"] #header .mobile-menu-btn {
  border-color: #304158;
  background: rgba(18, 28, 44, 0.78);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] #header .header-btn-ghost:hover,
html[data-theme="dark"] #header .notif-btn:hover,
html[data-theme="dark"] #header .mobile-menu-btn:hover {
  background: rgba(24, 36, 56, 0.94);
}

html[data-theme="dark"] #header .notif-menu,
html[data-theme="dark"] #header .menu {
  border-color: #304158;
  background: rgba(16, 24, 39, 0.94);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .page-head,
html[data-theme="dark"] .filters,
html[data-theme="dark"] .task-card,
html[data-theme="dark"] .dropdown-list,
html[data-theme="dark"] .pagination button {
  border-color: #304158;
  background: linear-gradient(180deg, rgba(20, 29, 46, 0.94), rgba(13, 20, 34, 0.88));
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .page-head::before {
  background:
    radial-gradient(circle at 14% 18%, rgba(30, 44, 68, 0.84), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(161, 96, 235, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(17, 25, 39, 0.16), transparent 40%);
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] .site-footer p {
  color: #a7b5c8;
}

html[data-theme="dark"] .feed-status {
  color: #a7b5c8;
}

html[data-theme="dark"] .feed-status[data-tone="loading"] {
  color: #d9c3ff;
}

html[data-theme="dark"] .feed-status[data-tone="error"] {
  color: #ffbcc9;
}

html[data-theme="dark"] .search,
html[data-theme="dark"] .dropdown-btn {
  background: rgba(17, 25, 39, 0.76);
  border-color: #304158;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .search input::placeholder {
  color: #95a4b8;
}

html[data-theme="dark"] .dropdown-btn:hover,
html[data-theme="dark"] .dropdown.open .dropdown-btn {
  background: rgba(24, 36, 56, 0.94);
  border-color: rgba(161, 96, 235, 0.22);
}

html[data-theme="dark"] .dropdown-list li:hover {
  background: rgba(161, 96, 235, 0.14);
}

html[data-theme="dark"] .status-completed {
  background: #13291d;
  color: #8de0aa;
}

html[data-theme="dark"] .status-processing {
  background: #18253c;
  color: #8db8f0;
}

html[data-theme="dark"] .user-link,
html[data-theme="dark"] .like-btn,
html[data-theme="dark"] .public-btn-ghost {
  color: #efdfff;
}

html[data-theme="dark"] .like-btn,
html[data-theme="dark"] .public-btn-ghost {
  background: rgba(161, 96, 235, 0.12);
  border-color: #304158;
}

html[data-theme="dark"] .like-btn:hover,
html[data-theme="dark"] .public-btn-ghost:hover {
  background: rgba(161, 96, 235, 0.18);
}

html[data-theme="dark"] .like-btn[data-liked="true"] {
  background: rgba(216, 71, 97, 0.16);
  border-color: rgba(216, 71, 97, 0.24);
}

html[data-theme="dark"] .site-footer .line {
  background: linear-gradient(90deg, transparent, rgba(161, 96, 235, 0.24), transparent);
}

@media (max-width: 900px) {
  header#header {
    padding: 14px 16px 22px;
  }

  #header .topbar {
    padding: 12px 14px;
  }

  #header .nav {
    top: calc(100% + 12px);
    left: 12px;
    right: 12px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 40px rgba(83, 56, 130, 0.14);
    backdrop-filter: blur(18px);
  }

  html[data-theme="dark"] #header .nav {
    border-color: #304158;
    background: rgba(16, 24, 39, 0.96);
  }

  .page-content {
    padding: 0 16px 64px;
  }

  .page-head {
    padding: 32px 24px;
  }

  .filters {
    grid-template-columns: 1fr;
    padding: 18px;
    border-radius: 22px;
  }
}

@media (max-width: 720px) {
  .page-head h1 {
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .task-card {
    padding: 20px 18px;
    border-radius: 22px;
  }

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

  .task-card > div:last-child {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .task-card > div:last-child > div {
    width: 100%;
  }

  .task-card > div:last-child > div:last-child {
    justify-content: stretch !important;
  }

  .public-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-card,
  .dropdown-btn,
  .public-btn,
  .like-btn {
    transition: none;
  }
}
