:root {
  --desk: #3b6ea5;
  --body-bg: #f4f7fc;
  --panel-bg: #ffffff;
  --panel-line: #d4dbe8;
  --tile-bg: #e1e9f6;
  --ink: #1a1f26;
  --ink-soft: #55606d;
  --ink-faint: #8a94a3;
  --accent: #1e395b;
  --link: #0a5ea8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px 16px 40px;
  min-height: 100vh;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--ink);
  background-color: var(--desk);
  background-image: url("bg.gif");
  background-size: 75px 75px;
  background-attachment: fixed;
}

::selection {
  background: var(--desk);
  color: #fff;
}


.page {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.window-body {
  padding: 14px;
  background-color: var(--body-bg);
  color: var(--ink);
}

.rule {
  border: none;
  border-top: 1px solid var(--panel-line);
  margin: 12px 0;
}

.mono {
  font-family: "Consolas", "Courier New", monospace;
}

.unset {
  color: var(--ink-faint);
  font-style: italic;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11px;
}

.hint {
  font-size: 11px;
  color: var(--ink-soft);
  font-style: italic;
}


.header-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar {
  width: 128px;
  height: 128px;
  border-radius: 4px;
  border: 1px solid #a0a0a0;
  box-shadow:
    inset 0 0 3px rgba(0, 0, 0, 0.2),
    0 0 0 4px rgba(255, 255, 255, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  image-rendering: pixelated;
}

.display-name {
  margin: 14px 0 2px;
  font-size: 22px;
}

.tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-style: italic;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
}

.meta-row .chip {
  padding: 2px 8px;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background: var(--panel-bg);
  color: var(--ink-soft);
}

.mood-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
}

.mood-row img {
  display: block;
}

.badge-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.badge-wall img {
  width: 88px;
  height: 31px;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.35);
  image-rendering: pixelated;
}

.badge-wall a:hover img {
  filter: brightness(1.12);
}


.about p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.about p + p {
  margin-top: 8px;
}


.link-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  color: var(--ink) !important;
  cursor: pointer;
  border: 1px solid #707070;
  border-radius: 3px;
  background: linear-gradient(180deg, #f2f2f2 0%, #ebebeb 50%, #dddddd 51%, #cfcfcf 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.link-btn:hover {
  text-decoration: none;
  border-color: #3c7fb1;
  background: linear-gradient(180deg, #eaf6fd 0%, #d9f0fc 50%, #bee6fd 51%, #a7d9f5 100%);
}

.link-btn:active {
  border-color: #2c628b;
  background: linear-gradient(180deg, #e5f4fc 0%, #c4e5f6 50%, #98d1ef 51%, #68b3db 100%);
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.25);
}

.link-btn .glyph {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.link-btn .label {
  font-weight: 600;
}

.link-btn .handle {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.details-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--panel-line);
  vertical-align: top;
}

.details-table tr:last-child td {
  border-bottom: none;
}

.details-table td:first-child {
  width: 32%;
  background-color: var(--tile-bg);
  color: var(--accent);
  border-right: 1px solid var(--panel-line);
  white-space: nowrap;
  font-weight: bold;
}

.details-table td:last-child {
  background-color: var(--panel-bg);
}


#discord-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-container {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

#avatar {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  border: 1px solid #999;
  background: var(--tile-bg);
  display: block;
}

#avatar-decoration {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  display: none;
  pointer-events: none;
}

.user-info {
  min-width: 0;
}

#username {
  font-weight: bold;
  font-size: 16px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

#status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7f8c8d;
  flex-shrink: 0;
}

#activities {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity {
  display: flex;
  gap: 12px;
  padding: 8px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-line);
  border-radius: 3px;
}

.img-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
}

.activity-image {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  display: block;
  object-fit: cover;
}

.small-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background-color: #fff;
}

.activity-body {
  flex: 1;
  min-width: 0;
}

.activity-type {
  font-size: 10px;
  font-weight: bold;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.activity-title {
  font-weight: 600;
  font-size: 13px;
  margin-top: 2px;
}

.activity-details {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.rpc-time-text {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11px;
  color: var(--ink-soft);
}

.idle-note {
  font-size: 11px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

.socket-note {
  margin: 10px 0 0;
  font-size: 10px;
  color: var(--ink-faint);
  font-family: "Consolas", "Courier New", monospace;
}

[role="progressbar"].is-paused > div {
  background: linear-gradient(
    to bottom,
    #ffeb9c 0%,
    #f3b110 40%,
    #e09900 60%,
    #b87b00 100%
  ) !important;
  background-color: #f3b110 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

[role="progressbar"].animate.is-paused > div::after,
[role="progressbar"].animate.is-paused::after {
  animation: none !important;
  display: none !important;
}


.entries-container {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gb-entry {
  background: var(--panel-bg);
  padding: 6px 8px;
  border: 1px solid var(--panel-line);
  border-left: 3px solid var(--accent);
  position: relative;
}

.gb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-right: 18px;
}

.gb-name {
  font-weight: bold;
  color: var(--accent);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.gb-time {
  font-size: 10px;
  color: var(--ink-faint);
  font-family: "Consolas", "Courier New", monospace;
  white-space: nowrap;
}

.gb-msg {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.gb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 2px 4px;
  min-width: 0;
  box-shadow: none;
}

.gb-del:hover {
  color: #c0392b;
}

.gb-empty {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}


.footer {
  text-align: center;
  color: #eaf1fb;
  font-size: 12px;
  line-height: 1.7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.footer em {
  color: #fff;
}

.footer .sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: #cfdff2;
  cursor: pointer;
}


@media (max-width: 480px) {
  body {
    padding: 14px 10px 30px;
  }

  .link-btn .handle {
    display: none;
  }
}

.custom-status-text {
  font-size: 16px;
  color: #444;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-emoji {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

#last-update {
    color: black;
}