.account-status-page {
  min-height: calc(100vh - 150px);
  padding: 78px 0 72px;
}

.account-status-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 42px;
}

.account-status-hero h1 {
  margin: 12px 0 16px;
  font-size: clamp(46px, 7vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.account-status-hero h1 span {
  color: var(--accent);
}

.account-status-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.link-state-pill {
  min-width: 245px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.link-state-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #777b86;
  box-shadow: 0 0 0 5px rgba(120, 124, 136, 0.07);
}

.link-state-pill small,
.link-state-pill strong {
  display: block;
}

.link-state-pill small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.link-state-pill strong {
  margin-top: 4px;
  font-size: 12px;
}

.link-state-pill.linked {
  border-color: rgba(82, 214, 138, 0.22);
  background: rgba(82, 214, 138, 0.055);
}

.link-state-pill.linked .link-state-dot {
  background: var(--success);
  box-shadow:
    0 0 0 5px rgba(82, 214, 138, 0.08),
    0 0 18px rgba(82, 214, 138, 0.42);
}

.link-state-pill.broken {
  border-color: rgba(239, 106, 122, 0.2);
  background: rgba(239, 106, 122, 0.045);
}

.link-state-pill.broken .link-state-dot {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(239, 106, 122, 0.07);
}

.identity-link-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 42%, rgba(220, 41, 68, 0.065), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.022));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.identity-column {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 34px;
  text-align: center;
}

.identity-platform {
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.identity-platform i {
  font-size: 16px;
  color: #8993ff;
}

.identity-platform img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.identity-avatar {
  position: relative;
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 29px;
  background: var(--panel2);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.discord-avatar-status {
  color: #9ca5ff;
  font-size: 48px;
  background:
    radial-gradient(circle at 50% 20%, rgba(88, 101, 242, 0.18), transparent 68%),
    var(--panel2);
}

.discord-avatar-status img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ng-head-status {
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(220, 41, 68, 0.13), transparent 68%),
    var(--panel2);
}

.ng-head-status img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  image-rendering: pixelated;
  transform: scale(1.08);
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.ng-head-status.unlinked img {
  filter: grayscale(1) brightness(0.58) contrast(0.85);
  opacity: 0.52;
  transform: scale(1.02);
}

.identity-copy {
  min-height: 68px;
  margin-top: 22px;
}

.identity-copy strong,
.identity-copy span {
  display: block;
}

.identity-copy strong {
  max-width: 290px;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-copy span {
  max-width: 310px;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-action {
  min-width: 154px;
  margin-top: 18px;
}

.identity-action[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.42;
}

.connection-bridge {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 62px 1fr;
  align-items: center;
  align-content: center;
  gap: 0;
}

.connection-bridge::before,
.connection-bridge::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 14%, var(--line) 86%, transparent);
}

.connection-bridge::before {
  left: 0;
}

.connection-bridge::after {
  right: 0;
}

.bridge-line {
  height: 2px;
  background: rgba(255, 255, 255, 0.085);
  transition: background 0.25s ease;
}

.bridge-core {
  position: relative;
  z-index: 2;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: #7f838d;
  font-size: 24px;
  transition: all 0.25s ease;
}

.bridge-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 48px);
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.connection-bridge.linked .bridge-line {
  background: linear-gradient(90deg, rgba(82, 214, 138, 0.15), var(--success), rgba(82, 214, 138, 0.15));
}

.connection-bridge.linked .bridge-core {
  border-color: rgba(82, 214, 138, 0.3);
  background: rgba(82, 214, 138, 0.09);
  color: #9ceabc;
  box-shadow: 0 0 35px rgba(82, 214, 138, 0.1);
}

.connection-bridge.linked .bridge-label {
  color: #73c996;
}

.connection-bridge.broken .bridge-line {
  background: repeating-linear-gradient(
    90deg,
    rgba(239, 106, 122, 0.38) 0,
    rgba(239, 106, 122, 0.38) 8px,
    transparent 8px,
    transparent 15px
  );
}

.connection-bridge.broken .bridge-core {
  border-color: rgba(239, 106, 122, 0.2);
  background: rgba(239, 106, 122, 0.055);
  color: #d26b7a;
}

.connection-bridge.broken .bridge-label {
  color: #b2606d;
}

.link-details {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 15px;
  align-items: center;
  margin-top: 16px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.028);
}

.link-detail {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-icon {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel2);
  color: var(--accent);
}

.link-detail small,
.link-detail strong {
  display: block;
}

.link-detail small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.link-detail strong {
  margin-top: 4px;
  font-size: 12px;
}

.link-detail-action {
  justify-content: flex-end;
}

#statusMessage {
  margin-top: 16px;
}

html[data-theme="light"] .identity-link-card,
html[data-theme="light"] .link-details,
html[data-theme="light"] .link-state-pill {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(45, 55, 85, 0.08);
}

@media (max-width: 900px) {
  .account-status-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .link-state-pill {
    width: 100%;
  }

  .identity-link-card {
    grid-template-columns: 1fr;
  }

  .identity-column {
    min-height: 330px;
  }

  .connection-bridge {
    min-height: 130px;
    grid-template-columns: 1fr 62px 1fr;
    margin: 0 28px;
  }

  .connection-bridge::before,
  .connection-bridge::after {
    top: 0;
    right: 0;
    left: 0;
    width: auto;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--line) 15%, var(--line) 85%, transparent);
  }

  .connection-bridge::before {
    bottom: auto;
  }

  .connection-bridge::after {
    top: auto;
    bottom: 0;
  }

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

  .link-detail-action {
    grid-column: 1 / -1;
  }

  .link-detail-action .btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .account-status-page {
    padding-top: 52px;
  }

  .identity-column {
    padding: 34px 20px;
  }

  .identity-avatar {
    width: 112px;
    height: 112px;
  }

  .ng-head-status img {
    width: 78px;
    height: 78px;
  }

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

  .link-detail-action {
    grid-column: auto;
  }
}
