/* HoodX.fun premium layout pass.
 * Keeps the original Manus application and state model intact; this file only
 * strengthens hierarchy, spacing, surfaces and responsive composition.
 */

:root {
  --hood-green: #d0f706;
  --hood-lime: #b8dc00;
  --hood-green-ink: #718600;
  --primary: #d0f706;
  --primary-foreground: #101612;
  --ring: #d0f706;
  --chart-1: #d0f706;
  --chart-2: #9fbe00;
  --background: #f5f7f5;
  --foreground: #101612;
  --card: #ffffff;
  --card-foreground: #101612;
  --popover: #ffffff;
  --popover-foreground: #101612;
  --secondary: #eef3ef;
  --muted: #eef3ef;
  --muted-foreground: #647068;
  --accent: #eaf6ec;
  --border: rgba(13, 35, 21, 0.095);
  --input: rgba(13, 35, 21, 0.14);
  --surface-2: #edf3ee;
}

html {
  background: #f5f7f5;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(208, 247, 6, 0.07), transparent 28rem),
    linear-gradient(180deg, #f8faf8 0%, #f3f6f3 100%);
}

.text-hood-green {
  color: var(--hood-green-ink) !important;
}

.bg-hood-green {
  background-color: var(--hood-green) !important;
}

main > div:has(> #markets) > section:first-of-type h1 .text-hood-green {
  color: var(--hood-green) !important;
  text-shadow: 0 2px 0 rgba(76, 91, 0, 0.12);
}

img[src*="/manus-storage/"] {
  filter: hue-rotate(-52deg) saturate(1.22) brightness(1.07);
}

svg [stroke="#00c805"],
svg [stroke="#00C805"] {
  stroke: var(--hood-green) !important;
}

svg [fill="#00c805"],
svg [fill="#00C805"] {
  fill: var(--hood-green) !important;
}

.container {
  max-width: 1180px !important;
  padding-left: 28px !important;
  padding-right: 28px !important;
}

/* Global frame */
.min-h-screen > .border-b.bg-sidebar {
  background: #0b120d !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.72);
}

.min-h-screen > .border-b.bg-sidebar .text-muted-foreground {
  color: rgba(255, 255, 255, 0.55) !important;
}

.min-h-screen > .border-b.bg-sidebar .text-hood-amber {
  color: #c9d6cc !important;
}

header.sticky {
  top: 27px !important;
  border-bottom: 0 !important;
  background: rgba(250, 252, 250, 0.88) !important;
  box-shadow: 0 1px 0 rgba(13, 35, 21, 0.08), 0 12px 36px rgba(24, 48, 31, 0.055);
  backdrop-filter: blur(18px) saturate(1.2) !important;
}

header.sticky > .container {
  height: 66px !important;
}

header nav {
  padding: 4px;
  border: 1px solid rgba(13, 35, 21, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

header nav a {
  min-width: 74px;
  border-radius: 999px !important;
  text-align: center;
}

header img[alt="HoodX"] {
  filter: hue-rotate(-52deg) saturate(1.22) brightness(1.07) drop-shadow(0 7px 14px rgba(208, 247, 6, 0.22));
}

/* Home status strip */
main > div:has(> #markets) > div:first-child {
  width: min(calc(100% - 48px), 1180px);
  margin: 22px auto 0;
  border: 1px solid rgba(13, 35, 21, 0.08) !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 8px 26px rgba(24, 48, 31, 0.045);
  overflow: hidden;
}

main > div:has(> #markets) > div:first-child .container {
  width: auto !important;
  min-height: 34px;
  padding: 7px 16px !important;
}

/* Hero as a flagship product surface */
main > div:has(> #markets) > section:first-of-type {
  width: min(calc(100% - 48px), 1180px);
  min-height: 432px;
  margin: 12px auto 0;
  border: 1px solid rgba(13, 35, 21, 0.09) !important;
  border-radius: 30px;
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 28px 70px rgba(28, 54, 36, 0.095);
  isolation: isolate;
}

main > div:has(> #markets) > section:first-of-type::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.995) 0%, rgba(255, 255, 255, 0.96) 43%, rgba(255, 255, 255, 0.06) 75%),
    linear-gradient(180deg, transparent 70%, rgba(208, 247, 6, 0.055));
}

main > div:has(> #markets) > section:first-of-type > .absolute.inset-0.bg-cover {
  filter: hue-rotate(-52deg) saturate(1.22) brightness(1.07);
}

main > div:has(> #markets) > section:first-of-type > .absolute.inset-0.bg-gradient-to-r {
  display: none;
}

main > div:has(> #markets) > section:first-of-type > .relative.container {
  min-height: 432px;
  padding: 68px 58px !important;
  align-items: flex-end;
  z-index: 1;
}

main > div:has(> #markets) > section:first-of-type h1 {
  max-width: 670px;
  font-size: clamp(3.1rem, 5.5vw, 4.75rem) !important;
  line-height: 0.96 !important;
  letter-spacing: -0.055em !important;
  text-wrap: balance;
}

main > div:has(> #markets) > section:first-of-type p {
  margin-top: 22px !important;
  font-size: 1rem !important;
  line-height: 1.75;
  color: #566159 !important;
}

main > div:has(> #markets) > section:first-of-type a[href="#markets"],
main > div:has(> #markets) > section:first-of-type a[href="/mint"] {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px !important;
  letter-spacing: 0.08em;
}

main > div:has(> #markets) > section:first-of-type a[href="#markets"] {
  box-shadow: 0 14px 30px rgba(159, 190, 0, 0.28) !important;
}

/* Market workspace */
#markets {
  width: min(calc(100% - 48px), 1180px);
  margin: 24px auto 0;
  border: 0 !important;
  border-radius: 28px;
  background: transparent !important;
}

#markets > .container {
  padding: 0 !important;
}

#markets .container > .flex.flex-col.lg\:flex-row > aside {
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(28, 54, 36, 0.07);
}

#markets .container > .flex.flex-col.lg\:flex-row > .flex-1 {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(28, 54, 36, 0.07);
}

#markets input[placeholder="Search tokens..."] {
  height: 42px !important;
  border-radius: 12px !important;
  background: #f7f9f7 !important;
  box-shadow: none !important;
}

#markets button,
#markets [role="combobox"] {
  border-radius: 10px;
}

#markets .grid:has(> a[href="/token/hood2x"]) {
  grid-template-columns: minmax(0, 1fr) !important;
}

#markets a[href="/token/hood2x"] {
  min-height: 230px;
  padding: 28px 30px !important;
  border-color: rgba(208, 247, 6, 0.38) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 95% 4%, rgba(208, 247, 6, 0.18), transparent 18rem),
    linear-gradient(145deg, #ffffff 0%, #fbfefb 100%) !important;
  box-shadow: 0 20px 50px rgba(28, 54, 36, 0.08);
}

#markets a[href="/token/hood2x"] img {
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
}

#markets a[href="/token/hood2x"] .grid.grid-cols-4 {
  margin-top: 30px !important;
  padding-top: 22px !important;
}

#markets a[href="/token/hood2x"]:hover {
  transform: translateY(-3px);
  border-color: rgba(208, 247, 6, 0.7) !important;
  box-shadow: 0 26px 62px rgba(20, 72, 35, 0.13);
}

/* Mechanism section gets a dark, institutional stage */
#markets + section {
  width: min(calc(100% - 48px), 1180px);
  margin: 28px auto 72px;
  border: 0 !important;
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 0%, rgba(208, 247, 6, 0.16), transparent 28rem),
    linear-gradient(145deg, #09110c 0%, #111a14 100%) !important;
  box-shadow: 0 32px 75px rgba(8, 22, 12, 0.18);
  overflow: hidden;
}

#markets + section > .container {
  padding: 58px 54px !important;
}

#markets + section h2 {
  color: #f7faf8;
  letter-spacing: -0.035em;
}

#markets + section .h-px {
  background: rgba(255, 255, 255, 0.12) !important;
}

#markets + section .hood-card {
  min-height: 290px;
  padding: 34px !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.2);
}

#markets + section .grid.md\:grid-cols-4 {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

#markets + section .grid.md\:grid-cols-4 span,
#markets + section .grid.md\:grid-cols-4 p {
  color: rgba(255, 255, 255, 0.62) !important;
}

/* Inner application pages */
main > .hood-aurora,
main > div.hood-aurora {
  background: transparent !important;
}

main > .hood-aurora > .container,
main > div.hood-aurora > .container {
  padding-top: 54px !important;
  padding-bottom: 54px !important;
}

main > .hood-aurora .bg-card,
main > div.hood-aurora .bg-card,
main > .hood-aurora .hood-panel-glow,
main > div.hood-aurora .hood-panel-glow {
  border-color: var(--border) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 45px rgba(28, 54, 36, 0.07);
}

main > .hood-aurora h1,
main > div.hood-aurora h1 {
  letter-spacing: -0.04em !important;
}

.hood-aurora .container.max-w-3xl.relative > img.absolute {
  right: 18px !important;
  width: 170px !important;
  opacity: 0.18 !important;
}

/* Docs */
main article {
  padding: 34px 38px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(28, 54, 36, 0.07);
}

main article h2 {
  letter-spacing: -0.035em;
}

/* Footer anchors the otherwise light product */
footer {
  margin-top: 0 !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  background:
    radial-gradient(circle at 80% 0%, rgba(208, 247, 6, 0.11), transparent 24rem),
    #09110c !important;
  color: #f2f7f3;
}

footer .text-muted-foreground {
  color: rgba(238, 246, 240, 0.56) !important;
}

footer .border-border,
footer.border-border {
  border-color: rgba(255, 255, 255, 0.09) !important;
}

footer img {
  filter: hue-rotate(-52deg) saturate(1.22) brightness(1.07) drop-shadow(0 6px 18px rgba(208, 247, 6, 0.26));
}

footer a:hover {
  color: #d0f706 !important;
}

/* Polished focus and selection states */
::selection {
  background: rgba(208, 247, 6, 0.34);
  color: #07110b;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[role="combobox"]:focus-visible {
  outline: 3px solid rgba(208, 247, 6, 0.38) !important;
  outline-offset: 2px;
}

@media (max-width: 1023px) {
  .container {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  #markets .container > .flex.flex-col.lg\:flex-row > .flex-1 {
    padding: 20px;
  }

  main article {
    padding: 28px;
  }
}

@media (max-width: 767px) {
  .container {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  header.sticky {
    top: 27px !important;
  }

  header.sticky > .container {
    height: 60px !important;
  }

  main > div:has(> #markets) > div:first-child,
  main > div:has(> #markets) > section:first-of-type,
  #markets,
  #markets + section {
    width: calc(100% - 24px);
  }

  main > div:has(> #markets) > div:first-child {
    margin-top: 14px;
    border-radius: 14px;
  }

  main > div:has(> #markets) > section:first-of-type {
    min-height: 520px;
    border-radius: 22px;
  }

  main > div:has(> #markets) > section:first-of-type::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.94) 60%, rgba(255, 255, 255, 0.36) 100%);
  }

  main > div:has(> #markets) > section:first-of-type > .relative.container {
    min-height: 520px;
    padding: 42px 28px 34px !important;
    justify-content: space-between;
  }

  main > div:has(> #markets) > section:first-of-type h1 {
    font-size: clamp(2.7rem, 13vw, 3.5rem) !important;
    line-height: 0.98 !important;
  }

  main > div:has(> #markets) > section:first-of-type .flex.gap-3 {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  main > div:has(> #markets) > section:first-of-type a[href="#markets"],
  main > div:has(> #markets) > section:first-of-type a[href="/mint"] {
    width: 100%;
  }

  #markets {
    margin-top: 16px;
  }

  #markets .container > .flex.flex-col.lg\:flex-row > .flex-1 {
    padding: 16px;
    border-radius: 18px;
  }

  #markets a[href="/token/hood2x"] {
    min-height: 250px;
    padding: 22px !important;
  }

  #markets + section {
    margin-top: 20px;
    margin-bottom: 40px;
    border-radius: 22px;
  }

  #markets + section > .container {
    padding: 40px 22px !important;
  }

  #markets + section .hood-card {
    min-height: 270px;
    padding: 26px !important;
  }

  main > .hood-aurora > .container,
  main > div.hood-aurora > .container {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  main article {
    padding: 22px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  #markets a[href="/token/hood2x"]:hover {
    transform: none;
  }
}
