:root {
  --color-text-main: #111111;
  --color-text-soft: rgba(17, 17, 17, 0.72);
  --color-text-dim: rgba(17, 17, 17, 0.5);
  --color-text-bright: #ffffff;

  --color-accent: #c6d8ff;
  --color-accent-soft: rgba(198, 216, 255, 0.4);
  --color-primary: #111111;
  --color-success: #2eab59;
  --color-danger: #d14b63;
  --color-warning: #e8a838;

  --color-panel: rgba(12, 18, 34, 0.28);
  --color-panel-strong: rgba(10, 16, 30, 0.42);
  --color-panel-glass: rgba(255, 255, 255, 0.72);
  --color-panel-glass-strong: rgba(255, 255, 255, 0.88);

  --color-line: rgba(255, 255, 255, 0.14);
  --color-line-strong: rgba(255, 255, 255, 0.28);
  --color-border: rgba(17, 17, 17, 0.1);
  --color-border-hover: rgba(17, 17, 17, 0.18);

  --color-shadow: rgba(0, 0, 0, 0.28);
  --color-shadow-soft: rgba(0, 0, 0, 0.12);
  --color-shadow-strong: rgba(0, 0, 0, 0.35);

  --color-backdrop: rgba(0, 0, 0, 0.24);
  --color-overlay: rgba(255, 255, 255, 0.78);

  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.18);
  --shadow-soft-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-soft-lg: 0 20px 50px rgba(0, 0, 0, 0.22);

  --shadow-panel: 0 18px 40px rgba(3, 8, 20, 0.22);
  --shadow-panel-sm: 0 8px 24px rgba(3, 8, 20, 0.16);

  --shadow-button: 0 2px 8px rgba(17, 17, 17, 0.15);
  --shadow-button-hover: 0 4px 14px rgba(17, 17, 17, 0.22);

  --shadow-focus: 0 0 0 3px rgba(198, 216, 255, 0.35);
  --shadow-focus-dark: 0 0 0 3px rgba(17, 17, 17, 0.15);

  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
  --shadow-card-hover: 0 8px 24px rgba(17, 24, 39, 0.1);

  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-inset-lg: inset 0 3px 8px rgba(0, 0, 0, 0.1);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-full: 9999px;

  --transition-fast: 150ms ease;
  --transition-base: 220ms ease;
  --transition-smooth: 320ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-slow: 600ms ease;

  --font-family-main:
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "Noto Sans SC",
    "Source Han Sans SC",
    "Helvetica Neue",
    Arial,
    sans-serif;
  --app-font-scale: 1;
  --app-font-size-base: calc(16px * var(--app-font-scale));

  --z-base: 1;
  --z-dropdown: 5;
  --z-sticky: 6;
  --z-modal: 10;
  --z-popover: 12;
  --z-toast: 30;
  --z-tooltip: 50;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-family-main);
  font-size: var(--app-font-size-base);
  font-weight: 500;
  color: var(--color-text-main);
  background: #030712;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-root {
  width: 100%;
  height: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
label,
summary,
[role="button"],
[tabindex],
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.glass-panel {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid var(--color-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-panel);
}

.glass-panel--strong {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.08)
  );
  border: 1px solid var(--color-line-strong);
}

.glass-panel--light {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-no-select {
  user-select: none;
  -webkit-user-select: none;
}

.invisible {
  visibility: hidden;
}

.hidden {
  display: none !important;
}

.app-scrollable,
.app-view-panel__body,
.screen-page,
.avatar-modal,
.avatar-modal__panel {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.scrollbar-hidden {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 14px;
}

.gap-lg {
  gap: 20px;
}

.grid {
  display: grid;
}

.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-full {
  border-radius: var(--radius-full);
}

:focus-visible {
  outline: 2px solid rgba(17, 17, 17, 0.6);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 17, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(17, 17, 17, 0.25);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 17, 0.15) transparent;
}
