html,
body {
    font-family: Arial, "Microsoft JhengHei", sans-serif;
    margin: 0;
    min-height: 100vh;
    background: #b8b7b7;
    color: #faf7f7;
}

body {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 34px;
  min-height: 56px;
  padding: 0 28px;
  background: #08080a;
  border-bottom: 1px solid #1d1d20;
  box-sizing: border-box;
}

.brand {
  color: #f7f7f8;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1px;
  text-decoration: none;
}

.brand-ui {
  color: #bfc1c7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #f2f2f4;
  font: 600 12px Arial, "Microsoft JhengHei", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item-active {
  background: #252528;
}

.nav-item-active {
  cursor: pointer;
}

.nav-chevron {
  color: #bdbdc2;
  font-size: 14px;
  line-height: 1;
}

.new-badge {
  padding: 2px 4px;
  border-radius: 4px;
  background: #3546ba;
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.3px;
}

.workspace {
  position: relative;
  flex: 1;
  min-height: 420px;
  margin: 24px;
  overflow: hidden;
  border: 2px dashed rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.14);
  box-sizing: border-box;
}

.workspace-label {
  position: absolute;
  top: 12px;
  right: 14px;
  color: rgba(0, 0, 0, 0.42);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  pointer-events: none;
  user-select: none;
}

.bounce-toggle {
  position: absolute;
  top: 10px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(0, 0, 0, 0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
}

.bounce-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  border: 2px solid #000000;
  border-radius: 999px;
  background: #e5e5e5;
  box-sizing: border-box;
  transition: background 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #000000;
  transition: transform 0.2s ease;
}

.bounce-toggle input:checked + .switch-track {
  background: #ff66a3;
}

.bounce-toggle input:checked + .switch-track .switch-thumb {
  transform: translateX(16px);
}

.bounce-toggle:focus-within .switch-track {
  outline: 2px solid #1ac2ff;
  outline-offset: 2px;
}

.card {
  font-family: Montserrat, sans-serif;
  width: 300px;
  height: 250px;
  position: absolute;
  top: 32px;
  left: 32px;
  background: #ff66a3;
  border: 3px solid #000000;
  box-shadow: 12px 12px 0 #000000;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.head {
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 900;
  width: 100%;
  height: 32px;
  background: #ffffff;
  padding: 5px 12px;
  color: #000000;
  border-bottom: 3px solid #000000;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.card.is-dragging {
  z-index: 10;
  box-shadow: 16px 16px 0 #000000;
}

.card.is-dragging .head {
  cursor: grabbing;
}

.content {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

.button {
  padding: 5px 10px;
  margin-top: 10px;
  border: 3px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  font-weight: 750;
  background: #4ade80;
  transition: all 0.3s ease;
  cursor: pointer;
}

.button:hover {
  translate: 1.5px 1.5px;
  box-shadow: 1.5px 1.5px 0 #000000;
  background: #1ac2ff;
}

.button:active {
  translate: 3px 3px;
  box-shadow: 0 0 0 #000000;
}

.site-footer {
  display: block;
  padding: 44px 56px 24px;
  background: #08080a;
  border-top: 1px solid #1d1d20;
  color: #a5a7b0;
  box-sizing: border-box;
}

.footer-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 28px;
  font-family: Arial, "Microsoft JhengHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-intro {
  min-width: 0;
}

.footer-name {
  margin: 0;
  color: #f5f5f7;
  font: inherit;
  font-size: 25px;
  line-height: 1.1;
}

.footer-row > a {
  color: #9295a0;
  font: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-row > a:hover {
  color: #ffffff;
}

.footer-tagline,
.footer-license {
  max-width: 220px;
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.footer-license {
  color: #767985;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-column h2 {
  margin: 0 0 6px;
  color: #f5f5f7;
  font-size: 13px;
}

.footer-column a {
  color: #9295a0;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-copyright {
  margin: 34px 0 0;
  color: #646774;
  font-size: 11px;
}

/* Social card adapted from the supplied Uiverse component. */
.social-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 50px;
  margin-top: 22px;
  overflow: hidden;
  background: #e7e7e7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.social-card svg {
  width: 25px;
  height: 25px;
}

.social-card::before,
.social-card::after {
  position: absolute;
  display: flex;
  align-items: center;
  width: 50%;
  height: 100%;
  transition: 0.25s linear;
  z-index: 1;
  content: "";
}

.social-card::before {
  left: 0;
  justify-content: flex-end;
  background-color: #4d60b6;
}

.social-card::after {
  right: 0;
  justify-content: flex-start;
  background-color: #4453a6;
}

.social-card:hover {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

.social-card:hover span {
  opacity: 0;
  z-index: -3;
}

.social-card:hover::before {
  opacity: 0.5;
  transform: translateY(-100%);
}

.social-card:hover::after {
  opacity: 0.5;
  transform: translateY(100%);
}

.social-card > span {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: whitesmoke;
  font-family: "Fira Mono", monospace;
  font-size: 24px;
  font-weight: 700;
  opacity: 1;
  transition: opacity 0.25s;
  z-index: 2;
}

.social-card .social-link {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25%;
  height: 100%;
  color: whitesmoke;
  font-size: 24px;
  text-decoration: none;
  transition: 0.25s;
}

.social-card .social-link svg {
  text-shadow: 1px 1px rgba(31, 74, 121, 0.7);
  transform: scale(1);
}

.social-card .social-link:hover {
  background-color: rgba(249, 244, 255, 0.774);
  animation: social-bounce 0.4s linear;
}

@keyframes social-bounce {
  40% { transform: scale(1.4); }
  60% { transform: scale(0.8); }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.about-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
}

.code-editor {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 31;
  width: min(300px, calc(100vw - 32px));
  padding: 2px;
  background-color: #1d1e22;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  font-family: Arial, "Microsoft JhengHei", sans-serif;
  transform: translate(-50%, -50%);
  animation: about-pop 0.2s ease-out;
}

.code-editor .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px;
}

.code-editor .title {
  color: rgb(212, 212, 212);
  font: 700 13px Arial, "Microsoft JhengHei", sans-serif;
  letter-spacing: 0.04em;
}

.code-editor .icon {
  display: grid;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.code-editor .icon:hover {
  border-radius: 50px;
  background-color: #6e7281;
}

.code-editor .icon svg {
  width: 20px;
  height: 20px;
}

.editor-content {
  margin: 0 10px 10px;
  color: #ffffff;
  font-family: Arial, "Microsoft JhengHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.65;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: start;
  gap: 12px;
}

.about-photo {
  display: block;
  width: 104px;
  height: 150px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  object-fit: cover;
  object-position: center 38%;
}

.editor-content .code {
  display: block;
  white-space: pre-wrap;
}

.editor-content p {
  margin: 0;
}

.editor-content .property {
  margin-left: 18px;
}

.editor-content .color-0 {
  color: rgb(86, 156, 214);
}

.editor-content .color-1 {
  color: rgb(182, 206, 168);
}

.editor-content .color-2 {
  color: rgb(156, 220, 254);
}

@keyframes about-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 12px;
    padding: 0 14px;
  }

  .nav-links {
    gap: 2px;
    overflow-x: auto;
  }

  .nav-item {
    padding: 0 8px;
  }

  .workspace {
    margin: 14px;
  }

  .site-footer {
    padding: 36px 24px 24px;
  }

  .footer-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 440px) {
  .footer-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
