@import url(font.css);

* {
  box-sizing: border-box
}

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

html {
  scroll-padding-top: 60px;
}

body {
  color: #4d4e53;
  background-color: white;
  margin: 0 auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
}

img {
  max-width: 100%;
}

a,
a:active {
  color: #00a4ff;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

article a {
  border-bottom: 1px solid #ddd;
}

article a:hover,
article a:active {
  border-bottom-color: #222;
}

article .description a {
  word-break: break-word;
}

p,
ul,
ol,
blockquote {
  margin-bottom: 1em;
  line-height: 160%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #000;
  font-weight: 500;
  margin: 0;
}

h1 {
  font-size: 38px;
  margin: 1em 0 .5em;
}

h1.page-title {
  font-size: 38px;
  margin: 1em 30px;
  line-height: 100%;
  word-wrap: break-word;
}

h2 {
  font-size: 30px;
  margin: 1.5em 0 .3em;
}

h3 {
  font-size: 24px;
  margin: 1.2em 0 .3em;
}

h4 {
  font-size: 20px;
  margin: 1em 0 .2em;
  color: #4d4e53;
}

h4.name {
  color: #fff;
  background-color: #00a4ff;
  box-shadow: 0 .25em .5em #d3d3d3;
  border-top: 1px solid #d3d3d3;
  border-bottom: 1px solid #d3d3d3;
  margin: 1.5em 0 0.5em;
  padding: .75em 0 .75em 10px;
}

h4.name a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

h4.name a:hover {
  border-bottom-color: #222;
}

h5,
.container-overview .subsection-title {
  font-size: 120%;
  letter-spacing: -0.01em;
  margin: 8px 0 3px 0;
}

h6 {
  font-size: 100%;
  letter-spacing: -0.01em;
  margin: 6px 0 3px 0;
  font-style: italic;
}

tt,
code,
kbd,
samp {
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  background: #f4f4f4;
  padding: 1px 5px;
}

.class-description {
  font-size: 130%;
  line-height: 140%;
  margin-bottom: 1em;
  margin-top: 1em;
}

.class-description:empty {
  margin: 0
}

#main {
  float: right;
  min-width: 360px;
  width: calc(100% - 260px);
  padding-top: 48px;
}

header {
  display: block
}

section {
  display: block;
  background-color: #fff;
  padding: 0 0 0 30px;
}

.variation {
  display: none
}

.signature-attributes {
  font-size: 60%;
  color: #eee;
  font-style: italic;
  font-weight: lighter;
}

nav {
  float: left;
  display: block;
  width: 260px;
  background: #fff;
  overflow: auto;
  position: fixed;
  height: calc(100% - 48px);
  top: 48px;
  padding: 16px 0;
  border-right: 1px solid #e8e8e8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

nav.wrap a {
  word-wrap: break-word;
}

nav h3 {
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  margin: 24px 0 8px;
  padding: 0 16px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

nav ul {
  font-size: 14px;
  line-height: 22px;
  padding: 0;
  margin: 0;
  list-style-type: none;
}

nav ul a,
nav ul a:active {
  line-height: 22px;
  padding: 4px 16px;
  display: block;
  font-size: 14px;
  color: #555;
  font-weight: 400;
  transition: color 0.15s;
}

nav ul a:hover {
  color: #00a4ff;
  text-decoration: none;
}

nav>ul,
nav .nav-group>ul {
  padding: 0;
}

/* Top-level category items (API参考, 事件, 错误码, etc.) - has data-nav-tab but no data-type */
nav li[data-nav-tab]:not([data-type])>a {
  color: #111;
  font-weight: 600;
  font-size: 14px;
  margin-top: 2px;
  padding: 7px 16px;
  line-height: 22px;
}

/* Child items (methods/members/typedefs) with data-type attribute */
nav li[data-type] a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: 14px;
  line-height: 22px;
  padding: 4px 16px;
  color: #555;
  font-weight: 400;
  transition: color 0.15s;
}

nav li[data-type] a:hover {
  color: #00a4ff;
}

/* Tutorial items */
.nav-group[data-nav-tab="tutorial"] li a {
  padding: 4px 16px;
  color: #555;
  font-weight: 400;
}

/* Section title links (clickable group headers for errorcode/type tabs) */
nav a.nav-section-title {
  color: #333;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
  padding: 4px 16px;
  line-height: 20px;
  display: block;
}

nav a.nav-section-title:hover {
  color: #00a4ff;
}

nav h2 {
  font-size: 16px;
  margin: 10px 0 0 0;
  padding: 0;
}

nav>h2>a {
  margin: 10px 0 -10px;
  color: #000 !important;
  font-weight: bold;
}

/* Group separator labels within nav */
nav li .nav-separator {
  color: #333;
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-top: 16px;
  padding: 4px 16px;
  line-height: 20px;
}

.nav-separator::before,
.nav-separator::after {
  display: none;
}

footer {
  color: hsl(0, 0%, 28%);
  margin-left: 260px;
  display: block;
  padding: 15px;
  font-style: italic;
  font-size: 90%;
}

.ancestors {
  color: #999
}

.ancestors a {
  color: #999 !important;
}

.clear {
  clear: both
}

.important {
  font-weight: bold;
  color: #950B02;
}

.yes-def {
  text-indent: -1000px
}

.type-signature {
  color: #ffdb00
}

.type-signature:last-child {
  color: rgba(255, 255, 255, 0.85);
}

.name,
.signature {
  font-family: Consolas, Monaco, 'Andale Mono', monospace
}

.signature {
  color: #ffdb00;
}

.details {
  margin-top: 6px;
  border-left: 2px solid #DDD;
  line-height: 20px;
  font-size: 14px;
}

.details dt {
  width: auto;
  float: left;
  padding-left: 10px;
}

.details dd {
  margin-left: 70px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.details ul {
  margin: 0
}

.details ul {
  list-style-type: none
}

.details pre.prettyprint {
  margin: 0
}

.details .object-value {
  padding-top: 0
}

.description {
  margin-bottom: 1em;
  margin-top: 1em;
}

.code-caption {
  font-style: italic;
  font-size: 107%;
  margin: 0;
}

.prettyprint {
  font-size: 14px;
  overflow: auto;
  border-radius: 6px;
}

.prettyprint.source {
  line-height: 18px;
  display: block;
  background-color: #0d152a;
  color: #aeaeae;
}

.prettyprint code {
  line-height: 18px;
  display: block;
  background-color: #0d152a;
  color: #4D4E53;
}

.prettyprint>code {
  padding: 15px;
}

.prettyprint .linenums code {
  padding: 0 15px
}

.prettyprint .linenums li:first-of-type code {
  padding-top: 15px
}

.prettyprint .linenums li:last-of-type code {
  padding-bottom: 15px;
}

.prettyprint code span.line {
  display: inline-block
}

.prettyprint.linenums {
  padding-left: 60px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.prettyprint.linenums ol {
  padding-left: 0
}

.prettyprint.linenums li {
  border-left: 3px #34446B solid;
}

.prettyprint.linenums li.selected,
.prettyprint.linenums li.selected * {
  background-color: #34446B;
}

.prettyprint.linenums li * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

table {
  border-spacing: 0;
  border: 1px solid #ddd;
  border-collapse: collapse;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  width: 100%;
  font-size: 14px;
  margin: 1em 0;
}

td,
th {
  margin: 0px;
  text-align: left;
  vertical-align: top;
  padding: 10px;
  display: table-cell;
}

thead tr,
thead tr {
  background-color: #fff;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.params .type {
  white-space: normal;
}

.params code {
  white-space: pre;
}

.params td,
.params .name,
.props .name,
.name code {
  color: #4D4E53;
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 100%;
}

.params td {
  border-top: 1px solid #ddd
}

.params td.description>p:first-child,
.props td.description>p:first-child {
  margin-top: 0;
  padding-top: 0;
}

.params td.description>p:last-child,
.props td.description>p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

span.param-type,
.params td .param-type,
.param-type dd {
  color: #f00;
  font-family: Consolas, Monaco, 'Andale Mono', monospace
}

.param-type dt,
.param-type dd {
  display: inline-block
}

.param-type {
  margin: 14px 0;
}

.disabled {
  color: #454545
}

/* navicon button */
.navicon-button {
  display: none;
  position: relative;
  padding: 2.0625rem 1.5rem;
  transition: 0.25s;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  opacity: .8;
}

.navicon-button .navicon:before,
.navicon-button .navicon:after {
  transition: 0.25s;
}

.navicon-button:hover {
  transition: 0.5s;
  opacity: 1;
}

.navicon-button:hover .navicon:before,
.navicon-button:hover .navicon:after {
  transition: 0.25s;
}

.navicon-button:hover .navicon:before {
  top: .825rem;
}

.navicon-button:hover .navicon:after {
  top: -.825rem;
}

/* navicon */
.navicon {
  position: relative;
  width: 2.5em;
  height: .3125rem;
  background: #000;
  transition: 0.3s;
  border-radius: 2.5rem;
}

.navicon:before,
.navicon:after {
  display: block;
  content: "";
  height: .3125rem;
  width: 2.5rem;
  background: #000;
  position: absolute;
  z-index: -1;
  transition: 0.3s 0.25s;
  border-radius: 1rem;
}

.navicon:before {
  top: .625rem;
}

.navicon:after {
  top: -.625rem;
}

/* open */
.nav-trigger:checked+label:not(.steps) .navicon:before,
.nav-trigger:checked+label:not(.steps) .navicon:after {
  top: 0 !important;
}

.nav-trigger:checked+label .navicon:before,
.nav-trigger:checked+label .navicon:after {
  transition: 0.5s;
}

/* Minus */
.nav-trigger:checked+label {
  -webkit-transform: scale(0.75);
  transform: scale(0.75);
}

/* × and + */
.nav-trigger:checked+label.plus .navicon,
.nav-trigger:checked+label.x .navicon {
  background: transparent;
}

.nav-trigger:checked+label.plus .navicon:before,
.nav-trigger:checked+label.x .navicon:before {
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  background: #FFF;
}

.nav-trigger:checked+label.plus .navicon:after,
.nav-trigger:checked+label.x .navicon:after {
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  background: #FFF;
}

.nav-trigger:checked+label.plus {
  -webkit-transform: scale(0.75) rotate(45deg);
  transform: scale(0.75) rotate(45deg);
}

.nav-trigger:checked~nav {
  left: 0 !important;
}

.nav-trigger:checked~.overlay {
  display: block;
}

.nav-trigger {
  position: fixed;
  top: 0;
  clip: rect(0, 0, 0, 0);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: hsla(0, 0%, 0%, 0.5);
  z-index: 1;
}

/* nav level */
.level-hide {
  display: none;
}

html[data-search-mode] .level-hide {
  display: block;
}


@media only screen and (min-width: 320px) and (max-width: 680px) {
  body {
    overflow-x: hidden;
  }

  .top-nav {
    position: fixed;
    z-index: 1001;
  }

  .top-nav-inner {
    padding: 0 10px;
  }

  .top-nav-tab {
    padding: 0 12px;
    font-size: 13px;
  }

  .top-nav-tools {
    display: none;
  }

  .top-nav-brand {
    font-size: 13px;
  }

  .top-nav-divider {
    margin: 0 8px;
  }

  nav {
    background: #FFF;
    width: 250px;
    height: calc(100% - 48px);
    position: fixed;
    top: 48px;
    right: 0;
    bottom: 0;
    left: -250px;
    z-index: 3;
    padding: 0 10px;
    transition: left 0.2s;
  }

  .navicon-button {
    display: inline-flex;
    align-items: center;
    position: fixed;
    top: 0;
    right: 10px;
    height: 48px;
    z-index: 2;
  }

  #main {
    width: 100%;
    min-width: 360px;
  }

  #main h1.page-title {
    margin: 1em 0;
  }

  #main section {
    padding: 0;
  }

  footer {
    margin-left: 0;
  }
}

/** Hide '#' prefix for members - keep nav clean */
[data-type="member"] a::before {
  display: none;
}

#disqus_thread {
  margin-left: 30px;
}

pre {
  position: relative;
}

pre>.copy-button {
  position: absolute;
  right: 6px;
  top: 10px;
  color: #aaa;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.1s ease-in-out;
  user-select: none;
}

pre>.copy-button:hover {
  color: #fff;
  border: 1px solid #fff;
}

/* 左侧导航栏 tooltip */
.nav-tooltip {
  position: fixed;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  max-width: 400px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  pointer-events: none;
  word-wrap: break-word;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.nav-tooltip.visible {
  opacity: 1;
}

/* Active navigation item highlight */
nav a.active {
  color: #00a4ff;
  font-weight: 600;
}

/* Top navigation tab bar */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  z-index: 1001;
  display: flex;
  align-items: center;
}

.top-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px;
  height: 100%;
  overflow-x: auto;
}

.top-nav-brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.top-nav-brand:hover {
  color: #00a4ff;
  text-decoration: none;
}

.top-nav-divider {
  width: 1px;
  height: 20px;
  background: #ddd;
  margin: 0 16px;
  flex-shrink: 0;
}

.top-nav-tab {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  box-sizing: border-box;
}

.top-nav-tab:hover {
  color: #00a4ff;
  text-decoration: none;
}

.top-nav-tab.active {
  color: #00a4ff;
  border-bottom-color: #00a4ff;
}

/* nav-group wrapper: no extra spacing, can be hidden */
.nav-group {
  margin: 0;
  padding: 0;
  display: none;
}

/* Top nav tools area (search, language, github, version) */
.top-nav-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  padding-right: 20px;
  height: 100%;
}

.top-nav-tools .top-nav-search {
  margin: 0;
}

.top-nav-tools .top-nav-search #nav-search {
  width: 180px;
  height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, width 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background: #fafafa;
}

.top-nav-tools .top-nav-search #nav-search:focus {
  border-color: #00a4ff;
  width: 240px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 164, 255, 0.08);
}

.top-nav-tools .top-nav-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.top-nav-tools .top-nav-icon:hover {
  opacity: 1;
}

.top-nav-tools .top-nav-lang {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  background: #f3f3f3;
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1;
  opacity: 1;
}

.top-nav-tools .top-nav-lang:hover {
  color: #111;
  background: #e8e8e8;
}

.top-nav-tools .trtc-version-switcher {
  position: relative;
  flex-shrink: 0;
}

.trtc-version-badge {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #888;
  cursor: pointer;
  font-size: 12px;
  line-height: 20px;
  padding: 2px 8px;
  transition: all .15s ease;
}

.trtc-version-badge:hover {
  background: #f0f0f0;
  border-color: #ccc;
  color: #555;
}

.trtc-version-badge:focus {
  outline: none;
}

.trtc-version-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 32px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 110px;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.trtc-version-menu li {
  margin: 0;
}

.trtc-version-menu a {
  display: block;
  padding: 6px 12px;
  color: #333;
  text-decoration: none;
  font-size: 12px;
}

.trtc-version-menu a:hover {
  background: #f5f5f5;
  color: #111;
}

/* ===== Landing page cards / links / changelog ===== */
section.readme {
  padding: 0 16px !important;
}

/* Cards */
.landing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 1em;
}
.landing-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.landing-card:hover {
  border-color: #00a4ff;
}
.landing-card h3 {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  margin: 0 0 6px;
  line-height: 160%;
}
.landing-card > p {
  font-size: 14px;
  color: #4d4e53;
  line-height: 160%;
  margin: 0;
  flex: 1;
}

/* Section headings inside landing */
.landing-links + h2,
h2 + .landing-links,
article h2 {
  /* keep default h2 style */
}

/* Link list */
.landing-links {
  padding: 0;
  margin: 0;
}
.landing-link-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #ddd;
}
.landing-link-item:last-child {
  border-bottom: none;
}
.landing-link-item:hover {
  background: none;
}
.landing-link-item strong {
  font-size: 16px;
  font-weight: 400;
  color: #00a4ff;
  border-bottom: 1px solid #ddd;
}
.landing-link-item:hover strong {
  border-bottom-color: #222;
}
.landing-link-item span {
  font-size: 14px;
  color: #4d4e53;
}

/* Landing changelog section */
.landing-section {
  margin: 0;
  padding: 0;
}
#landing-changelog {
  margin-top: 1.5em;
  padding: 0;
}
#landing-changelog h2 {
  font-size: 20px;
  font-weight: 500;
  color: #000;
  margin: 1em 0 .3em;
}
#landing-changelog .landing-changelog-subtitle {
  font-size: 14px;
  color: #4d4e53;
  margin: 0 0 1em;
}
#landing-changelog ul {
  padding-left: 20px;
  margin: 0 0 1em;
  list-style: disc;
}
#landing-changelog ul li {
  font-size: 16px;
  color: #4d4e53;
  line-height: 160%;
  padding: 0;
}
#landing-changelog .landing-changelog-link {
  font-size: 16px;
  font-weight: 400;
  color: #00a4ff;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
}
#landing-changelog .landing-changelog-link:hover {
  border-bottom-color: #222;
}

/* Landing responsive */
@media only screen and (max-width: 680px) {
  .landing-cards {
    grid-template-columns: 1fr;
  }
}