html,
body,
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #070b14;
  color: #e9eefc;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -25vmax;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 20% 25%, rgba(79, 172, 254, 0.22), transparent 36%),
    radial-gradient(circle at 80% 70%, rgba(0, 242, 254, 0.19), transparent 40%),
    radial-gradient(circle at 55% 50%, rgba(17, 24, 39, 0.55), transparent 52%);
  filter: blur(8px) saturate(120%);
  animation: driftGlow 18s ease-in-out infinite alternate;
  z-index: 0;
}

body::after {
  background:
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.07) 0,
      rgba(255, 255, 255, 0.07) 1px,
      transparent 1px,
      transparent 38px
    ),
    repeating-linear-gradient(
      30deg,
      rgba(103, 232, 249, 0.05) 0,
      rgba(103, 232, 249, 0.05) 1px,
      transparent 1px,
      transparent 34px
    );
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: moveGrid 24s linear infinite;
  z-index: 1;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(158, 190, 255, 0.2);
  background: rgba(8, 16, 35, 0.68);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  grid-column: 2;
}

.nav-toggle {
  display: none;
}

.tab {
  min-width: 84px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #d6def9;
  text-decoration: none;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tab:hover {
  background: rgba(79, 172, 254, 0.16);
  border-color: rgba(79, 172, 254, 0.36);
  color: #f4f8ff;
}

.tab.active {
  background: rgba(79, 172, 254, 0.24);
  border-color: rgba(79, 172, 254, 0.5);
  color: #ffffff;
}

.tab-empty {
  min-width: 56px;
}

.account {
  grid-column: 3;
  justify-self: end;
  position: relative;
  min-width: 0;
  max-width: 100%;
}

#loginBtn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

#loginBtn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 36px rgba(79, 70, 229, 0.4);
}

#loginBtn[data-state="login"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: transparent;
  background: transparent;
  color: #d6def9;
  box-shadow: none;
  letter-spacing: normal;
}

#loginBtn[data-state="login"]:hover,
#loginBtn[data-state="login"]:focus-visible {
  transform: none;
  filter: none;
  border-color: rgba(79, 172, 254, 0.36);
  background: rgba(79, 172, 254, 0.16);
  color: #f4f8ff;
  box-shadow: none;
}

.login-arrow {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  object-fit: contain;
}

#loginBtn[data-state="account"] {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(240px, 100%);
  padding: 4px 8px 4px 4px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: #d6def9;
  box-shadow: none;
  letter-spacing: normal;
}

#loginBtn[data-state="account"]:hover,
#loginBtn[data-state="account"][aria-expanded="true"] {
  background: rgba(79, 172, 254, 0.16);
  box-shadow: none;
}

.account-avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: #5865f2;
  object-fit: cover;
}

.account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-arrow {
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  padding: 5px;
  border: 1px solid rgba(158, 190, 255, 0.36);
  border-radius: 10px;
  background: #0a1226;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.account-menu[hidden] {
  display: none;
}

.account-admin {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  color: #d6def9;
  text-decoration: none;
}

.account-admin[hidden] {
  display: none;
}

.account-admin:hover,
.account-admin:focus-visible {
  background: rgba(79, 172, 254, 0.16);
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: #100f19;
  color: #a7a4b9;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.logout-btn::before {
  content: '';
  width: 16px;
  height: 16px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M12 2v10M6.3 5.3a9 9 0 1 0 11.4 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M12 2v10M6.3 5.3a9 9 0 1 0 11.4 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

.logout-btn:hover,
.logout-btn:focus-visible {
  background: #1c1b29;
  color: #e4e2ed;
}

.logout-btn:focus-visible {
  outline: 2px solid #8fd8ff;
  outline-offset: 2px;
}

.account-menu .logout-btn {
  width: 100%;
  background: transparent;
}

.account-menu .logout-btn:hover,
.account-menu .logout-btn:focus-visible {
  background: rgba(79, 172, 254, 0.16);
}

@media (min-width: 801px) and (max-width: 1050px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tabs {
    grid-column: 1;
    justify-self: center;
  }

  .account {
    grid-column: 2;
    max-width: 160px;
  }
}

.page {
  min-height: 100vh;
  display: grid;
  justify-items: center;
  align-content: start;
  padding-top: 92px;
  padding-bottom: 28px;
  position: relative;
  z-index: 3;
}

.tag-fields {
  width: min(96vw, 1160px);
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 560px);
  align-items: start;
  justify-content: center;
  gap: 18px;
}

.tag-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tag-controls-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tag-controls,
.tag-controls > * {
  width: 100%;
  box-sizing: border-box;
}

.tag-image-wrap,
.tag-image {
  width: 100%;
  box-sizing: border-box;
}

.tag-input,
.tag-mirror {
  border: 1px solid rgba(158, 190, 255, 0.45);
  border-radius: 10px;
  background: rgba(8, 16, 35, 0.75);
  color: #ecf2ff;
  font-size: 1rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.tag-input-wrap {
  position: relative;
}

.tag-input {
  width: 100%;
  box-sizing: border-box;
  height: 50px;
  padding: 0 86px 0 14px;
  outline: none;
}

.tag-input::placeholder {
  color: rgba(214, 222, 249, 0.75);
}

.tag-input:focus {
  border-color: rgba(79, 172, 254, 0.85);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2), 0 12px 28px rgba(0, 0, 0, 0.4);
}

.tag-mirror {
  min-height: 50px;
  padding: 12px 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: default;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.tag-mirror:empty::before {
  content: 'Output...';
  color: rgba(214, 222, 249, 0.75);
}

.tag-save-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  height: 34px;
  border: 1px solid rgba(158, 190, 255, 0.5);
  border-radius: 8px;
  background: rgba(79, 172, 254, 0.2);
  color: #ecf2ff;
  padding: 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, filter 140ms ease;
}

.tag-save-btn:hover {
  background: rgba(79, 172, 254, 0.34);
  filter: brightness(1.06);
}

.tag-saved-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(158, 190, 255, 0.34);
  border-radius: 10px;
  background: rgba(8, 16, 35, 0.75);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.tag-saved-empty {
  margin: 0;
  color: rgba(214, 222, 249, 0.75);
  font-size: 0.9rem;
}

.tag-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(158, 190, 255, 0.2);
}

.tag-saved-value {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Arial, sans-serif;
  font-weight: 700;
  color: #ecf2ff;
}

.tag-saved-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-saved-load-btn,
.tag-saved-delete-btn {
  border: 1px solid rgba(158, 190, 255, 0.5);
  border-radius: 7px;
  background: rgba(79, 172, 254, 0.18);
  color: #ecf2ff;
  padding: 5px 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background-color 140ms ease, transform 140ms ease;
}

.tag-saved-delete-btn {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
}

.tag-saved-load-btn:hover,
.tag-saved-delete-btn:hover {
  transform: translateY(-1px);
}

.tag-saved-load-btn:hover {
  background: rgba(79, 172, 254, 0.34);
}

.tag-saved-delete-btn:hover {
  background: rgba(239, 68, 68, 0.34);
}

.tag-color-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(24px, 1fr));
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(158, 190, 255, 0.34);
  border-radius: 10px;
  background: rgba(8, 16, 35, 0.75);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.color-swatch-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.color-swatch-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.color-swatch-btn.is-selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.8);
}

.tag-image {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.tag-image-wrap {
  position: relative;
}

@media (max-width: 1150px) {
  .tag-fields {
    width: min(92vw, 560px);
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

.tag-overlay-text {
  position: absolute;
  left: 2%;
  right: 2%;
  width: auto;
  min-height: 30px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.1vw, 1.5rem);
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #ecf2ff;
  -webkit-text-stroke: 0.8px #000;
  text-shadow:
    -1px 0 #000,
    1px 0 #000,
    0 -1px #000,
    0 1px #000;
  pointer-events: none;
}

.tag-overlay-headtag {
  top: 7.5%;
}

.tag-overlay-gangtag {
  top: 13.5%;
}

.devreq-page {
  padding-top: 104px;
}

.devreq-shell {
  width: min(94vw, 1150px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  border: 1px solid rgba(158, 190, 255, 0.3);
  border-radius: 14px;
  background: rgba(8, 16, 35, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(4px);
}

.devreq-intro {
  padding: 18px 20px;
}

.devreq-kicker {
  margin: 0;
  color: #8fd8ff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.devreq-intro h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
}

.devreq-intro p {
  margin: 0;
  color: rgba(233, 238, 252, 0.9);
  max-width: 75ch;
}

.devreq-status {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.15);
  color: #d6ffe1;
  font-size: 0.88rem;
}

.devreq-status.is-error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.16);
  color: #ffd8d8;
}

.devreq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
}

.devreq-form-card,
.devreq-list-card {
  padding: 16px;
}

.devreq-form-card h2,
.devreq-list-card h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.devreq-form {
  display: grid;
  gap: 8px;
}

.devreq-label {
  font-size: 0.86rem;
  color: rgba(214, 222, 249, 0.92);
  font-weight: 700;
}

.devreq-input,
.devreq-select,
.devreq-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(158, 190, 255, 0.45);
  border-radius: 10px;
  background: rgba(8, 16, 35, 0.78);
  color: #ecf2ff;
  font-size: 0.95rem;
  padding: 10px 12px;
  outline: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.devreq-textarea {
  resize: vertical;
  min-height: 120px;
}

.devreq-input:focus,
.devreq-select:focus,
.devreq-textarea:focus {
  border-color: rgba(79, 172, 254, 0.9);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2), 0 10px 26px rgba(0, 0, 0, 0.36);
}

.devreq-counter {
  margin: 0;
  text-align: right;
  font-size: 0.82rem;
  color: rgba(214, 222, 249, 0.8);
}

.devreq-error {
  margin: 2px 0;
  min-height: 1.2em;
  font-size: 0.86rem;
  color: #fca5a5;
}

.devreq-submit {
  border: 1px solid rgba(158, 190, 255, 0.45);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.7), rgba(59, 130, 246, 0.72));
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.devreq-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.devreq-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.devreq-clear {
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.2);
  color: #ffdede;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
}

.devreq-clear:hover {
  background: rgba(239, 68, 68, 0.32);
}

.devreq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.devreq-empty {
  margin: 0;
  color: rgba(214, 222, 249, 0.8);
  font-size: 0.92rem;
}

.devreq-item {
  border: 1px solid rgba(158, 190, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
}

.devreq-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.devreq-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.devreq-delete {
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 7px;
  background: rgba(239, 68, 68, 0.2);
  color: #ffdede;
  padding: 5px 9px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.devreq-delete:hover {
  background: rgba(239, 68, 68, 0.34);
}

.devreq-meta {
  margin: 6px 0;
  color: rgba(143, 216, 255, 0.86);
  font-size: 0.82rem;
}

.devreq-details {
  margin: 0;
  color: rgba(233, 238, 252, 0.95);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

@keyframes moveGrid {
  0% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }
  100% {
    transform: translate3d(-80px, -60px, 0) scale(1.08);
  }
}

@keyframes driftGlow {
  0% {
    transform: translate3d(-2%, -1%, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(2%, 1%, 0) rotate(6deg);
  }
}

@media (max-width: 700px) {
  .topbar {
    grid-template-columns: 1fr;
    padding: 10px 12px;
    align-items: center;
    gap: 10px;
  }

  .tabs {
    grid-column: 1;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .tab {
    min-width: 0;
    flex: 1;
    padding: 8px 8px;
    font-size: 0.85rem;
  }

  .tab-empty {
    flex: 0.7;
  }

  .account {
    grid-column: 1;
    justify-self: end;
  }

  #loginBtn {
    padding: 9px 14px;
    font-size: 0.9rem;
  }

  .devreq-page {
    padding-top: 146px;
  }

  .devreq-shell {
    width: min(94vw, 640px);
  }

  .devreq-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .topbar.nav-ready {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
    gap: 10px;
  }

  .nav-ready .nav-toggle {
    display: flex;
    grid-column: 1;
    justify-self: start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid rgba(158, 190, 255, 0.3);
    border-radius: 10px;
    background: rgba(8, 16, 35, 0.9);
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #d6def9;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible,
  .nav-toggle[aria-expanded="true"] {
    background: #1c3150;
  }

  .nav-ready .tabs {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 12px;
    width: min(250px, calc(100vw - 24px));
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 5px;
    border: 1px solid rgba(158, 190, 255, 0.36);
    border-radius: 10px;
    background: #0a1226;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
  }

  .nav-ready .tabs.is-open {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
  }

  .nav-ready .tab {
    flex: none;
    min-width: 0;
    padding: 10px 12px;
    text-align: left;
  }

  .nav-ready .account {
    grid-column: 2;
  }

  .nav-ready #loginBtn[data-state="account"] {
    padding: 4px;
    border-radius: 50%;
  }

  .nav-ready .account-name,
  .nav-ready .account-arrow {
    display: none;
  }
}

.home-page {
  display: block;
  box-sizing: border-box;
  min-height: 100vh;
  padding: 132px 24px 72px;
}

.home-content {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.home-intro {
  max-width: 680px;
  margin: 0 0 34px 12px;
}

.home-eyebrow {
  margin: 0;
  color: #8fd8ff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.home-intro h1 {
  margin: 12px 0 8px;
  color: #f5f8ff;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.home-intro > p:last-child {
  max-width: 520px;
  margin: 0;
  color: #aebbd4;
  font-size: 1.05rem;
  line-height: 1.6;
}

.home-tools {
  position: relative;
  min-height: 1090px;
}

.home-tools::before,
.home-tools::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.home-tools::before {
  inset: -90px -50px;
  background:
    radial-gradient(ellipse at 74% 14%, rgba(118, 91, 255, 0.27), transparent 34%),
    radial-gradient(ellipse at 21% 47%, rgba(46, 139, 255, 0.2), transparent 36%),
    radial-gradient(ellipse at 82% 66%, rgba(171, 71, 223, 0.2), transparent 38%),
    radial-gradient(ellipse at 39% 91%, rgba(0, 204, 229, 0.16), transparent 34%);
  filter: blur(38px);
  opacity: 0.88;
  animation: home-nebula-drift 24s ease-in-out infinite alternate;
}

.home-tools::after {
  inset: -30px -20px;
  background:
    radial-gradient(1px 1px at 12px 18px, rgba(255, 255, 255, 0.86) 98%, transparent) 0 0 / 113px 127px,
    radial-gradient(1.5px 1.5px at 39px 71px, rgba(180, 218, 255, 0.78) 98%, transparent) 0 0 / 173px 191px,
    radial-gradient(1px 1px at 83px 33px, rgba(255, 255, 255, 0.74) 98%, transparent) 0 0 / 227px 239px,
    radial-gradient(2px 2px at 51px 117px, rgba(198, 169, 255, 0.72) 98%, transparent) 0 0 / 307px 283px,
    radial-gradient(1px 1px at 151px 91px, rgba(151, 226, 255, 0.76) 98%, transparent) 0 0 / 367px 349px;
  opacity: 0.72;
  animation: home-stars-drift 36s linear infinite, home-stars-twinkle 8s ease-in-out infinite;
}

.home-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding: 30px;
  border: 1px solid rgba(158, 190, 255, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 29, 55, 0.96), rgba(8, 16, 35, 0.94));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.home-card:hover {
  border-color: rgba(143, 216, 255, 0.52);
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.46);
}

.home-card-headtag {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 53%;
  height: 390px;
  background:
    radial-gradient(ellipse at 86% 74%, rgba(79, 172, 254, 0.2), transparent 46%),
    linear-gradient(145deg, rgba(15, 29, 55, 0.97), rgba(8, 16, 35, 0.95));
}

.home-card-colours {
  position: absolute;
  top: 335px;
  left: 46%;
  z-index: 2;
  width: 53%;
  height: 390px;
  background:
    radial-gradient(ellipse at 100% 100%, rgba(168, 85, 247, 0.17), transparent 48%),
    linear-gradient(145deg, rgba(18, 30, 59, 0.98), rgba(8, 16, 35, 0.97));
}

.home-card-cdn {
  position: absolute;
  top: 670px;
  left: 0;
  z-index: 3;
  width: 53%;
  height: 390px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(0, 242, 254, 0.13), transparent 48%),
    linear-gradient(145deg, rgba(14, 34, 52, 0.99), rgba(8, 16, 35, 0.98));
}

.home-card-copy {
  position: relative;
  z-index: 2;
  max-width: 390px;
}

.home-card-headtag .home-card-copy {
  max-width: 360px;
}

.home-card h2 {
  margin: 12px 0 10px;
  color: #f5f8ff;
  font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.home-card p {
  max-width: 390px;
  margin: 0;
  color: #bac6dc;
  font-size: 0.96rem;
  line-height: 1.65;
}

.home-card-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 10px 14px;
  border: 1px solid rgba(143, 216, 255, 0.34);
  border-radius: 10px;
  background: rgba(79, 172, 254, 0.12);
  color: #e8f6ff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.home-card-link:hover,
.home-card-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(143, 216, 255, 0.68);
  background: rgba(79, 172, 254, 0.24);
}

.home-card-link span {
  color: #8fd8ff;
  font-size: 1.15rem;
  line-height: 0.8;
}

.home-headtag-image {
  position: absolute;
  right: -2%;
  bottom: 0;
  z-index: -1;
  width: 68%;
  height: 66%;
  object-fit: cover;
  object-position: center 36%;
  opacity: 0.75;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.45) 22%, #000 65%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.45) 22%, #000 65%);
}

.home-colour-preview {
  position: absolute;
  right: 23px;
  bottom: 25px;
  display: flex;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(158, 190, 255, 0.2);
  border-radius: 11px;
  background: rgba(5, 10, 23, 0.62);
}

.home-colour-preview span {
  width: 13px;
  height: 25px;
  border-radius: 5px;
  background: #f87171;
  animation: home-swatch-glow 2.4s ease-in-out infinite;
}

.home-colour-preview span:nth-child(2) { background: #fb923c; animation-delay: 180ms; }
.home-colour-preview span:nth-child(3) { background: #facc15; animation-delay: 360ms; }
.home-colour-preview span:nth-child(4) { background: #4ade80; animation-delay: 540ms; }
.home-colour-preview span:nth-child(5) { background: #60a5fa; animation-delay: 720ms; }
.home-colour-preview span:nth-child(6) { background: #c084fc; animation-delay: 900ms; }

.home-file-preview {
  position: absolute;
  right: 22px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid rgba(158, 190, 255, 0.22);
  border-radius: 11px;
  background: rgba(5, 10, 23, 0.62);
}

.home-file-icon {
  display: grid;
  width: 28px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: rgba(79, 172, 254, 0.18);
  color: #8fd8ff;
  font-size: 1.15rem;
  font-weight: 700;
  animation: home-file-float 3s ease-in-out infinite;
}

.home-file-lines {
  display: grid;
  gap: 5px;
}

.home-file-lines i {
  display: block;
  width: 58px;
  height: 4px;
  border-radius: 5px;
  background: rgba(214, 222, 249, 0.65);
}

.home-file-lines i:last-child {
  width: 38px;
  background: rgba(214, 222, 249, 0.3);
}

.home-file-status {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.55);
  animation: home-status-pulse 2s ease-in-out infinite;
}

@keyframes home-nebula-drift {
  from { transform: translate3d(-12px, -8px, 0) scale(0.98); }
  to { transform: translate3d(14px, 12px, 0) scale(1.04); }
}

@keyframes home-stars-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-30px, 22px, 0); }
}

@keyframes home-stars-twinkle {
  0%, 100% { opacity: 0.48; }
  50% { opacity: 0.82; }
}

@keyframes home-swatch-glow {
  0%, 100% { filter: brightness(0.9); transform: scaleY(0.94); }
  50% { filter: brightness(1.2); transform: scaleY(1); }
}

@keyframes home-file-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes home-status-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(74, 222, 128, 0.4); }
  50% { box-shadow: 0 0 16px rgba(74, 222, 128, 0.8); }
}

@media (max-width: 800px) {
  .home-page {
    padding: 112px 18px 48px;
  }

  .home-intro {
    margin: 0 0 28px 4px;
  }

  .home-tools {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
  }

  .home-tools::before,
  .home-tools::after {
    display: none;
  }

  .home-colour-preview span,
  .home-file-icon,
  .home-file-status {
    animation: none;
  }

  .home-card {
    padding: 24px;
  }

  .home-card-headtag {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    min-height: 360px;
  }

  .home-card-colours,
  .home-card-cdn {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    min-height: 360px;
  }
}

@media (max-width: 600px) {
  .home-page {
    padding: 112px 16px 40px;
  }

  .home-intro h1 {
    font-size: clamp(2.6rem, 13vw, 3.5rem);
  }

  .home-intro > p:last-child {
    font-size: 0.96rem;
  }

  .home-card {
    padding: 24px;
  }

  .home-card-headtag .home-card-copy {
    max-width: 320px;
  }

  .home-card h2 {
    font-size: 1.7rem;
  }

  .home-headtag-image {
    width: 82%;
    height: 58%;
  }

  .home-colour-preview,
  .home-file-preview {
    right: 18px;
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-tools::before,
  .home-tools::after,
  .home-colour-preview span,
  .home-file-icon,
  .home-file-status {
    animation: none;
  }
}
