:root {
  --bg: #09090d;
  --panel: rgba(16, 16, 23, 0.82);
  --panel-solid: #101017;
  --line: rgba(255, 255, 255, 0.09);
  --line-bright: rgba(255, 255, 255, 0.16);
  --text: #f7f5ff;
  --muted: #9c99a9;
  --dim: #6d6979;
  --violet: #9c74ff;
  --purple: #7048e8;
  --cyan: #70e5ff;
  --lime: #a9ffcb;
  --sidebar: 440px;
  --shell-max: 1500px;
  --shell-gutter: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

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

button {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.ambient-one {
  width: 520px;
  height: 520px;
  right: -150px;
  top: -170px;
  background: rgba(106, 57, 226, .18);
}

.ambient-two {
  width: 460px;
  height: 460px;
  left: 24%;
  bottom: -300px;
  background: rgba(39, 162, 187, .09);
}

.app-shell {
  width: min(calc(100% - (var(--shell-gutter) * 2)), var(--shell-max));
  min-height: 100vh;
  margin: 0 auto;
}

.sidebar {
  position: fixed;
  top: var(--shell-gutter);
  bottom: var(--shell-gutter);
  left: max(var(--shell-gutter), calc(50vw - (var(--shell-max) / 2)));
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 32px 24px 24px;
  overflow-y: auto;
  background: rgba(10, 10, 15, .86);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .22);
  backdrop-filter: blur(26px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: min(100%, 250px);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.home-link {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 35px;
  padding: 12px 14px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 650;
  transition: .2s var(--ease);
}

.home-link svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.home-link:hover,
.home-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
}

.component-label {
  margin: 28px 14px 12px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.component-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
}

.component-link {
  position: relative;
  min-height: 58px;
  padding: 0 14px;
  color: #9793a4;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  font-size: 16px;
  font-weight: 640;
  transition: .2s var(--ease);
}

.component-link::before {
  content: "";
  position: absolute;
  inset: 5px 0;
  z-index: -1;
  border-radius: 8px;
  background: transparent;
  transition: .2s var(--ease);
}

.component-link:hover,
.component-link.active {
  color: var(--text);
}

.component-link.featured:not(.active) {
  color: #c7dce5;
}

.component-link.featured:not(.active)::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 3px;
  height: 22px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(112, 229, 255, .45);
  transform: translateY(-50%);
}

.component-link:hover::before {
  background: rgba(255, 255, 255, .035);
}

.component-link.active::before {
  background: linear-gradient(90deg, rgba(124, 83, 238, .17), rgba(124, 83, 238, .05));
  box-shadow: inset 2px 0 var(--violet);
}

.component-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.check-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  height: 100%;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .045);
}

.type-pill {
  min-width: 60px;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.type-pill::before {
  font-size: 11px;
  line-height: 1;
}

.type-pill.source {
  color: #c5b2ff;
  border-color: rgba(132, 93, 224, .5);
  background: rgba(91, 57, 164, .25);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.type-pill.source::before {
  content: "◆";
}

.type-pill.filter {
  color: #9eeaff;
  border-color: rgba(87, 200, 231, .52);
  background: rgba(40, 130, 156, .19);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.type-pill.filter::before {
  content: "✦";
}

.sidebar-foot {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding: 25px 0 0;
  border-top: 1px solid var(--line);
}

.sidebar-github,
.sidebar-forum {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  color: #0a0910;
  border-radius: 9px;
  background: #f5f1ff;
  font-size: 11px;
  font-weight: 800;
  transition: .25s var(--ease);
}

.sidebar-forum {
  color: #c9c5d1;
  border: 1px solid var(--line-bright);
  background: rgba(255, 255, 255, .035);
}

.sidebar-github:hover,
.sidebar-forum:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(156, 116, 255, .18);
}

.sidebar-github svg,
.sidebar-forum img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.sidebar-github svg {
  fill: currentColor;
}

.content {
  width: calc(100% - var(--sidebar) - 24px);
  min-height: 100vh;
  margin-left: calc(var(--sidebar) + 24px);
}

.mobile-bar {
  display: none;
}

.page {
  display: none;
  min-height: 100vh;
  animation: page-in .55s var(--ease) both;
}

.page.active {
  display: block;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.page-home {
  position: relative;
  display: none;
  grid-template-columns: 1fr;
  align-items: start;
  padding: 54px clamp(48px, 7vw, 110px) 70px;
  overflow: hidden;
}

.home-layout {
  width: min(100%, 820px);
  margin: clamp(30px, 6vh, 70px) auto 0;
}

.page-home.active {
  display: grid;
}

.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 25px;
  color: #85818f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--cyan);
}

.eyebrow i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #4b4754;
}

.hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(52px, 5vw, 82px);
  line-height: 1.08;
  letter-spacing: -.068em;
}

.hero h1 span,
.hero h1 em {
  display: block;
  white-space: nowrap;
}

.hero h1 em {
  color: transparent;
  background: linear-gradient(105deg, #fff 5%, #aa8fff 45%, #61d9f2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-style: normal;
}

.hero-copy {
  max-width: 100%;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid var(--line-bright);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  transition: .25s var(--ease);
}

.button svg {
  width: 17px;
  fill: currentColor;
}

.button.primary {
  color: #0a0910;
  background: #f5f1ff;
  border-color: #f5f1ff;
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 40px rgba(156, 116, 255, .19);
}

.button.ghost {
  color: #beb9ca;
  background: rgba(255, 255, 255, .025);
}

.button.ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.visual-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  right: auto;
  top: auto;
  margin-top: 175px;
  transform: translateX(-45px);
  perspective: 1200px;
}

.stage-grid {
  position: absolute;
  inset: 7%;
  opacity: .18;
  border-radius: 50%;
  background-image:
    linear-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000, transparent 68%);
  transform: rotate(-7deg);
}

.stage-orb {
  position: absolute;
  width: 62%;
  height: 62%;
  left: 21%;
  top: 17%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.33), transparent 16%),
    conic-gradient(from 220deg, #35216f, #bd6aff, #58d3e9, #38267d, #35216f);
  filter: blur(.2px);
  opacity: .68;
  box-shadow: 0 0 90px rgba(130, 75, 242, .25);
}

.stage-orb::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: radial-gradient(circle at 42% 38%, transparent, rgba(5, 5, 9, .68) 78%);
}

.glass-card {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .15);
  background: linear-gradient(145deg, rgba(30, 29, 42, .72), rgba(11, 11, 18, .52));
  box-shadow: 0 35px 90px rgba(0, 0, 0, .45);
  backdrop-filter: blur(22px);
}

.card-back {
  width: 47%;
  height: 38%;
  right: 8%;
  top: 10%;
  padding: 18px;
  border-radius: 19px;
  color: #827d8d;
  font-size: 8px;
  letter-spacing: .12em;
  transform: rotateY(-13deg) rotateZ(8deg);
}

.mini-lines {
  display: flex;
  gap: 5px;
  height: 50%;
  align-items: flex-end;
  margin-top: 40px;
}

.mini-lines i {
  flex: 1;
  border-radius: 3px;
  background: linear-gradient(var(--violet), rgba(156, 116, 255, .08));
}

.mini-lines i:nth-child(1) { height: 45%; }
.mini-lines i:nth-child(2) { height: 78%; }
.mini-lines i:nth-child(3) { height: 60%; }

.card-main {
  width: 66%;
  height: 57%;
  left: 4%;
  top: 25%;
  padding: 16px;
  border-radius: 23px;
  transform: rotateY(10deg) rotateZ(-3deg);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  50% { transform: rotateY(10deg) rotateZ(-2deg) translateY(-8px); }
}

.card-top {
  height: 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: #6f6a7a;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .08em;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #e9e4ef;
}

.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff6e91;
  box-shadow: 0 0 8px #ff6e91;
}

.preview-window {
  position: relative;
  height: calc(100% - 68px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background:
    radial-gradient(circle at 24% 30%, rgba(91, 223, 255, .17), transparent 30%),
    linear-gradient(150deg, #181627, #0c0c14);
}

.preview-window::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 26px 26px;
}

.preview-shape {
  position: absolute;
  width: 47%;
  height: 80%;
  left: 26%;
  top: 10%;
  border-radius: 47% 53% 42% 58% / 37% 41% 59% 63%;
  background: linear-gradient(135deg, #7d55e9, #382269 55%, #151020);
  box-shadow:
    0 0 0 2px rgba(154, 118, 255, .9),
    0 0 24px rgba(154, 118, 255, .65),
    0 0 65px rgba(100, 222, 255, .22);
}

.focus-frame {
  position: absolute;
  inset: 15% 19%;
  border: 1px solid rgba(112, 229, 255, .42);
}

.focus-frame::before,
.focus-frame::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--cyan);
  background: #151522;
}

.focus-frame::before { left: -4px; top: -4px; }
.focus-frame::after { right: -4px; bottom: -4px; }

.effect-strip {
  display: flex;
  gap: 5px;
  padding-top: 10px;
}

.effect-strip span {
  flex: 1;
  padding: 6px 2px;
  color: #827e8c;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 5px;
  font-size: 7px;
  text-align: center;
}

.float-chip {
  position: absolute;
  z-index: 4;
  padding: 9px 12px;
  color: #c5c0cf;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(13, 13, 20, .79);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .35);
  backdrop-filter: blur(15px);
  font-size: 9px;
  font-weight: 700;
}

.chip-one {
  display: flex;
  align-items: center;
  gap: 7px;
  right: 16%;
  top: 65%;
}

.chip-one i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.chip-two {
  left: 8%;
  top: 77%;
}

.value-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: 1 / -1;
  width: min(100%, 760px);
  margin-top: clamp(70px, 10vh, 120px);
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.value-strip div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.value-strip strong {
  color: #dfd9e9;
  font-size: 30px;
  font-weight: 520;
  letter-spacing: -.05em;
}

.value-strip span {
  max-width: 120px;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
}

.home-bottom {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 50px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.home-bottom p {
  max-width: 550px;
  margin: 0;
  color: #6f6b79;
  font-size: 11px;
  line-height: 1.6;
}

.home-bottom a {
  color: #bab5c4;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.home-bottom a span {
  margin-left: 9px;
  color: var(--violet);
}

.page-detail {
  padding: 54px clamp(48px, 7vw, 110px) 70px;
}

.detail-layout {
  width: min(100%, 820px);
  margin: clamp(30px, 6vh, 70px) auto 0;
}

.detail-copy {
  width: 100%;
}

.detail-badges {
  display: flex;
  gap: 7px;
  margin: 18px 0 17px;
}

.detail-badge {
  padding: 5px 8px;
  color: #9a91b1;
  border: 1px solid rgba(156, 116, 255, .2);
  border-radius: 5px;
  background: rgba(156, 116, 255, .06);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.detail-copy h1 {
  font-size: clamp(40px, 4.5vw, 62px);
}

.detail-lead {
  max-width: 690px;
  margin: 27px 0 0;
  color: #b2adbb;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.65;
}

.detail-rule {
  width: 100%;
  height: 1px;
  margin: 44px 0;
  background: linear-gradient(90deg, var(--line-bright), transparent);
}

.detail-copy h2 {
  margin: 0 0 15px;
  color: #f0edf6;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#detail-body {
  margin: 0;
  color: #85818f;
  font-size: 14px;
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 35px;
}

.feature {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  color: #a39eac;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
  font-size: 11px;
  line-height: 1.4;
}

.feature span {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--violet);
  border-radius: 50%;
  background: rgba(156, 116, 255, .09);
  font-size: 10px;
}

/* Detail Page Image Gallery */
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 35px 0 45px;
}

.gallery-row.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.gallery-spot {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(16, 16, 23, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: all 0.35s var(--ease);
}

.gallery-row.split .gallery-spot {
  aspect-ratio: 1 / 1;
}

.home-previews {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin: 35px 0 4px;
}

.home-previews .gallery-spot {
  --accent-color: var(--violet);
  --accent-glow: rgba(156, 116, 255, 0.12);
  aspect-ratio: 1 / 1;
}

.home-previews .gallery-spot.has-image .spot-image {
  cursor: zoom-in;
}

.home-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0 0 45px;
}

.home-gallery .gallery-spot {
  --accent-color: var(--violet);
  --accent-glow: rgba(156, 116, 255, 0.12);
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

.gallery-spot.settings-spot {
  aspect-ratio: 21 / 9;
  overflow: visible; /* Prevent tooltips from being clipped */
}

.settings-layout {
  display: grid;
  grid-template-columns: 34fr 66fr;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.settings-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 30px clamp(18px, 2.5vw, 32px);
  background: rgba(10, 10, 15, 0.42);
  border-right: 1px solid var(--line);
  border-radius: 13px 0 0 13px; /* Round left corners to match parent card */
  text-align: left;
}

.settings-info-text {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.settings-image-wrapper {
  position: relative;
  overflow: visible; /* Prevent tooltips from being clipped */
  width: 100%;
  height: 100%;
}

/* Color Coding Accent Glows matching the user instructions: red = off, green = on, cyan = settings */
.gallery-spot.off-spot {
  --accent-color: #ff527b; /* Premium soft red */
  --accent-glow: rgba(255, 82, 123, 0.12);
}

.gallery-spot.on-spot {
  --accent-color: #52ffaa; /* Premium soft green/lime */
  --accent-glow: rgba(82, 255, 170, 0.12);
}

.gallery-spot.settings-spot {
  --accent-color: var(--cyan); /* Cyan */
  --accent-glow: rgba(112, 229, 255, 0.12);
}

.gallery-spot:hover {
  border-color: var(--accent-color);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.35),
    0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

/* Placeholder contents inside the spot */
.spot-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--dim);
  transition: opacity 0.3s var(--ease);
  z-index: 1;
}

.gallery-spot.settings-spot .spot-placeholder {
  border-radius: 0 13px 13px 0; /* Match parent settings container corners */
}

.spot-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  color: var(--accent-color);
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: transform 0.3s var(--ease);
}

.gallery-spot:hover .spot-icon {
  transform: scale(1.1) rotate(5deg);
}

.spot-title {
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}

.spot-path {
  display: none;
}

/* The actual image element inside the spot */
.spot-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top; /* Align before/after visual content to the top */
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  z-index: 2;
  pointer-events: none;
}

/* Toggle visibility when image loads */
.gallery-spot.has-image .spot-placeholder {
  opacity: 0;
  pointer-events: none;
}

.gallery-spot.has-image .spot-image {
  opacity: 1;
  pointer-events: auto;
}

.gallery-spot.settings-spot.has-image {
  aspect-ratio: auto;
}

.gallery-spot.settings-spot.has-image .settings-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: visible;
}

.settings-image-container {
  position: relative;
  width: 100%;
  display: none;
  overflow: visible; /* Prevent tooltips from being clipped */
}

.gallery-spot.settings-spot.has-image .settings-image-container {
  display: block;
}

.gallery-spot.settings-spot.has-image .spot-image {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 13px 13px 0; /* Keep image right corners rounded */
}

.gallery-spot.settings-spot.has-image:hover .spot-image {
  transform: none;
}

.gallery-spot.settings-spot:hover {
  transform: none;
}

.gallery-spot.has-image:hover .spot-image {
  transform: scale(1.03);
}

/* Interactive Tooltip Hotspots Layer */
.hotspots-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.hotspots-layer.visible {
  opacity: 1;
  pointer-events: auto;
}

.settings-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  z-index: 10;
}

.hotspot-trigger {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid #09090d;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(112, 229, 255, 0.6);
  position: relative;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.hotspot-trigger::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0.8;
  animation: hotspot-pulse 2s infinite ease-out;
}

@keyframes hotspot-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.settings-hotspot:hover .hotspot-trigger {
  background-color: #ffffff;
  transform: scale(1.15);
}

/* Tooltip Card Styling (Right Aligned, sliding out to the right) */
.hotspot-tooltip {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translate(8px, -50%);
  background: rgba(10, 10, 15, 0.96);
  border: 1px solid var(--line-bright);
  color: var(--text);
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 13px;
  width: 240px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--ease);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  text-align: left;
}

.hotspot-tooltip h4 {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hotspot-tooltip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Left-facing pointer arrow pointing to the dot */
.hotspot-tooltip::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent rgba(10, 10, 15, 0.96) transparent transparent;
}

.settings-hotspot:hover .hotspot-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.gallery-spot.has-image:hover .spot-image {
  transform: scale(1.03);
}

/* Image Carousel Slideshow Styles */
.carousel-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.carousel-wrapper .spot-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  z-index: 2;
}

.carousel-wrapper .spot-image.active {
  opacity: 1;
  z-index: 3;
}

.carousel-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: space-between;
}

.carousel-btn {
  pointer-events: auto;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-bright);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.25s var(--ease);
  margin: 0 12px;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: scale(1.05);
}

.gallery-spot.on-spot:hover .carousel-btn {
  opacity: 1;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  pointer-events: auto;
  background: rgba(10, 10, 15, 0.5);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.carousel-dot.active {
  background: #52ffaa; /* Soft green to match the "On" status theme */
  transform: scale(1.2);
}

/* Image Lightbox Modal Styles */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 36px;
  line-height: 1;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 1010;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.lightbox-close:hover {
  color: #ffffff;
  transform: scale(1.1) rotate(90deg);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease);
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line-bright);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  background: #09090d;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-bright);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  z-index: 1010;
  opacity: 0;
  pointer-events: none;
}

.lightbox-modal.active.has-carousel .lightbox-arrow {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-50%) scale(1.05);
}

.lightbox-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(10, 10, 15, 0.5);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  z-index: 1010;
  opacity: 0;
  pointer-events: none;
}

.lightbox-modal.active.has-carousel .lightbox-dots {
  opacity: 1;
  pointer-events: auto;
}

/* Make images cursor pointer inside preview spots to show they are clickable */
.page-detail .gallery-spot.has-image .spot-image {
  cursor: zoom-in;
}

@media (max-width: 768px) {
  .gallery-row.split {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .gallery-row.split .gallery-spot {
    aspect-ratio: 1 / 1;
  }
  .gallery-spot.settings-spot {
    aspect-ratio: auto;
    min-height: 380px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-info {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 24px;
    border-radius: 13px 13px 0 0; /* Stacked layout: round top corners */
  }
  .gallery-spot.settings-spot.has-image .spot-image {
    border-radius: 0 0 13px 13px; /* Stacked layout: round bottom corners */
  }
  .gallery-spot.settings-spot .spot-placeholder {
    border-radius: 0 0 13px 13px; /* Stacked layout: round bottom corners */
  }
  .settings-image-wrapper {
    aspect-ratio: 16 / 10;
    min-height: 200px;
  }
  .gallery-spot.settings-spot.has-image .settings-image-wrapper {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
  }
  .hotspot-trigger {
    width: 10px;
    height: 10px;
  }
  .hotspot-tooltip {
    width: 180px;
    font-size: 10px;
  }
}

.detail-panel {
  position: sticky;
  top: 70px;
  min-height: 440px;
  overflow: hidden;
  padding: 35px;
  border: 1px solid var(--line-bright);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.035), transparent 45%),
    rgba(15, 15, 22, .72);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .3);
}

.panel-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  top: -100px;
  border-radius: 50%;
  background: rgba(135, 83, 255, .22);
  filter: blur(65px);
}

.panel-label {
  position: relative;
  color: var(--cyan);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .15em;
}

.detail-panel blockquote {
  position: relative;
  margin: 29px 0 70px;
  color: #e2deea;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 540;
  line-height: 1.38;
  letter-spacing: -.025em;
}

.works-with {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.works-with span {
  color: var(--dim);
}

.works-with strong {
  color: #b8b3c1;
  font-weight: 750;
  text-align: right;
}

.repo-small {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  color: #9792a0;
  font-size: 10px;
  font-weight: 700;
}

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

.repo-small span {
  color: var(--violet);
}

@media (max-width: 1180px) {
  :root { --sidebar: 390px; }
  .page-home { padding-left: 55px; padding-right: 55px; }
}

@media (max-width: 1600px) {
  .page-home.active {
    display: block;
  }

  .hero {
    width: min(100%, 760px);
    margin: 0 auto;
  }

  .visual-stage {
    width: min(100%, 620px);
    margin: 50px auto 0;
    transform: none;
  }

  .value-strip {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 920px) {
  :root { --sidebar: 390px; }

  .app-shell {
    width: 100%;
  }

  .sidebar {
    inset: 0 auto 0 0;
    border-width: 0 1px 0 0;
    border-radius: 0;
    transform: translateX(-101%);
    transition: transform .35s var(--ease);
    box-shadow: 25px 0 90px rgba(0, 0, 0, .55);
  }

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

  .content {
    width: 100%;
    margin-left: 0;
  }

  .mobile-bar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 18;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(9, 9, 13, .78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(22px);
  }

  .brand.compact {
    width: 150px;
  }

  .menu-button {
    width: 40px;
    height: 40px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
  }

  .menu-button span {
    width: 100%;
    height: 1px;
    background: #d9d4e1;
    transition: .2s;
  }

  body.menu-open .menu-button span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  body.menu-open .menu-button span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .page-home {
    padding-top: 130px;
  }

  .hero {
    width: 100%;
  }

  .visual-stage {
    width: min(100%, 650px);
    margin: 35px auto 0;
  }

  .value-strip {
    width: 100%;
    margin-top: 5px;
  }

  .page-detail {
    padding-top: 115px;
  }

  .detail-layout {
    margin-top: 55px;
  }
}

@media (max-width: 600px) {
  :root { --sidebar: min(390px, 92vw); }

  .page-home,
  .page-detail {
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero h1,
  .detail-copy h1 {
    font-size: clamp(45px, 14vw, 68px);
  }

  .eyebrow {
    align-items: flex-start;
    line-height: 1.5;
  }

  .visual-stage {
    width: 100%;
  }

  .card-main {
    width: 82%;
    height: 62%;
    left: 0;
  }

  .card-back {
    width: 55%;
    right: 0;
  }

  .value-strip {
    gap: 15px;
  }

  .value-strip div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .home-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-panel {
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
