/**
 * Customize default theme styling by overriding CSS variables:
 * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
 */

/**
 * Colors
 *
 * Each colors have exact same color scale system with 3 levels of solid
 * colors with different brightness, and 1 soft color.
 *
 * - `XXX-1`: The most solid color used mainly for colored text. It must
 *   satisfy the contrast ratio against when used on top of `XXX-soft`.
 *
 * - `XXX-2`: The color used mainly for hover state of the button.
 *
 * - `XXX-3`: The color for solid background, such as bg color of the button.
 *   It must satisfy the contrast ratio with pure white (#ffffff) text on
 *   top of it.
 *
 * - `XXX-soft`: The color used for subtle background such as custom container
 *   or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
 *   on top of it.
 *
 *   The soft color must be semi transparent alpha channel. This is crucial
 *   because it allows adding multiple "soft" colors on top of each other
 *   to create a accent, such as when having inline code block inside
 *   custom containers.
 *
 * - `default`: The color used purely for subtle indication without any
 *   special meanings attched to it such as bg color for menu hover state.
 *
 * - `brand`: Used for primary brand colors, such as link text, button with
 *   brand theme, etc.
 *
 * - `tip`: Used to indicate useful information. The default theme uses the
 *   brand color for this by default.
 *
 * - `warning`: Used to indicate warning to the users. Used in custom
 *   container, badges, etc.
 *
 * - `danger`: Used to show error, or dangerous message to the users. Used
 *   in custom container, badges, etc.
 * -------------------------------------------------------------------------- */

:root {
  --vp-c-default-1: var(--vp-c-gray-1);
  --vp-c-default-2: var(--vp-c-gray-2);
  --vp-c-default-3: var(--vp-c-gray-3);
  --vp-c-default-soft: var(--vp-c-gray-soft);

  --vp-c-brand-1: #95bdaa;
  --vp-c-brand-2: #4dffa8;
  --vp-c-brand-3: #49f29f;
  --vp-c-brand-soft: #4dffa8;

  --vp-c-tip-1: #65ba90;
  --vp-c-tip-2: #65ba90;
  --vp-c-tip-3: var(--vp-c-indigo-3);
  --vp-c-tip-soft: #b5f2d5;

  --vp-c-warning-1: var(--vp-c-yellow-1);
  --vp-c-warning-2: var(--vp-c-yellow-2);
  --vp-c-warning-3: var(--vp-c-yellow-3);
  --vp-c-warning-soft: var(--vp-c-yellow-soft);

  --vp-c-danger-1: var(--vp-c-red-1);
  --vp-c-danger-2: var(--vp-c-red-2);
  --vp-c-danger-3: var(--vp-c-red-3);
  --vp-c-danger-soft: var(--vp-c-red-soft);

  --vp-button-brand-border: rgba(60, 60, 67, 0.29);
  --vp-button-alt-border: rgba(60, 60, 67, 0.29);
  --vp-button-brand-hover-border: rgba(60, 60, 67, 0.29);
  --vp-button-alt-hover-border: rgba(60, 60, 67, 0.29);
}

/**
 * Component: Home
 * -------------------------------------------------------------------------- */

:root {
  --vp-home-hero-name-color: transparent;
  --vp-home-hero-name-background: -webkit-linear-gradient(
    120deg,
    #7496ad 30%,
    #49f29f 78%,
    #3bb2b8 90%
  );

  --vp-home-hero-image-background-image: radial-gradient(
    #4bfaa4 80%,
    #7496ad 20%
  );
  --vp-home-hero-image-filter: blur(65px);
}

@media (min-width: 640px) {
  :root {
    --vp-home-hero-image-filter: blur(65px);
  }
}

@media (min-width: 960px) {
  :root {
    --vp-home-hero-image-filter: blur(68px);
  }
}

/**
 * Component: Dark Mode
 * -------------------------------------------------------------------------- */
.dark:root {
  /* --c-black: #ffffff;
  --c-white: #000000; */
  /* --c-divider-light: rgba(60, 60, 67, 0.12);
  --c-divider-dark: rgba(84, 84, 88, 0.48); */
  /* --c-brand-light: var(--c-yellow-light); */

  --vp-c-brand-1: #4dffa8;

  --vp-c-bg: #111827;
  --vp-button-brand-text: #111827;
  --vp-button-brand-hover-text: #262a30;
  --vp-c-bg-soft: #161f32;

  --vp-custom-block-tip-border: transparent;
  --vp-custom-block-tip-text: var(--vp-c-text-1);
  --vp-custom-block-tip-bg: #113236;
  --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);

  --vp-button-brand-border: rgba(82, 82, 89, 0.68);
  --vp-button-alt-border: rgba(82, 82, 89, 0.68);
  --vp-button-brand-hover-border: rgba(82, 82, 89, 0.68);
  --vp-button-alt-hover-border: rgba(82, 82, 89, 0.68);
}

/**
 * Component: Custom Scroll Bar
 * -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  /* 这是针对缺省样式 (必须的) */
  width: 5px;
  height: 8px;
}

::-webkit-scrollbar-track {
  /* 滚动条的滑轨背景颜色 */
  background-color: #fdfdfdd7;
}

::-webkit-scrollbar-thumb {
  /* 滑块颜色 */
  background-color: #45e196;
  background-image: -webkit-linear-gradient(
    45deg,
    hsla(0, 0%, 100%, 0.4) 25%,
    transparent 0,
    transparent 50%,
    hsla(0, 0%, 100%, 0.4) 0,
    hsla(0, 0%, 100%, 0.4) 75%,
    transparent 0,
    transparent
  );
  border-radius: 2em;
}

.dark ::-webkit-scrollbar-track {
  /* 滚动条的滑轨背景颜色 */
  background-color: rgba(17, 24, 39, 0.15);
}

.dark ::-webkit-scrollbar-thumb {
  /* 滑块颜色 */
  background-color: #111827;
  background-image: -webkit-linear-gradient(
    45deg,
    hsla(0, 0%, 100%, 0.4) 25%,
    transparent 0,
    transparent 50%,
    hsla(0, 0%, 100%, 0.4) 0,
    hsla(0, 0%, 100%, 0.4) 75%,
    transparent 0,
    transparent
  );
  border-radius: 2em;
}

::-webkit-scrollbar-button {
  /*滑轨两头的监听按钮颜色*/
  background-color: #7496ad;
}

::-webkit-scrollbar-corner {
  /* 横向滚动条和纵向滚动条相交处尖角的颜色 这条其实没用，因为我的横向滚动条被隐藏了*/
  background-color: transparent;
}

.el-scrollbar_wrap {
  /* 隐藏横向滚动条 */
  overflow-x: hidden;
}
