/* =========================================================
   BASE
========================================================= */

* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;

  --background: #090b10;
  --background-soft: #10141c;

  --surface: #141923;
  --surface-hover: #191f2b;
  --surface-expanded: #121722;

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  --text: #f3f6fb;
  --text-soft: #a1abba;
  --text-muted: #707c8d;

  --focus: #9bc1ff;

  --radius-large: 24px;
  --radius-medium: 18px;
  --radius-small: 12px;

  --shadow:
    0 24px 70px rgba(0, 0, 0, 0.28);
}


html {
  min-width: 320px;
  scroll-behavior: smooth;
}


body {
  margin: 0;

  min-width: 320px;
  min-height: 100vh;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background:
    radial-gradient(
      circle at top left,
      rgba(76, 99, 170, 0.12),
      transparent 32rem
    ),
    var(--background);

  color: var(--text);
}


button,
a {
  font: inherit;
}


button {
  color: inherit;
}


button,
a,
.service-card {
  -webkit-tap-highlight-color: transparent;
}


[hidden] {
  display: none !important;
}


.page {
  width: min(1240px, calc(100% - 32px));

  margin: 0 auto;

  padding:
    32px
    0
    36px;
}



/* =========================================================
   SHARED
========================================================= */

.eyebrow {
  margin: 0;

  color: var(--text-muted);

  font-size: 0.72rem;
  font-weight: 800;

  letter-spacing: 0.16em;

  text-transform: uppercase;
}


button:focus-visible,
a:focus-visible,
.service-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}



/* =========================================================
   HERO / BANNER
========================================================= */

.hero {
  position: relative;

  min-height: 210px;

  display: flex;
  align-items: center;

  overflow: hidden;

  padding: 34px 40px;

  border: 1px solid var(--border);
  border-radius: 30px;

  background:
    linear-gradient(
      120deg,
      #141925 0%,
      #10141d 52%,
      #121521 100%
    );

  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.22);
}


.hero-content {
  position: relative;
  z-index: 2;

  width: 100%;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 40px;
}


.hero-text {
  max-width: 760px;
}


.hero h1 {
  margin:
    7px
    0
    12px;

  font-size:
    clamp(
      2.3rem,
      5vw,
      4.3rem
    );

  line-height: 0.98;

  letter-spacing: -0.055em;
}


.hero-description {
  max-width: 650px;

  margin: 0;

  color: var(--text-soft);

  font-size: 1rem;

  line-height: 1.55;
}


.hero-glow {
  position: absolute;

  border-radius: 50%;

  filter: blur(65px);

  opacity: 0.3;

  pointer-events: none;
}


.hero-glow-one {
  width: 280px;
  height: 280px;

  top: -150px;
  right: 10%;

  background: #7658ff;
}


.hero-glow-two {
  width: 240px;
  height: 240px;

  bottom: -170px;
  right: 30%;

  background: #279be8;
}


.hero-glow-three {
  width: 200px;
  height: 200px;

  bottom: -150px;
  left: 5%;

  background: #d74f9d;
}


.login-help-button {
  flex: 0 0 auto;

  padding:
    11px
    17px;

  border: 1px solid var(--border-hover);
  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.055);

  cursor: pointer;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}


.login-help-button:hover {
  transform: translateY(-1px);

  border-color:
    rgba(255, 255, 255, 0.28);

  background:
    rgba(255, 255, 255, 0.09);
}



/* =========================================================
   LOGIN HELP
========================================================= */

.login-help {
  position: relative;

  margin-top: 16px;

  padding:
    24px
    62px
    24px
    26px;

  border: 1px solid var(--border);
  border-radius: var(--radius-large);

  background: var(--surface);

  box-shadow: var(--shadow);

  animation:
    panel-in
    180ms
    ease-out;
}


.login-help-content {
  max-width: 760px;
}


.login-help h2 {
  margin:
    5px
    0
    14px;

  font-size: 1.4rem;
}


.login-help p {
  margin:
    8px
    0;

  color: var(--text-soft);

  line-height: 1.6;
}


.login-example {
  display: inline-flex;
  align-items: center;

  gap: 14px;

  margin:
    10px
    0;

  padding:
    9px
    13px;

  border: 1px solid var(--border);

  border-radius: var(--radius-small);

  background:
    rgba(0, 0, 0, 0.18);
}


.login-example span {
  color: var(--text-muted);

  font-size: 0.8rem;
}


.login-help-close {
  position: absolute;

  top: 15px;
  right: 18px;

  border: 0;

  background: transparent;

  color: var(--text-soft);

  font-size: 2rem;
  line-height: 1;

  cursor: pointer;
}



/* =========================================================
   APPS HEADER
========================================================= */

.apps-heading {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 24px;

  margin:
    42px
    2px
    16px;
}


.apps-heading h2 {
  margin:
    3px
    0
    0;

  font-size: 1.75rem;

  letter-spacing: -0.035em;
}


.apps-heading-description {
  margin: 0;

  color: var(--text-muted);

  font-size: 0.88rem;
}



/* =========================================================
   APPS GRID
========================================================= */

.apps-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 14px;
}



/* =========================================================
   SERVICE CARD
========================================================= */

.service-card {
  --accent: #7ca7ff;

  min-width: 0;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  background:
    linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.025),
      transparent 42%
    ),
    var(--surface);

  cursor: pointer;

  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease;
}


.service-card:hover {
  transform: translateY(-2px);

  border-color:
    color-mix(
      in srgb,
      var(--accent) 45%,
      var(--border-hover)
    );

  background:
    var(--surface-hover);

  box-shadow:
    0 14px 38px
    rgba(0, 0, 0, 0.2);
}


.service-card.is-expanded {
  grid-column: 1 / -1;

  cursor: default;

  transform: none;

  border-color:
    color-mix(
      in srgb,
      var(--accent) 40%,
      var(--border)
    );

  background:
    var(--surface-expanded);

  box-shadow: var(--shadow);
}



/* =========================================================
   COMPACT CARD
========================================================= */

.service-summary {
  min-height: 98px;

  display: grid;

  grid-template-columns:
    48px
    minmax(0, 1fr)
    36px;

  align-items: center;

  gap: 14px;

  padding:
    16px
    17px;
}


.service-icon,
.details-icon {
  position: relative;

  display: grid;
  place-items: center;

  overflow: hidden;

  border: 1px solid
    color-mix(
      in srgb,
      var(--accent) 42%,
      var(--border)
    );

  background:
    color-mix(
      in srgb,
      var(--accent) 10%,
      transparent
    );
}


.service-icon {
  width: 48px;
  height: 48px;

  border-radius: 14px;
}


.details-icon {
  width: 52px;
  height: 52px;

  border-radius: 15px;
}


.service-icon-image,
.details-icon-image {
  display: block;

  width: 72%;
  height: 72%;

  object-fit: contain;
}


.service-icon-fallback,
.details-icon-fallback {
  display: none;

  color: var(--accent);

  font-size: 1.15rem;
  font-weight: 800;
}


.service-main {
  min-width: 0;
}


.service-name {
  margin:
    0
    0
    4px;

  overflow: hidden;

  font-size: 1.08rem;

  letter-spacing: -0.02em;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.service-description {
  margin: 0;

  overflow: hidden;

  color: var(--text-soft);

  font-size: 0.82rem;

  line-height: 1.35;

  text-overflow: ellipsis;

  white-space: nowrap;
}



/* =========================================================
   INFO BUTTON
========================================================= */

.info-button {
  position: relative;

  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.035);

  cursor: pointer;

  transition:
    background 150ms ease,
    border-color 150ms ease;
}


.info-button:hover {
  border-color:
    color-mix(
      in srgb,
      var(--accent) 55%,
      var(--border)
    );

  background:
    color-mix(
      in srgb,
      var(--accent) 12%,
      transparent
    );
}


.info-symbol {
  font-family: Georgia, serif;

  font-size: 1rem;
  font-weight: bold;
}


.info-tooltip {
  position: absolute;

  right: 0;
  bottom: calc(100% + 10px);

  width: max-content;
  max-width: 230px;

  padding:
    7px
    9px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: #05070b;

  color: var(--text);

  font-size: 0.72rem;
  font-weight: 600;

  line-height: 1.3;

  opacity: 0;

  pointer-events: none;

  transform: translateY(4px);

  transition:
    opacity 140ms ease,
    transform 140ms ease;

  box-shadow:
    0 12px 30px
    rgba(0, 0, 0, 0.4);

  z-index: 20;
}


.info-button:hover .info-tooltip,
.info-button:focus-visible .info-tooltip {
  opacity: 1;

  transform: translateY(0);
}



/* =========================================================
   EXPANDED DETAILS
========================================================= */

.service-details {
  padding:
    0
    22px
    22px;

  animation:
    panel-in
    190ms
    ease-out;
}


@keyframes panel-in {

  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


.details-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding:
    20px
    0;

  border-top:
    1px solid
    var(--border);
}


.details-heading {
  display: flex;

  align-items: center;

  gap: 14px;
}


.details-name {
  margin:
    4px
    0
    0;

  font-size: 1.4rem;
}


.collapse-button {
  border: 0;

  background: transparent;

  color: var(--text-soft);

  font-size: 2rem;
  line-height: 1;

  cursor: pointer;

  transition:
    color 150ms ease,
    transform 150ms ease;
}


.collapse-button:hover {
  color: var(--text);

  transform: scale(1.06);
}



/* =========================================================
   DETAILS PANELS
========================================================= */

.details-overview {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 12px;
}


.details-panel,
.instructions-panel {
  border: 1px solid var(--border);

  border-radius: 15px;

  background:
    rgba(0, 0, 0, 0.14);
}


.details-panel {
  padding: 17px;
}


.details-panel h4,
.instructions-panel h4 {
  margin:
    0
    0
    9px;

  font-size: 0.86rem;

  letter-spacing: -0.01em;
}


.details-panel p {
  margin: 0;

  color: var(--text-soft);

  font-size: 0.9rem;

  line-height: 1.55;
}



/* =========================================================
   SERVER ADDRESS
========================================================= */

.server-address-row {
  display: flex;

  align-items: center;

  gap: 8px;
}


.server-address {
  flex: 1;

  min-width: 0;

  overflow: hidden;

  padding:
    8px
    10px;

  border-radius: 9px;

  background:
    rgba(0, 0, 0, 0.25);

  color: #dbe6f8;

  font-size: 0.78rem;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.copy-button {
  padding:
    7px
    10px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background:
    rgba(255, 255, 255, 0.04);

  cursor: pointer;

  transition:
    background 150ms ease,
    border-color 150ms ease;
}


.copy-button:hover {
  border-color: var(--border-hover);

  background:
    rgba(255, 255, 255, 0.08);
}



/* =========================================================
   INSTRUCTIONS
========================================================= */

.instructions-panel {
  margin-top: 12px;

  padding: 17px;
}


.instruction-tabs {
  display: flex;

  flex-wrap: wrap;

  gap: 7px;

  margin:
    11px
    0
    15px;
}


.instruction-tab {
  padding:
    7px
    11px;

  border: 1px solid var(--border);
  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.025);

  color: var(--text-soft);

  cursor: pointer;

  font-size: 0.82rem;

  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}


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

  border-color: var(--border-hover);
}


.instruction-tab.is-active {
  color: var(--text);

  border-color:
    color-mix(
      in srgb,
      var(--accent) 45%,
      var(--border)
    );

  background:
    color-mix(
      in srgb,
      var(--accent) 13%,
      transparent
    );
}


.instruction-content {
  color: var(--text-soft);

  font-size: 0.9rem;

  line-height: 1.55;
}


.instruction-content ol {
  margin: 0;

  padding-left: 1.25rem;
}


.instruction-content li + li {
  margin-top: 7px;
}



/* =========================================================
   DETAILS ACTIONS
========================================================= */

.details-footer {
  display: flex;

  justify-content: flex-end;

  margin-top: 14px;
}


.open-service-button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding:
    9px
    15px;

  border: 1px solid
    color-mix(
      in srgb,
      var(--accent) 60%,
      var(--border)
    );

  border-radius: 999px;

  background:
    color-mix(
      in srgb,
      var(--accent) 45%,
      #17202c
    );

  color: #fff;

  text-decoration: none;

  transition:
    transform 150ms ease,
    filter 150ms ease;
}


.open-service-button:hover {
  transform: translateY(-1px);

  filter: brightness(1.08);
}



/* =========================================================
   FOOTER
========================================================= */

.footer {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-top: 50px;

  padding:
    20px
    2px
    0;

  border-top:
    1px solid
    var(--border);

  color: var(--text-muted);

  font-size: 0.8rem;
}



/* =========================================================
   RESPONSIVE
========================================================= */

@media (min-width: 1450px) {

  .page {
    width:
      min(
        1380px,
        calc(100% - 48px)
      );
  }

  .apps-grid {
    grid-template-columns:
      repeat(
        5,
        minmax(0, 1fr)
      );
  }

}


@media (max-width: 1050px) {

  .apps-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

}


@media (max-width: 820px) {

  .hero {
    padding:
      30px
      28px;
  }


  .hero-content {
    align-items: flex-start;

    flex-direction: column;

    gap: 24px;
  }


  .apps-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }


  .details-overview {
    grid-template-columns: 1fr;
  }


  .apps-heading {
    align-items: flex-start;

    flex-direction: column;

    gap: 8px;
  }

}


@media (max-width: 520px) {

  .page {
    width:
      calc(100% - 20px);

    padding-top: 10px;
  }


  .hero {
    min-height: 190px;

    padding:
      26px
      22px;

    border-radius: 22px;
  }


  .hero h1 {
    font-size: 2.45rem;
  }


  .hero-description {
    font-size: 0.9rem;
  }


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


  .service-summary {
    min-height: 88px;

    grid-template-columns:
      44px
      minmax(0, 1fr)
      34px;

    padding:
      14px
      15px;
  }


  .service-icon {
    width: 44px;
    height: 44px;
  }


  .service-details {
    padding:
      0
      15px
      18px;
  }


  .details-heading {
    gap: 10px;
  }


  .details-icon {
    width: 46px;
    height: 46px;
  }


  .server-address-row {
    align-items: stretch;

    flex-direction: column;
  }


  .copy-button {
    align-self: flex-start;
  }


  .info-tooltip {
    display: none;
  }


  .footer {
    align-items: flex-start;

    flex-direction: column;

    gap: 6px;
  }

}



/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }

}

.site-logo {
  width: 56px;
  height: 56px;
  display: block;
  margin-bottom: 14px;
  border-radius: 14px;
}