/* UniDAO — daos.fun layout clone */

@font-face {
  font-family: "Suisse Intl";
  src: url("assets/SuisseIntl-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Suisse Intl";
  src: url("assets/SuisseIntl-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-2: #000;
  --card: #111;
  --card-2: #161616;
  --border: #262626;
  --border-2: #2e2e2e;
  --text: #ededed;
  --muted: #888;
  --muted-2: #a0a0a0;
  --blue: #0090ff;
  --blue-hover: #0072f5;
  --green: #3dd68c;
  --red: #e5484d;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 56px;
  --ticker-h: 36px;
  --sidebar-w: 220px;
  --font: "Suisse Intl", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* TICKER */
.ticker {
  height: var(--ticker-h);
  background: #000;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: inline-flex;
  gap: 28px;
  animation: marquee 80s linear infinite;
  padding-left: 100%;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
}

.ticker-item img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.ticker-item .amt {
  color: var(--text);
  font-weight: 600;
}

.ticker-item .buy {
  color: var(--green);
}

.ticker-item .sell {
  color: var(--red);
}

.ticker-item .wallet {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-left,
.header-right,
.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.header-socials {
  display: flex;
  gap: 2px;
  margin-left: 4px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted-2);
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--card-2);
  color: var(--text);
}

.link-muted {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 6px;
}

.link-muted:hover {
  color: var(--text);
}

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  background: var(--card);
}

.search-btn span {
  font-size: 11px;
  opacity: 0.8;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 7px 14px;
  transition: background 0.15s, opacity 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--card-2);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}

.btn-outline:hover {
  border-color: var(--muted);
}

.btn-lg {
  padding: 10px 20px;
  font-size: 14px;
}

.btn.full {
  width: 100%;
}

/* SHELL */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--header-h) - var(--ticker-h));
}

/* SIDEBAR */
.sidebar {
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  position: sticky;
  top: calc(var(--header-h) + var(--ticker-h));
  height: calc(100vh - var(--header-h) - var(--ticker-h));
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-2);
  transition: background 0.15s, color 0.15s;
}

.side-link:hover {
  background: var(--card);
  color: var(--text);
}

.side-link.active {
  background: var(--card-2);
  color: var(--text);
}

.wallet-panel {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.wallet-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

/* MAIN */
.main {
  padding: 24px 28px 64px;
  max-width: 1180px;
  width: 100%;
}

/* HERO — large images like daos.fun */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 56px;
}

.hero-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  min-height: 320px;
}

.hero-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  min-height: 0;
}

.hero-card:hover {
  border-color: #3a3a3a;
  transform: translateY(-2px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #1a1a1a;
  max-height: none;
}

.hero-card-body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-card-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.3;
}

.hero-card-title .live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  margin-left: 4px;
}

.hero-card-title .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.2);
}

.hero-card-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.hero-card-mcap {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.hero-card-mcap .pct {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
  margin-left: 0;
}

@media (max-width: 1100px) {
  .hero-carousel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
  }

  .hero-card img {
    aspect-ratio: 1;
    height: 140px;
    width: 140px;
  }
}

.pct.up {
  color: var(--green);
}

.pct.down {
  color: var(--red);
}

.hero-copy h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero-sub {
  color: var(--muted-2);
  font-weight: 600;
}

.hero-desc {
  color: var(--muted);
  font-size: 15px;
  max-width: 36ch;
  margin-bottom: 18px;
}

.participants {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.participants-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

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

.pfp-stack {
  display: flex;
}

.pfp-stack img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  object-fit: cover;
  margin-left: -8px;
  background: #333;
}

.pfp-stack img:first-child {
  margin-left: 0;
}

.participants-num {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.minimize-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

/* SECTIONS */
.section {
  margin-bottom: 48px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

/* FEATURED GRID */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.dao-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.dao-card:hover {
  border-color: #3a3a3a;
  transform: translateY(-1px);
}

.dao-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #1a1a1a;
  max-height: 200px;
}

.dao-card-body {
  padding: 14px;
}

.dao-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dao-card-creator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.dao-card-creator img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.dao-card-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.dao-card-stats .mcap {
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.dao-card-stats .delta {
  font-size: 12px;
  font-weight: 600;
}

.dao-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* TABS */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--text);
  border-bottom-color: var(--blue);
}

.tabs-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 144, 255, 0.12);
  color: var(--blue);
}

.pill.muted {
  background: var(--card-2);
  color: var(--muted);
}

/* AGENT LIST */
.agent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.15s;
}

.agent-card:hover {
  border-color: #3a3a3a;
}

.agent-card img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #222;
}

.agent-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.agent-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blue);
  background: rgba(0, 144, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.agent-name {
  font-weight: 700;
  font-size: 14px;
}

.agent-tag {
  font-size: 12px;
  color: var(--muted);
}

.agent-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.agent-creator {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.agent-stats {
  text-align: right;
  white-space: nowrap;
}

.agent-holders {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.agent-mcap {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* HOW */
.how-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.how-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px;
}

.how-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 144, 255, 0.12);
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}

.how-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.how-card p {
  font-size: 13px;
  color: var(--muted);
}

/* PLAYBOOK */
.playbook-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.playbook-links a {
  font-size: 13px;
  color: var(--blue);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--card);
}

.playbook-links a:hover {
  border-color: var(--blue);
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 28px 40px;
  background: #000;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-bottom: 20px;
}

.footer-tagline {
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-socials a {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
}

.footer-socials a:hover {
  color: var(--text);
  border-color: var(--muted);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--text);
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 16px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(100%, 380px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

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

.modal-head h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.modal .btn {
  margin-bottom: 8px;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 110;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast[hidden] {
  display: none;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: calc(var(--header-h) + var(--ticker-h));
    z-index: 30;
    width: min(280px, 85vw);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
  }

  .sidebar.open {
    transform: translateX(0);
  }

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

  .hero-carousel {
    order: -1;
  }

  .header-center {
    display: none;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 16px 14px 48px;
  }

  .agent-card {
    grid-template-columns: 48px 1fr;
  }

  .agent-stats {
    grid-column: 2;
    text-align: left;
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .header-right .btn-ghost {
    display: none;
  }

  .participants-num {
    font-size: 22px;
  }
}

.sidebar-toggle {
  display: none;
}

@media (max-width: 960px) {
  .sidebar-toggle {
    display: grid;
  }
}
