:root {
  --orange: #ff8a00;
  --pink: #ff0080;
  --purple: #8000ff;
  --cyan: #00ffff;
  --gradient: linear-gradient(135deg, var(--orange) 0%, var(--pink) 30%, var(--purple) 70%, var(--cyan) 100%);
  --bg: #070910;
  --card: rgba(15, 12, 24, 0.86);
  --stroke: rgba(255, 138, 0, 0.34);
  --text: #f8f5ff;
  --muted: #cfbfdd;
  --ok: #22c55e;
  --warn: #f59e0b;
  --done: #14b8a6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 138, 0, 0.16), transparent 35%),
    radial-gradient(circle at 88% 0%, rgba(255, 0, 128, 0.14), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(128, 0, 255, 0.18), transparent 45%),
    var(--bg);
}

h1,
h2,
h3,
.eyebrow,
.brand-text,
.btn {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.17;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.7px, transparent 0.7px);
  background-size: 2px 2px;
}

.bg-logo {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, 82vw);
  max-width: 92vw;
  opacity: 0.09;
  pointer-events: none;
  z-index: -3;
  filter: drop-shadow(0 18px 60px rgba(255, 0, 128, 0.22));
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  filter: blur(36px);
  opacity: 0.34;
}

.blob-a {
  width: 40vw;
  height: 40vw;
  left: -12vw;
  top: 8vh;
  background: conic-gradient(from 0deg, var(--orange), transparent, var(--pink));
  animation: driftA 17s ease-in-out infinite;
}

.blob-b {
  width: 34vw;
  height: 34vw;
  right: -8vw;
  top: 2vh;
  background: conic-gradient(from 90deg, var(--cyan), transparent, var(--purple));
  animation: driftB 20s ease-in-out infinite;
}

.blob-c {
  width: 38vw;
  height: 38vw;
  left: 24vw;
  bottom: -22vh;
  background: conic-gradient(from 180deg, var(--pink), transparent, var(--orange));
  animation: driftC 22s ease-in-out infinite;
}

.beam {
  position: absolute;
  left: -20vw;
  top: 26vh;
  width: 140vw;
  height: 140px;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 128, 0.3), transparent);
  animation: sweep 11s linear infinite;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(7, 9, 16, 0.78);
  border-bottom: 1px solid rgba(255, 138, 0, 0.25);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-status-group {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.notice-banner {
  border: 1px solid rgba(0, 255, 255, 0.55);
  background: rgba(6, 28, 38, 0.72);
  color: #bff8ff;
  border-radius: 6px;
  padding: 0.38rem 0.62rem;
  font-size: 0.79rem;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.notice-banner:hover {
  border-color: rgba(255, 138, 0, 0.85);
  color: #ffe8d2;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.home-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
}

.home-menu-toggle:hover {
  background: rgba(255, 138, 0, 0.1);
}

.home-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

body.home-menu-open .home-menu-toggle span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

body.home-menu-open .home-menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.home-menu-open .home-menu-toggle span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

.home-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 58;
}

.home-side-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  z-index: 60;
  transform: translateX(-110%);
  transition: transform 0.22s ease;
  border: 1px solid var(--stroke);
  border-radius: 0;
  background: rgba(15, 12, 24, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  overflow-y: auto;
}

.home-side-menu h3 {
  margin: 0;
}

.home-side-menu p {
  margin: 0.25rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.home-side-menu-actions {
  display: grid;
  gap: 0.5rem;
}

.home-side-link {
  text-decoration: none;
  display: inline-block;
  text-align: left;
}

body.home-menu-open .home-side-menu {
  transform: translateX(0);
}

body.home-menu-open .home-menu-backdrop {
  display: block;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-text {
  font-size: 1.08rem;
  font-weight: 700;
}

.user-chip {
  border: 1px solid rgba(255, 0, 128, 0.45);
  background: rgba(22, 10, 26, 0.75);
  color: #ffd9ef;
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
}

.hero {
  padding: 2.4rem 0 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.hero-copy,
.hero-panel,
.program-card {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 138, 0, 0.14), rgba(255, 0, 128, 0.1) 40%, rgba(128, 0, 255, 0.12) 80%),
    var(--card);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
}

.hero-copy,
.hero-panel {
  padding: 1.2rem;
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.75rem;
}

h1 {
  margin: 0.4rem 0 0.9rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

h2 {
  margin: 0;
}

.lead {
  color: var(--muted);
  margin: 0;
}

.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-signals span {
  border: 1px solid rgba(255, 138, 0, 0.45);
  background: rgba(30, 10, 22, 0.76);
  color: #ffe4f4;
  border-radius: 5px;
  padding: 0.3rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.72rem;
}

.hero-meta {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.hero-meta div {
  border: 1px solid rgba(255, 138, 0, 0.34);
  border-radius: 6px;
  background: rgba(19, 10, 15, 0.6);
  padding: 0.68rem;
}

.meta-number {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffd5a8;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.programs,
.impact {
  padding: 1.3rem 0;
}

.admin-activity {
  padding: 0 0 1.3rem;
}

.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.member-layout .programs .board-grid {
  grid-template-columns: 1fr;
}

.board-grid.triple {
  grid-template-columns: 1fr 1.35fr 1fr;
}

.featured-open {
  border-color: rgba(0, 255, 255, 0.46);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 255, 255, 0.22);
}

.featured-open .panel-head h3 {
  color: #beffff;
}

.board-panel {
  padding: 1rem;
}

.panel-head h3 {
  margin: 0;
}

.panel-head p {
  margin: 0.2rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.task-form {
  display: grid;
  gap: 0.65rem;
}

.admin-user-panel {
  display: none;
}

.admin-last-seen-list {
  max-height: 340px;
}

.admin-last-row {
  border: 1px solid rgba(255, 138, 0, 0.35);
  border-radius: 6px;
  background: rgba(18, 9, 19, 0.72);
  padding: 0.55rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.admin-last-row strong {
  color: #ffd5a8;
  font-size: 0.88rem;
}

.admin-last-row span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.task-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.task-form .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.task-form .checkbox-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  padding: 0;
  border-radius: 4px;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea,
select {
  border: 1px solid rgba(255, 138, 0, 0.45);
  border-radius: 6px;
  background: rgba(14, 9, 20, 0.72);
  color: var(--text);
  padding: 0.65rem 0.7rem;
}

textarea {
  resize: vertical;
}

select option {
  background: rgba(14, 9, 20, 0.72);
  color: var(--text);
}

.btn {
  border: 0;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-solid {
  background: var(--gradient);
  color: #18151b;
}

.btn-ghost {
  border: 1px solid rgba(255, 138, 0, 0.45);
  border-radius: 6px;
  background: rgba(26, 11, 20, 0.84);
  color: #ffe8d2;
}

.btn-logout {
  border-color: rgba(255, 99, 132, 0.7);
  background: rgba(55, 10, 24, 0.9);
  color: #ffd7e1;
}

.btn-logout:hover {
  border-color: rgba(255, 138, 0, 0.85);
  background: rgba(78, 16, 32, 0.96);
}

.logout-btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.task-list {
  display: grid;
  gap: 0.62rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.task-item {
  border: 1px solid rgba(255, 138, 0, 0.35);
  border-radius: 6px;
  padding: 0.75rem 0.75rem 0.75rem 0.95rem;
  background: rgba(20, 11, 22, 0.72);
  width: 100%;
  position: relative;
}

.task-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 6px 0 0 6px;
  background: rgba(255, 138, 0, 0.5);
}

.task-item h4 {
  margin: 0;
  font-size: 0.97rem;
}

.task-item p {
  margin: 0.3rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.review-note {
  margin: 0.35rem 0 0;
  color: #ffd1df;
  font-size: 0.84rem;
  border-left: 3px solid rgba(255, 0, 128, 0.6);
  padding-left: 0.5rem;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: #f6d2ea;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.task-actions button {
  border: 1px solid rgba(255, 138, 0, 0.45);
  border-radius: 5px;
  padding: 0.34rem 0.55rem;
  background: rgba(26, 11, 20, 0.84);
  color: #ffe8d2;
  cursor: pointer;
  font-size: 0.82rem;
}

.task-actions button:hover {
  border-color: rgba(0, 255, 255, 0.5);
}

.status-open {
  color: var(--ok);
}

.task-item.status-open::before {
  background: var(--ok);
}

.status-taken {
  color: var(--warn);
}

.task-item.status-taken::before {
  background: var(--warn);
}

.status-pending_review {
  color: #f97316;
}

.task-item.status-pending_review::before {
  background: #f97316;
}

.status-changes_requested {
  color: #fb7185;
}

.task-item.status-changes_requested::before {
  background: #fb7185;
}

.status-done {
  color: var(--done);
}

.task-item.status-done::before {
  background: var(--done);
}

.difficulty-easy {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.difficulty-medium {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.difficulty-hard {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.leaderboard {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.leaderboard li {
  border: 1px solid rgba(255, 138, 0, 0.33);
  border-radius: 6px;
  background: rgba(18, 9, 19, 0.72);
  padding: 0.58rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deadline-box {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(255, 138, 0, 0.35);
}

.deadline-box h4 {
  margin: 0 0 0.5rem;
  color: #ffd8ac;
}

.deadline-list {
  display: grid;
  gap: 0.45rem;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(3, 3, 8, 0.8);
  backdrop-filter: blur(6px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: min(460px, calc(100% - 1.4rem));
  border: 1px solid rgba(255, 138, 0, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 138, 0, 0.14), rgba(255, 0, 128, 0.1) 40%, rgba(128, 0, 255, 0.12) 80%),
    rgba(15, 10, 20, 0.96);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
  padding: 1.2rem;
  display: grid;
  gap: 0.66rem;
}

.login-logo {
  width: 210px;
  max-width: 100%;
}

.login-card h2 {
  margin: 0.4rem 0 0;
}

.login-card p {
  color: var(--muted);
  margin: 0;
}

.login-card label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.84rem;
}

#edit-task-overlay .login-card {
  width: min(640px, calc(100% - 1.4rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.login-error {
  color: #fecdd3;
  min-height: 1.2em;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  border: 1px solid rgba(255, 138, 0, 0.4);
  border-radius: 6px;
  background: rgba(16, 10, 20, 0.95);
  color: #ffe8d2;
  padding: 0.7rem 0.8rem;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.24s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes driftA {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(5vw, -4vh, 0); }
}

@keyframes driftB {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-4vw, 4vh, 0); }
}

@keyframes driftC {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(3vw, -3vh, 0); }
}

@keyframes sweep {
  0% { transform: translateX(-24vw) rotate(-4deg); }
  100% { transform: translateX(18vw) rotate(-4deg); }
}

@media (max-width: 1024px) {
  .hero-grid,
  .board-grid,
  .board-grid.triple {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(1200px, calc(100% - 1rem));
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 0.95rem;
  }

  .notice-banner {
    max-width: 180px;
    font-size: 0.74rem;
    padding: 0.32rem 0.5rem;
  }

  .user-chip {
    font-size: 0.78rem;
  }

  .home-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .top-actions .logout-btn,
  .top-actions #notify-btn {
    display: none !important;
  }
}
