@font-face {
    font-family: 'default';
    src: url("i/medium.ttf")  format('truetype');
}
@font-face {
    font-family: 'bold';
    src: url("i/bold.ttf")  format('truetype');
}

:root {
    --bg: #141414;
    --wrap: #1F1F1F;
    --wrapBorder: rgba(255, 255, 255, .04);
    --common: #7A7A7A;
    --dark: #3D3D3D;
    --light: #fff;
    --yellow: #F9FF00;
}
::selection {
    background-color: var(--yellow);
    color: var(--bg);
}
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--light);
}
::-webkit-scrollbar-track {
  background: var(--bg);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "default";
    font-size: 20px;
    line-height: 100%;
    border: 0;
    outline: 0;
    word-wrap: break-word;
    transition: .4s;
    cursor: url("i/cursor.svg"), auto;
}

html {
    height: 100%;
}
body {
    margin: 0 auto;
    background: var(--bg);
    color: var(--common);
}
ul, li {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--primary);
}
a:hover {
    cursor: url("i/cursor.svg"), auto;
}
a.linkLine {
    position: relative;
}
a.linkLine::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--yellow);
    transition: width 0.4s ease;
}
a.linkLine:hover::before {
    width: 100%;
}

/*  ------------------------------------------------  */

header {
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 122px;
    padding: 28px 0;
    box-shadow: 0 1px 0 var(--wrapBorder);
    background-image: url("i/headerBG.png");
    background-position: 0 center;
    background-size: 476px;
    background-repeat: repeat-x;
    background-color: var(--bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
header.min {
    height: 64px;
    background-size: 238px;
}
header section {
    position: relative;
    top: 0;
    margin: auto;
    width: 240px;
    height: 66px;
    background: url("i/logoS4M.png") center/100% no-repeat;
}
header section.hide {
    top: -24px;
    transform: scale(0.48);
    opacity: 0;
}
header a {
    display: block;
    width: 100%;
    height: 66px;
    background: url("i/logoAvatar.png") 100px 18px/44px no-repeat;
}
header a:hover {
    background: url("i/logoAvatar.png") 85px 18px/44px no-repeat;
}
header a i {
    display: block;
    width: 100%;
    height: 66px;
    background: url("i/logoUEL.png") center/100% no-repeat;
}

/*  ------------------------------------------------  */

main {
    margin: 0 auto;
    padding: 122px 0 88px 0;
    max-width: 800px;
    min-width: 640px;
}
#search {
    margin-top: 24px;
}
#search input[type=text] {
    display: flex;
    width: 100%;
    align-items: center;
    height: 64px;
    background: url("i/formSearch.png") 24px 0/24px no-repeat;
    border: 1px var(--wrapBorder) solid;
    color: var(--common);
    padding: 0 24px 0 64px;
}
#search input[type=text]:focus {
    color: var(--light);
    border: 1px var(--light) solid;
    background: url("i/formSearch.png") 24px -64px/24px no-repeat var(--wrap);
}
#search input[type=submit] {
    display: none;
}
.searchDefault {
    margin-top: 24px;
    padding: 208px 0 48px 0;
    text-align: center;
    background: url("i/bgSearch.png") center 24px/160px no-repeat var(--wrap);
    border: 1px var(--wrapBorder) solid;
}
#guide {
    margin-top: 24px;
}
#guide a {
    position: relative;
    margin-right: 32px;
    color: var(--light);
}
#guide a::after {
    content: "";
    position: absolute;
    right: -24px;
    top: 2px;
    width: 24px;
    height: 24px;
    background: url("i/guideArrow.png") right center/16px no-repeat;
}
#tagList {
    margin-top: 24px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}
#tagList a {
    position: relative;
    flex-basis: calc(25% - 18px);
    background-color: var(--wrap);
    background: url("i/tagBG.png") 24px 24px/16px no-repeat var(--wrap);
    border: 1px var(--wrapBorder) solid;
    padding: 64px 24px 24px 24px;
    color: var(--light);
}
#tagList a:hover {
    border: 1px var(--light) solid;
}
#tagList a span {
    display: block;
    width: 100%;
    padding: 24px 0 0 0;
    border-top: 1px var(--wrapBorder) solid;
}

/*  ------------------------------------------------  */

article {
    margin-top: 24px;
    padding: 24px;
    background-color: var(--wrap);
    border: 1px var(--wrapBorder) solid;
}
article .cover {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 1;
    background-position: center;
    background-size: 100%;
    background-repeat: no-repeat;
}
article .cover a {
    display: block;
    width: 100%;
    height: 100%;
}
article .tags {
    margin: 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: stretch;
    overflow: hidden;
    overflow-x: auto;
    white-space: nowrap;
}
article .tags a {
    display: flex;
    padding: 0 12px;
    align-items: center;
    height: 48px;
    border: 1px var(--wrapBorder) solid;
}
article .tags a:hover {
    color: var(--light);
    border: 1px var(--light) solid;
}
article h2 {
    font-weight: normal;
    font-size: 32px;
    line-height: 40px;
    color: var(--light);
}
article h2 a {
    font-size: 32px;
    color: var(--light);
}
article h2 a::before {
    bottom: -4px !important;
    height: 4px !important;
}
article .desc {
    margin: 24px 0;
    line-height: 150%;
}
article .date {
    padding-top: 24px;
    border-top: 1px var(--wrapBorder) solid;
    display: flex;
    align-items: center;
    gap: 4px;
    align-self: stretch;
    color: var(--dark);
}
article .date span:first-child {
    flex: 1;
}

/*  ------------------------------------------------  */

article .content {
    margin: 24px 0;
    line-height: 150%;
    border-top: 1px var(--wrapBorder) solid;
    padding-top: 24px;
}
article .youtube {
    margin-bottom: 24px;
}
article .youtube iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}
article .video {
    margin-bottom: 24px;
}
article .video video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 640px;
    background: var(--bg);
}
article .pics img {
    display: block;
    width: 100%;
    margin-bottom: 24px;
}
article .box {
    display: block;
    width: 100%;
    margin-bottom: 24px;
    background-position: 24px 22px;
    background-size: 24px;
    background-repeat: no-repeat;
    background-color: var(--wrapBorder);
    padding: 24px 24px 24px 72px;
}
article .box a {
    display: block;
    color: var(--light);
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
    padding: 24px 0;
    border-bottom: 1px var(--wrapBorder) solid;
}
article .box a:first-child {
    padding-top: 0;
}
article .box a:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
article .box a:hover {
    color: var(--yellow);
}
article .code {
    position: relative;
    margin-bottom: 24px;
    padding: 24px 24px 24px 0;
    background: var(--wrapBorder);
}
article .code textarea {
    resize: none;
    height: 240px;
    line-height: 150%;
    background-color: transparent;
    background-image: url("i/iconCode.png");
    background-position: 24px 2px;
    color: var(--common);
    padding: 0 0 0 72px;
    margin: 0;
}
article .code textarea:focus {
    color: var(--light);
}
article .code textarea::-webkit-scrollbar-track {
  background: var(--wrapBorder);
}
article .code #copyButton {
    position: absolute;
    cursor: pointer;
    top: 0;
    right: 0;
    padding: 11px 12px 9px 12px;
    background: var(--wrapBorder);
    color: var(--common);
    border: 1px transparent solid;
    outline: 4px var(--wrap) solid;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
article .code #copyButton:hover {
    color: var(--light);
    border: 1px var(--light) solid;
}
article .attachment {
    background-image: url("i/iconAttachment.png");
}
article .link {
    background-image: url("i/iconLink.png");
}

/*  ------------------------------------------------  */

article #music-player {
    position: relative;
    margin-bottom: 24px;
    height: 100px;
    background-color: var(--wrapBorder);
    background-position: center;
    background-size: 100%;
    background-repeat: no-repeat;
    padding: 24px 124px;
}
article #music-player #progress-bar {
    position: relative;
    cursor: url("i/cursor.svg"), auto;
    width: 100%;
    height: 8px;
    background: var(--wrapBorder);
    z-index: 1;
}
article #music-player #progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--light);
}
article #music-player .time {
    display: flex;
    padding-top: 24px;
    position: relative;
    z-index: 1;
    color: var(--light);
}
article #music-player #current-time {
    padding-right: 12px;
}
article #music-player #songTitle {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
article #music-player #total-time {
    padding-left: 12px;
}
article #music-player button {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
    background-color: rgba(20, 20, 20, .48);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
article #music-player .play,article #music-player .pause {
    width: 100px;
    height: 100px;
    background-position: 0 0;
    background-size: 100%;
    background-repeat: no-repeat;
}
article #music-player .play {
    background-image: url("i/play.png");
}
article #music-player .pause {
    background-image: url("i/pause.png");
}
article #music-player .musicCover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    background-position: 0 0;
    background-size: 100px 100px;
    background-repeat: no-repeat;
    z-index: 1;
}
article #music-player .musicBlur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, .80);
    backdrop-filter: sepia(1);
    -webkit-backdrop-filter: sepia(1);
}

/*  ------------------------------------------------  */

#page {
    margin-top: 24px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}
#page:empty {
  display: none;
}
#page a {
    flex: 1;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: center;
    border: 1px var(--wrap) solid;
}
#page a:hover {
    color: var(--light);
    border: 1px var(--light) solid;
}
#page a.active {
    color: var(--light);
    background: var(--wrap);
    border: 1px var(--wrapBorder) solid;
}

/*  ------------------------------------------------  */

#items {
    margin-top: 24px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}
#items:empty {
  display: none;
}
#items .item {
    flex-basis: calc(50% - 12px);
    background-position: 0 0;
    background-size: 100%;
    background-repeat: repeat;
    background-color: var(--wrap);
}
#items .item-cover {
    margin-bottom: 24px;
    width: 100%;
    aspect-ratio: 4 / 1;
    background-position: 0 0;
    background-size: 100%;
    background-repeat: no-repeat;
}
#items .item a {
    color: var(--light);
    display: block;
    width: 100%;
    height: 100%;
    padding: 24px;
    background: rgba(20, 20, 20, .96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    outline: 1px var(--wrapBorder) solid;
}

/*  ------------------------------------------------  */

footer {
    z-index: 9999;
    position: fixed;
    left: 0;
    bottom: 0;
    display: flex;
    width: 100%;
    padding: 0 24px;
    height: 64px;
    justify-content: center;
    align-items: center;
    background: rgba(20, 20, 20, .88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -1px 0 var(--wrapBorder);
}
footer span {
    font-size: 16px;
    color: var(--dark);
}
footer span:first-child {
    flex: 1;
}
footer span a {
    color: var(--light);
    font-size: 16px;
}

/*  ------------------------------------------------  */

nav {
    z-index: 1;
    position: fixed;
    bottom: 88px;
    right: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 24px;
}
nav section {
    width: 64px;
    height: 64px;
    border: 1px var(--wrapBorder) solid;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 64px;
}
nav section:hover {
    border: 1px var(--light) solid;
}
nav section.active {
    opacity: 1;
}
nav section.disabled {
    opacity: .48;
}
nav section.index {
    background-image: url("i/index.png");
}
nav section.search {
    background-image: url("i/search.png");
}
nav section.tag {
    background-image: url("i/tag.png");
}
nav section.email {
    background-image: url("i/email.png");
}
nav section.goTop {
    background-image: url("i/goTop.png");
}
nav section.goBottom {
    background-image: url("i/goBottom.png");
}
nav a {
    display: block;
    width: 100%;
    height: 100%;
}