body,
header,
nav,
dl,
dt,
dd,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li,
input,
button,
textarea,
code,
footer {
  margin: 0;
  padding: 0;
}

img,
input,
button,
select {
  margin-top: -0.14em;
  vertical-align: middle;
}

img {
  border: 0;
}

input:focus::-webkit-input-placeholder {
  color: transparent;
}

textarea {
  resize: vertical;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

input {
  padding: 0 10px;
  color: #333;
  font-size: 14px;
  border: #ccc 1px solid;
  border-radius: 4px;
  box-sizing: border-box;
  -webkit-user-modify: read-write-plaintext-only;
}

input::-webkit-input-placeholder {
  font-size: 12px;
}

select {
  padding: 4px 10px;
  border: #ccc 1px solid;
  border-radius: 4px;
}

/* 定义色值 */
:root {
  --color-green: #429931;
  --color-blue: #19e;
  --color-cyan: #56b3b6;
  --color-orange: #f90;
  --color-shadow: #076474;
  --color-rays: #78e4f4;
}

::selection {
  color: #fff;
  background-color: var(--color-green);
}

html {
  height: 100%;
  font-size: 20px;
  color: #555;
  position: relative;
}

body {
  font:
    14px/1.5 'Microsoft Yahei',
    'Lucida Grande',
    Helvetica,
    Arial;
  background: #eee;
}

.c_g {
  color: var(--color-green);
}

.c_o {
  color: var(--color-orange);
}

.c_b {
  color: var(--color-blue);
}

.top_wrapper {
  height: 72px;
  top: 10px;
  left: 0;
  right: 0;
  position: sticky;
  z-index: 10;
  pointer-events: none;
}

.top {
  width: 61.8%;
  min-width: 909px;
  height: 100%;
  margin: 0 auto;
  border: #e3e3e3 solid 1px;
  border-radius: 10px;
  background: rgba(238, 238, 238, 0.8);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.85);

  position: relative;
  display: flex;
  align-items: center;
  pointer-events: all;
}

.top .avatar {
  width: 51px;
  height: 51px;
  margin-left: 18px;
  border-radius: 26px;
  border: #cfe3e6 0.5px solid;
  background: url(../img/avatar.jpg) no-repeat;
  background-size: cover;
  box-shadow: 0 0 3px var(--color-shadow);
  opacity: 0.9;
}

.top .nick {
  margin-left: 12px;
  margin-bottom: 3px;
  font-size: 24px;
  color: var(--color-cyan);
  font-family: cursive, condensed;
  text-shadow:
    0.5px 0.5px var(--color-cyan),
    1px 1px var(--color-shadow);
}

.top .breadcrumb {
  margin-left: 12px;
  font-size: 14px;
  color: var(--color-shadow);
  flex: 1;
}

.top .uxs {
  width: 264px;
  display: flex;
}

.top .btn_c {
  width: 60px;
  height: 60px;
  margin-right: 6px;
  border-radius: 8px;
  border: #e6e6e6 1px solid;
  background: #f6f6f6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s linear;
  cursor: pointer;
}

.top .btn_c:hover {
  background: #f8f3c7;
}
.top .btn_c:hover svg {
  fill: var(--color-orange);
}

.top .btn_c svg {
  opacity: 0.8;
  fill: var(--color-green);
}

.ic_thememode_switch {
  color: var(--color-green);
}

.ic_thememode_switch::before {
  font-size: 18px;
  content: '明';
}

.ic_thememode_switch::after {
  font-size: 12px;
  content: '/暗';
  opacity: 0.6;
}

.ic_reward {
  color: var(--color-green);
}
.ic_reward::after {
  font-size: 18px;
  content: '赞赏';
}

.popup_reward {
  width: 220px;
  height: 220px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);

  position: absolute;
  top: 0;
  right: 74px;
}

.popup_reward img {
  width: 100%;
  height: 100%;
  border-radius: 4px;

  display: block;
  object-fit: contain;
}

.tit {
  margin-top: 16px;
  padding: 12px 18px 6px;
}

.a_ls {
  counter-reset: no;
  padding: 0 12px;
}
.a_ls a {
  margin: 8px 6px;
  padding: 12px 16px;
  color: var(--color-green);
  line-height: 1.28em;
  font-size: 14px;
  text-decoration: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  display: inline-block;
  position: relative;
  transition: 0.3s linear;
}

.a_ls a::before {
  content: counter(no, decimal) '. ';
  counter-increment: no;
  font-style: italic;
  font-size: 12px;
  color: #777;
}

.a_ls a:not(.x):hover {
  color: #fff;
  background: var(--color-orange);
}

.a_ls time {
  font-size: 10px;
  color: #999;
  font-family: Avenir;
  display: block;
  position: absolute;
  bottom: -2px;
  right: 16px;
  transition: 0.3s linear;
  pointer-events: none;
}

.a_ls a:hover time {
  color: rgba(255, 255, 255, 0.9);
}

.a_ls a [class^='tag_'] {
  width: 36px;
  height: 13px;
  line-height: 11px;
  text-align: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  display: block;
  position: absolute;
  right: 0;
  top: -5px;
  transition: 0.3s linear;
  pointer-events: none;
}

.a_ls a:hover [class^='tag_'] {
  background: rgba(255, 255, 255, 0.8);
}

.tag_css::before {
  content: 'css';
  color: #005a9c;
  font-size: 11px;
}

.tag_js::before {
  content: 'js';
  color: #f38d16;
  font-size: 11px;
}

.tag_html::before {
  content: 'html';
  color: #005a9c;
  font-size: 11px;
}

.tag_h5::before {
  content: '综合';
  color: #007936;
  font-size: 11px;
}

ol {
  margin-left: 2em;
}

article {
  min-width: 900px;
  max-width: 1240px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px;
  box-shadow: #ddd 0 0 8px;
  background: #fff;
  box-sizing: border-box;

  h1 {
    margin: 1.2rem 0;
    font-size: 1.75rem;
    text-align: center;
  }

  h2 {
    margin: 2em 0 1em;
    font-size: 1.25rem;
  }

  h3 {
    margin: 2em 0 1.5em;
    font-size: 1rem;
    line-height: 1.5em;
  }

  h4 {
    margin: 2em 0 0.5em;
    font-size: 0.75rem;
  }

  p {
    margin-bottom: 1em;
    font-size: 1em;
    word-break: break-all;
  }
}

.ref_ls {
  margin-left: 1em;
}

.code {
  margin-bottom: 0.2em;
  padding: 0.5em 1em;
  font-family: Inconsolata, serif;
  border: #ccc 1px dashed;
  background: #f4f4f4;
  display: block;
}

.detail {
  margin-bottom: 10px;
  padding: 10px;
  font-size: 12px;
  border-radius: 2px;
  border: #ccc 1px solid;
  background: #f3f3f3;
}

.tips {
  max-height: 2em;
  opacity: 0.2;
  overflow: hidden;
  transition: ease 2s;

  &:hover {
    max-height: 200em;
    opacity: 1;
  }
}

.g_table {
  width: 100%;
  font-size: 12px;
  border: none;
  border-top: #ccc 1px solid;
  border-collapse: collapse;
  border-left: #ccc 1px solid;
  table-layout: fixed;
}

.g_table th,
.g_table td {
  padding: 5px 10px;
  border-right: #ccc 1px solid;
  border-bottom: #ccc 1px solid;
}

.g_table th {
  background: rgba(0, 0, 0, 0.1);
}

.g_inp {
  min-height: 30px;
}

.btn {
  width: 200px;
  height: 36px;
  margin-top: 20px;
  font-size: 14px;
  text-align: center;
  color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-blue);
  cursor: pointer;
}

.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.answer {
  font-size: 12px;
}

.dark {
  background: #111;
}

.dark .tit {
  color: #999;
}

.dark .a_ls a {
  color: var(--color-green);
  background: rgba(51, 51, 51, 0.85);
}

.dark .a_ls a::before {
  color: #999;
}

.dark .a_ls a [class^='tag_'] {
  background: rgba(125, 125, 125, 0.7);
}

.dark .a_ls a:hover [class^='tag_'] {
  background: rgba(255, 255, 255, 0.75);
}

.dark .tag_h5::before {
  color: #429931;
}

.dark .top {
  border-color: #222;
  background: rgba(35, 35, 35, 0.7);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}
.dark .top .avatar {
  border-color: var(--color-cyan);
  box-shadow: 0 0 3px var(--color-rays);
}

.dark .top .nick {
  text-shadow: 0 0 1px var(--color-rays);
}

.dark .top .breadcrumb {
  color: var(--color-cyan);
  opacity: 0.7;
}

.dark .top .btn_c {
  border-color: #111;
  background: #2c2c2c;
  opacity: 1;
}
.dark .top .btn_c:hover {
  background: rgba(251, 241, 202, 0.3);
}

.dark .top .ic_thememode_switch::before {
  content: '暗';
}

.dark .top .ic_thememode_switch::after {
  content: '/明';
}

.dark .popup_reward {
  background: rgba(0, 0, 0, 0.15);
}

.update_time {
  padding: 30px 0 20px;
  font-size: 11px;
}

@media screen and (max-width: 1000px) {
  article {
    min-width: auto;
    padding: 12px;
  }

  .top {
    width: auto;
    min-width: auto;
  }
}

@media screen and (max-width: 555px) {
  .top .uxs {
    width: 70px;
    flex-wrap: wrap;
    position: absolute;
    top: 5px;
    right: 0;
  }

  .top .btn_c {
    margin-bottom: 6px;
  }
}
