@import url("./css/chessboard.css");
@import url("./css/piece.css");
@import url('css/deck-table.css');

@font-face {
    font-family: 'fzlb';
    src: url(https://lyc-sgs.oss-cn-hangzhou.aliyuncs.com/fonts/方正隶变_GBK.woff2) format("woff2");
}

@font-face {
    font-family: 'fzls';
    src: url(https://lyc-sgs.oss-accelerate.aliyuncs.com/fonts/方正隶书_GBK.woff2) format("woff2")
}

@font-face {
    font-family: 'fzzyjt';
    src: url(https://lyc-sgs.oss-accelerate.aliyuncs.com/fonts/方正准圆简体.woff2) format("woff2");
}

/* @font-face {
    font-family: 'hyzyj';
    src: url(https://lyc-sgs.oss-accelerate.aliyuncs.com/fonts/汉仪中圆简.woff2) format("woff2");
} */

@font-face {
    font-family: 'hyxkj';
    src: url(https://lyc-sgs.oss-accelerate.aliyuncs.com/fonts/汉仪行楷简.woff2) format("woff2");
}

/* @font-face {
    font-family: "jmmcx";
    src: url(https://lyc-sgs.oss-accelerate.aliyuncs.com/fonts/金梅毛草行.woff2) format("woff2");
} */

@font-face {
    font-family: "stlfls";
    src: url(https://lyc-sgs.oss-accelerate.aliyuncs.com/fonts/隶书_奇兵Token.woff2) format("woff2");
}

@font-face {
    font-family: "hyxzyf";
    src: url(assets/fonts/hyxzyf.woff2) format("woff2");
}

/* @import url('https://fonts.googleapis.com/css2?family=LXGW+WenKai+TC&display=swap'); */

section.cover.has-mask .mask {
    opacity: 0.5;
}

.markdown-section h1 span,
.markdown-section h2 span,
.markdown-section h3 span,
.markdown-section h4 span,
.markdown-section h5 span {
    font-family: fzlb;
    font-weight: 600;
    font-size: 1.35em;
}

.markdown-section blockquote p {
    font-weight: normal;
}

.sidebar>h1 a {
    color: inherit;
    text-decoration: none;
    /* font-family: "LXGW WenKai TC", cursive; */
    font-family: fzlb;
    font-size: 1.5em;
}

.app-name-link img {
    width: 5em;
    vertical-align: middle;
}

/* .sidebar ul li a {
    font-family: fzlb;
    font-size: 1.35em;
} */

.app-nav {
    position: fixed;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6));
    width: calc(100% - 300px);
    margin: 0;
    margin-right: 0 !important;
    padding: 12px;
    color: var(--theme-font-color, black);
    transition: 0.2s;
}

footer {
    /* position: absolute; */
    /* bottom: 0; */
    /* width: 100%; */
    text-align: center;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    padding: 16px;
    color: var(--theme-font-color, black);
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: center;
}

footer a {
    color: var(--theme-font-color, #b6c4d4);
    text-decoration: none;
    vertical-align: middle;
    line-height: 1.5em;
    font-size: 16px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
}

/* ion-icon {
    font-size: 1.2em;
    --ionicon-stroke-width: 3.2em;
    margin: 0 0.15em;
    transform: translateY(0.125em);
} */

.inline-suit {
    height: 1.2em;
    transform: translateY(-0.1em);
    aspect-ratio: 1;
    vertical-align: middle;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    pointer-events: none;
}

.inline-token {
    padding: 0 0.2em;
    width: 2.0em;
    height: 1.6em;
    transform: translateY(-0.1em);
    vertical-align: middle;
}

dot {
    text-emphasis-style: circle;
    text-emphasis-position: under;
}

.skill-name {
    width: 3.5em;
    height: 1.8em;
    margin-left: 0.1em;
    margin-right: 0.1em;
    white-space: nowrap;
    text-wrap: nowrap;
    overflow-wrap: nowrap;
    word-break: keep-all;
    text-align: center;
    position: relative;
    display: inline-block;
}

a span .skill-name {
    font-size: 0.8em;
}

.skill-name div.skill-name-text {
    position: absolute;
    width: 3em;
    height: 1.2em;
    line-height: 1.2em;
    transform: translate(0.32em, 0.32em);
    z-index: 1;
    font-size: 1.2em;
    font-weight: normal;
    display: inline-flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    font-family: fzls;
    color: black;
    white-space: nowrap;
    text-wrap: nowrap;
    overflow-wrap: nowrap;
    word-break: keep-all;
    text-align: center;
}

.skill-name img.skill-name-bg {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    pointer-events: none;
    width: 3.5em;
    aspect-ratio: 175 / 75;
    z-index: -1;
    transform: translateY(0.35em);
}

.skill-name .skill-name-tooltip {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: left;
    width: 20em;
    max-width: max-content;
    text-wrap: wrap;
    word-break: normal;
    padding: 0.25em 0.5em;
    border-radius: 0.25em;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: normal;
}

.skill-name:not(:has(+ .skill-text)):hover .skill-name-tooltip {
    visibility: visible;
    opacity: 1;
}

.skill-text {
    font-family: fzzyjt;
}

.skill-text span.skill-onwer {
    color: rgba(150, 150, 150, 0.6);
}

.skill-text span.锁定技,
.skill-text span.限定技 {
    font-weight: bold;
}

.info-bar {
    position: relative;
    vertical-align: middle;
    display: flex;
    flex-direction: column;
    align-items: left;
    gap: 0.8em;
}

.info-bar .piece-wrapper {
    position: absolute;
    width: 6.4em;
    height: 6.4em;
    right: 10%;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-bar .piece-wrapper .piece {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    position: absolute;
}

.info-bar .piece-wrapper .piece .avatar {
    pointer-events: none;
}

/* 只有一个 piece，不做任何偏移 */
.info-bar .piece-wrapper .piece:only-child {
    z-index: 1;
}

/* 有两个 piece 时 */
/* 第一个 piece 保持居中 */
.info-bar .piece-wrapper .piece:nth-child(1):nth-last-child(2) {
    z-index: 1;
    transform: translate(0%, 20%);
}

/* 第二个 piece 稍微斜着偏移（*/
.info-bar .piece-wrapper .piece:nth-child(2):nth-last-child(1) {
    z-index: 0;
    transform: translate(40%, -20%);
}

/* 有三个 piece 时 */
/* 第一个 piece 保持居中 */
.info-bar .piece-wrapper .piece:nth-child(1):nth-last-child(3) {
    z-index: 2;
    transform: translate(-30%, 0);
}

/* 第二个 piece 斜着偏移 */
.info-bar .piece-wrapper .piece:nth-child(2):nth-last-child(2) {
    z-index: 1;
    transform: translate(0, -52%);
}

/* 第三个 piece 摆成三角形 */
.info-bar .piece-wrapper .piece:nth-child(3):nth-last-child(1) {
    z-index: 0;
    transform: translate(30%, 0);
}

.info-bar .piece-wrapper .piece:hover,
.info-bar .piece-wrapper .piece:active {
    z-index: 3 !important;
    scale: 1.1;
}

.info-bar .title {
    font-family: fzlb;
    font-size: 1.5em;
}

@media screen and (orientation: portrait) {
    .info-bar .title {
        font-size: 1.2em;
    }
}

.info-bar .magatama {
    height: 1.5em;
    transform: translateY(15%);
}

.attack-range {
    position: relative;
    top: 0.15em;
    font-family: hyxkj;
    font-size: 2.5em;
}

.card-tag {
    display: inline-block;
    font-family: hyxzyf;
    margin: 0 0.2em;
    font-size: 1.0em;
    height: 1.6em;
    line-height: 1.4em;
    text-align: center;
    vertical-align: middle;
    transform: translateY(-0.05em);
    padding: 0 0.1em;
    color: rgba(255, 50, 50, 0.8);
    text-wrap: nowrap;
    word-break: keep-all;
    border: 0.08em solid rgba(255, 50, 50, 0.8);
    border-radius: 0.25em;
}

.阵法机制 {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.阵法及效果 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.阵法 {
    display: grid;
    gap: 1px;
    margin-bottom: 10px;
}

.区域 {
    width: 50px;
    height: 50px;
    background-color: #EFEFEF;
    position: relative;
    border: 1px solid #CDCDCD;
    display: flex;
    align-items: center;
    justify-content: center;
}

.区域 .步旅 {
    -webkit-touch-callout: none;
      -webkit-user-select: none;
         -moz-user-select: none;
          -ms-user-select: none;
              user-select: none;
    pointer-events: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
}

.阵法:hover .步旅 {
    box-shadow: 0 0 2px 2px rgb(0, 0, 0, 0.2);
}

.阵法效果 {
    text-align: center;
    font-family: fzzyjt;
}

/* 定义各自形状布局 */
.阵法.I  {
    grid-template-columns: repeat(4, 1fr);
}

.阵法.O  {
    grid-template-columns: repeat(2, 1fr);
}

.阵法.T  {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.T .区域:nth-child(1) {
    grid-column: 2 / 3;
}

.T .区域:nth-child(2) {
    grid-row: 2 / 2;
    grid-column: 1 / 3;
}

.T .区域:nth-child(3) {
    grid-row: 2 / 2;
    grid-column: 2 / 3;
}

.T .区域:nth-child(4) {
    grid-row: 2 / 2;
    grid-column: 3 / 3;
}