:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f4fa;
  --color-border: #d8deed;
  --color-text: #1f2a44;
  --color-muted: #6f7b92;
  --color-accent: #7da7f2;
  --color-accent-soft: rgba(125, 167, 242, 0.12);
  --color-danger: #d6455d;
  --sidebar-width: clamp(250px, 20vw, 320px);
  --sidebar-width-mobile: clamp(250px, 35vw, 300px);
  --shadow-soft: 0 20px 45px rgba(86, 105, 141, 0.15);
  --radius-lg: 22px;
  --font-family-base: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #dfe9f3 0%, #f2f0ff 25%, #fde6f4 50%, #e3f6ff 75%, #f4fff8 100%);
  color: var(--color-text);
  font-family: var(--font-family-base);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* 全局隐藏滚动条 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* 全局隐藏 WebKit 浏览器的滚动条 */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

#root {
  min-height: 100vh;
  display: flex;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.app {
  flex: 1;
  display: flex;
  min-height: 100vh;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 34px rgba(45, 60, 115, 0.22);
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

body ::selection {
  background-color: rgba(125, 167, 242, 0.18);
  color: var(--color-text);
}

/* 全局隐藏所有滚动条 */
::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

button:focus,
a:focus {
  outline: 2px solid rgba(125, 167, 242, 0.4);
  outline-offset: 2px;
}

/* 手机屏 */
@media (max-width: 768px) {
  /* 手机屏全局字体放大1.5倍 */
  html {
    font-size: 150%;
  }

  :root {
    --sidebar-width-mobile: 280px;
  }

  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  #root {
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app {
    min-height: 100vh;
    border-radius: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    flex-direction: row;
  }
}
