@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #04060F;
  --surface: #080D1A;
  --border: rgba(255, 255, 255, 0.07);
  --ap: #00E5FF;
  --ip: #FF6B35;
  --gold: #FFD166;
  --green: #06D6A0;
  --purple: #9B5DE5;
  --text: #E8EAF0;
  --muted: #6B7280;
  --x-color: #E8451A;
  --y-color: #FF8C00;
  --z-color: #1E90FF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Be Vietnam Pro', sans-serif;
  min-height: 100vh;
  padding: 48px 32px;
  position: relative;
  overflow-x: hidden;
  font-size: 15px;
}

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── HEADER ── */
header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.7s ease both;
}

.logo {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 60px;
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 30%, var(--ap) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.logo span {
  -webkit-text-fill-color: var(--ap);
}

.subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  /* color: var(--muted); */
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 6px;
}

.badge-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.badge {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge-ap {
  background: rgba(0, 229, 255, 0.12);
  color: var(--ap);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.badge-ip {
  background: rgba(255, 107, 53, 0.12);
  color: var(--ip);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

/* ── USER PROFILE ── */
.user-profile {
  position: absolute;
  top: -30px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 3px solid rgba(0, 229, 255, 0.3);
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
  animation: profilePulse 3s infinite ease-in-out;
  z-index: 100;
}

@keyframes profilePulse {
  0% {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
  }

  50% {
    border-color: rgba(0, 229, 255, 0.6);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.2);
  }

  100% {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
  }
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--ap);
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.3);
  transform: translateY(-4px) scale(1.02);
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ap);
  transition: all 0.3s;
  background: var(--surface);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-name {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.view-x {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ap);
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

.user-profile:hover .view-x {
  opacity: 1;
  letter-spacing: 1.5px;
}

/* ── SUBMIT NOTICE ── */
.submit-notice {
  background: rgba(255, 107, 53, 0.1);
  border: 2px solid rgba(255, 107, 53, 0.4);
  border-radius: 12px;
  padding: 18px 28px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  animation: noticePulse 3s infinite ease-in-out;
  position: relative;
  overflow: hidden;
}

@keyframes noticePulse {
  0% { box-shadow: 0 0 15px rgba(255, 107, 53, 0.1); border-color: rgba(255, 107, 53, 0.4); }
  50% { box-shadow: 0 0 25px rgba(255, 107, 53, 0.2); border-color: rgba(255, 107, 53, 0.7); }
  100% { box-shadow: 0 0 15px rgba(255, 107, 53, 0.1); border-color: rgba(255, 107, 53, 0.4); }
}

.submit-notice::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--ip);
}

.submit-notice .notice-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 12px var(--ip));
}

.submit-notice .notice-text {
  font-size: 15px;
  color: #fff;
  line-height: 1.6;
  font-weight: 500;
}

.submit-notice .notice-link {
  color: var(--ip);
  text-decoration: none;
  font-weight: 800;
  border-bottom: 2px solid var(--ip);
  transition: all 0.3s;
  padding: 0 4px;
  margin-left: 4px;
}

.submit-notice .notice-link:hover {
  background: rgba(255, 107, 53, 0.1);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

/* ── LEGEND ── */
.legend {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  animation: fadeUp 0.7s 0.1s ease both;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── SECTION TITLE ── */
.section-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  /* color: var(--muted); */
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* .section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  } */

/* ── CATEGORIES GRID ── */
.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: default;
}

.cat-card:hover {
  transform: translateY(-6px) scale(1.02);
}

.cat-card.onboarding:hover {
  border-color: rgba(6, 214, 160, 2);
  box-shadow: 0 20px 50px rgba(6, 214, 160, 0.2);
}

.cat-card.activity:hover {
  border-color: rgba(0, 229, 255, 2);
  box-shadow: 0 20px 50px rgba(0, 229, 255, 0.2);
}

.cat-card.referral:hover {
  border-color: rgba(155, 93, 229, 2);
  box-shadow: 0 20px 50px rgba(155, 93, 229, 0.2);
}

.cat-card.content:hover {
  border-color: rgba(255, 107, 53, 2);
  box-shadow: 0 20px 50px rgba(255, 107, 53, 0.2);
}

.cat-card.support:hover {
  border-color: rgba(255, 209, 102, 2);
  box-shadow: 0 20px 50px rgba(255, 209, 102, 0.2);
}

.cat-card.feedback:hover {
  border-color: rgba(224, 64, 251, 2);
  box-shadow: 0 20px 50px rgba(224, 64, 251, 0.2);
}

.cat-card.bonus:hover {
  border-color: rgba(30, 144, 255, 0.6);
  box-shadow: 0 20px 50px rgba(30, 144, 255, 0.18);
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.cat-card.onboarding::before {
  background: linear-gradient(90deg, var(--green), transparent);
}

.cat-card.activity::before {
  background: linear-gradient(90deg, var(--ap), transparent);
}

.cat-card.referral::before {
  background: linear-gradient(90deg, var(--purple), transparent);
}

.cat-card.content::before {
  background: linear-gradient(90deg, var(--ip), transparent);
}

.cat-card.support::before {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.cat-card.feedback::before {
  background: linear-gradient(90deg, #E040FB, transparent);
}

.cat-card.bonus::before {
  background: linear-gradient(90deg, var(--z-color), transparent);
}

.cat-icon {
  font-size: 20px;
  margin-bottom: 10px;
}

.cat-name {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #fff;
}

.task-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.task-row:last-child {
  border-bottom: none;
}

.task-name {
  font-size: 13.5px;
  color: #bbb;
  flex: 1;
  line-height: 1.45;
}

.task-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.pts {
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  font-weight: 700;
}

.pts.ap {
  color: var(--ap);
}

.pts.ip {
  color: var(--ip);
}

.type-tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.type-tag.ap {
  background: rgba(0, 229, 255, 0.1);
  color: var(--ap);
}

.type-tag.ip {
  background: rgba(255, 107, 53, 0.1);
  color: var(--ip);
}

.limit-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-style: italic;
}

/* ── FORMULA BAR ── */
.formula-bar {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(255, 107, 53, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.3s ease both;
  flex-wrap: wrap;
}

.formula-label {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
}

.formula-eq {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.formula-eq .f-ap {
  color: var(--ap);
}

.formula-eq .f-ip {
  color: var(--ip);
}

.formula-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid var(--ip);
  padding-left: 12px;
}

/* ── ROLE TABLE ── */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
  animation: fadeUp 0.6s 0.4s ease both;
}

.role-card {
  border-radius: 14px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.3s ease;
  cursor: default;
}

.role-card:hover {
  transform: translateY(-6px) scale(1.02);
}

.role-card.x:hover {
  border-color: rgba(79, 195, 247, 0.55);
  box-shadow: 0 20px 50px rgba(79, 195, 247, 0.15);
}

.role-card.y:hover {
  border-color: rgba(171, 71, 188, 0.55);
  box-shadow: 0 20px 50px rgba(171, 71, 188, 0.15);
}

.role-card.z:hover {
  border-color: rgba(255, 209, 102, 0.6);
  box-shadow: 0 20px 50px rgba(255, 209, 102, 0.18);
}

.role-card.x {
  background: linear-gradient(145deg, rgba(79, 195, 247, 0.08), transparent);
  border-color: rgba(79, 195, 247, 0.25);
}

.role-card.y {
  background: linear-gradient(145deg, rgba(171, 71, 188, 0.1), transparent);
  border-color: rgba(171, 71, 188, 0.3);
}

.role-card.z {
  background: linear-gradient(145deg, rgba(255, 209, 102, 0.1), transparent);
  border-color: rgba(255, 209, 102, 0.35);
}

.role-card.z::after {
  content: '★';
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--z-color);
  font-size: 16px;
  opacity: 0.6;
}

.role-axis {
  font-family: 'Syne', sans-serif;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1;
}

.role-card.x .role-axis {
  color: var(--x-color);
}

.role-card.y .role-axis {
  color: var(--y-color);
}

.role-card.z .role-axis {
  color: var(--z-color);
}

.role-name {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.role-reqs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.req-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.req-icon {
  font-size: 14px;
}

.req-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 15px;
}

.role-card.x .req-val {
  color: var(--x-color);
}

.role-card.y .req-val {
  color: var(--y-color);
}

.role-card.z .req-val {
  color: var(--z-color);
}

.req-label {
  color: var(--muted);
  font-size: 12px;
}

.role-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ── TABS ── */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  animation: fadeUp 0.7s 0.15s ease both;
}

.tab-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.tab-btn.active {
  background: rgba(0, 229, 255, 0.1);
  color: var(--ap);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease both;
}

.tab-content.active {
  display: block;
}

/* ── ANIMATION ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cat-card:nth-child(1) {
  animation-delay: 0.1s;
}

.cat-card:nth-child(2) {
  animation-delay: 0.15s;
}

.cat-card:nth-child(3) {
  animation-delay: 0.2s;
}

.cat-card:nth-child(4) {
  animation-delay: 0.25s;
}

.cat-card:nth-child(5) {
  animation-delay: 0.3s;
}

.cat-card:nth-child(6) {
  animation-delay: 0.35s;
}

.cat-card:nth-child(7) {
  animation-delay: 0.4s;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  /* color: var(--muted); */
  letter-spacing: 2px;
  /* text-transform: uppercase; */
  animation: fadeUp 0.6s 0.6s ease both;
}

/* ── NEGATIVE NOTE ── */
.neg {
  color: #FF5252;
}

@media (max-width: 800px) {
  .categories {
    grid-template-columns: 1fr 1fr;
  }

  .roles-grid {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .logo {
    font-size: 42px;
  }
}

@media (max-width: 500px) {
  .categories {
    grid-template-columns: 1fr;
  }

  body {
    padding: 28px 16px;
  }
}

/* ── TASK GRID (MỚI) ── */
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* ── SEARCH BAR ── */
.search-bar-wrapper {
  position: relative;
  max-width: 500px;
  margin: 0 auto 32px;
  animation: fadeUp 0.7s 0.2s ease both;
}

#task-search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #fff;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
}

#task-search-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--ap);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  pointer-events: none;
}

.task-card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.task-card-img-wrapper {
  overflow: hidden;
  width: 100%;
  height: 160px;
  flex-shrink: 0;
}

.task-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  transition: transform 0.4s ease;
}

.task-card-item:hover .task-card-img {
  transform: scale(1.05);
}

.task-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  z-index: 1;
  background: var(--surface);
}

.task-card-item:hover {
  transform: translateY(-5px);
  border-color: var(--ap);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.1);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 6, 15, 0.85);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 500px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #fff;
}

.action-btn {
  background: rgba(0, 229, 255, 0.1);
  color: var(--ap);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  margin-top: 24px;
}

.action-btn:hover {
  background: rgba(0, 229, 255, 0.2);
}

.reward-box {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
}