:root {
  --ps-bg: #f9f9fb;
  --ps-card: #fff;
  --ps-fg: #1a1c1e;
  --ps-muted: #44474e;
  --ps-soft: #eeeef3;
  --ps-border: rgba(0, 0, 0, 0.08);
  --ps-primary: #ffe600;
}
.dark {
  --ps-bg: #121317;
  --ps-card: #15161a;
  --ps-fg: #fff;
  --ps-muted: #ccc;
  --ps-soft: #1e1f23;
  --ps-border: rgba(255, 255, 255, 0.05);
}
html,
body,
#root {
  margin: 0;
  min-height: 100%;
  background: var(--ps-bg);
  font-family: Inter, system-ui, sans-serif;
  color: var(--ps-fg);
}
.ps-shell {
  display: flex;
  height: 100vh;
  background: var(--ps-bg);
}
.ps-mobile-bar {
  display: none;
}
.ps-side {
  display: flex;
  width: 248px;
  flex: none;
  flex-direction: column;
  box-sizing: border-box;
  border-right: 1px solid var(--ps-border);
  background: var(--ps-bg);
  color: var(--ps-fg);
}
.ps-side[data-collapsed="true"] {
  width: 80px;
}
.ps-brand {
  display: flex;
  height: 64px;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  box-sizing: border-box;
}
.ps-side[data-collapsed="true"] .ps-brand {
  justify-content: center;
  padding: 0;
}
.ps-logo {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ps-primary);
}
.ps-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ps-brand-copy strong,
.ps-brand-copy small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-brand-copy small {
  margin-top: 2px;
  color: var(--ps-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.ps-brand-copy small:before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #10b981;
  content: "";
}
.ps-scroll {
  min-height: 0;
  flex: 1;
  overflow: hidden auto;
  padding: 4px 12px 12px;
}
.ps-section {
  margin: 10px 0 4px;
  padding: 0 8px;
  color: var(--ps-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.ps-item {
  position: relative;
  display: flex;
  height: 40px;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  margin: 4px 0;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ps-muted);
  font-size: 14px;
  font-weight: 500;
}
.ps-item svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.ps-item.active {
  border-color: var(--ps-border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--ps-fg);
}
.dark .ps-item.active {
  border-color: rgba(255, 230, 0, 0.2);
  background: rgba(255, 230, 0, 0.1);
  color: var(--ps-primary);
}
.ps-item.active:after {
  position: absolute;
  right: 12px;
  width: 4px;
  height: 20px;
  border-radius: 99px;
  background: var(--ps-fg);
  content: "";
}
.dark .ps-item.active:after {
  background: var(--ps-primary);
}
.ps-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--ps-border);
}
.ps-account {
  display: flex;
  height: 56px;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  background: var(--ps-card);
}
.ps-avatar {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ps-primary);
  color: #000;
  font-size: 13px;
}
.ps-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ps-avatar:after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 7px;
  height: 7px;
  border: 2px solid var(--ps-card);
  border-radius: 50%;
  background: #10b981;
  content: "";
}
.ps-account-copy {
  min-width: 0;
  flex: 1;
}
.ps-account-copy strong,
.ps-account-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-account-copy strong {
  font-size: 13px;
}
.ps-account-copy small {
  margin-top: 4px;
  color: #087f5b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.dark .ps-account-copy small {
  color: #34d399;
}
.ps-theme {
  display: grid;
  height: 40px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 6px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 12px;
  background: var(--ps-soft);
}
.ps-theme span {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ps-muted);
  font-size: 15px;
}
.ps-theme span.on {
  background: var(--ps-card);
  color: var(--ps-fg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.ps-content {
  display: grid;
  min-width: 0;
  flex: 1;
  place-items: center;
  background: var(--ps-bg);
}
.ps-crystal {
  position: relative;
  width: 112px;
  height: 112px;
  perspective: 800px;
}
.ps-crystal i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform-origin: bottom center;
  animation: ps-spin 4s linear infinite;
  animation-delay: var(--d);
}
.ps-crystal i:before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 230, 0, 0.45);
  border-radius: 10px;
  background: linear-gradient(45deg, #8f7200, #ffe600, #fff275);
  box-shadow:
    0 0 18px rgba(255, 230, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  content: "";
  animation: ps-emerge 2s ease-in-out infinite alternate;
  animation-delay: var(--d);
}
.ps-side[data-collapsed="true"] .ps-copy,
.ps-side[data-collapsed="true"] .ps-section,
.ps-side[data-collapsed="true"] .ps-item:after,
.ps-side[data-collapsed="true"] .ps-theme {
  display: none;
}
.ps-side[data-collapsed="true"] .ps-item,
.ps-side[data-collapsed="true"] .ps-account {
  justify-content: center;
  padding: 0;
}
.ps-side[data-collapsed="true"] .ps-scroll {
  padding-inline: 16px;
}
.ps-side[data-collapsed="true"] .ps-footer {
  padding-inline: 12px;
}
@keyframes ps-spin {
  from {
    transform: translate(-50%, -50%) rotateX(45deg) rotateZ(0);
  }
  to {
    transform: translate(-50%, -50%) rotateX(45deg) rotateZ(360deg);
  }
}
@keyframes ps-emerge {
  0%,
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}
@media (max-width: 767px) {
  .ps-mobile-bar {
    position: fixed;
    z-index: 90;
    display: flex;
    inset: 0 0 auto 0;
    height: 56px;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--ps-border);
    background: var(--ps-bg);
  }
  .ps-mobile-bar .ps-logo {
    width: 36px;
    height: 36px;
  }
  .ps-mobile-bar strong {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }
  .ps-mobile-menu {
    font-size: 20px;
    color: var(--ps-muted);
  }
  .ps-side {
    display: none;
  }
  .ps-shell[data-mobile-open="true"] .ps-side {
    position: fixed;
    z-index: 100;
    display: flex;
    inset: 0 auto 0 0;
    width: min(288px, 85vw);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  }
  .ps-content {
    padding-top: 56px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ps-crystal i {
    animation-duration: 10s;
  }
}
