:root {
    --r-heading-font: alibaba;
    --r-main-font-size: 3.25rem;
    --r-heading-text-transform: unset;
}

html {
    font-size: 3.25rem;
    font-family: alibaba;
}

.reveal {
    font-size: 1rem;
    font-family: alibaba;
}

/* 右上的logo和品牌展示 */
.hogwarts.logo {
    position: absolute;
    top: 0;
    right: 5%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;
    font-size: 0.5rem;
    align-items: center;
    height: 10%;
    width: 50%;
    margin: 0;
}

.hogwarts.logo img {
    margin: 0;
}

/* 每页ppt */
.reveal section {
    display: flex !important;
    flex-flow: column nowrap;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.reveal section h2:first-of-type,
.reveal section h3:first-of-type {
    border-bottom-style: solid;
}

/* ppt首页标题样式 */
.reveal section .hogwarts.big_title,
.reveal section .hogwarts.title.only {
    width: 100%;
    align-self: center;
    justify-self: center;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    position: unset;
    text-align: center;
}

/* 调整代码块样式 */
.reveal pre {
    display: block;
    /* width: 100%; */
    margin: var(--r-block-margin) auto;
    text-align: left;
    font-size: 0.5rem;
    word-wrap: break-word;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
    max-height: 100% !important;
}

.reveal section .hogwarts.big_title + .hogwarts.content {
    position: static;
    height: auto;
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0%;
}

.reveal section .hogwarts.big_title + .hogwarts.content > p {
    justify-content: flex-start;
    flex-flow: column;
    margin: 0;
    width: unset;
}

.reveal section .hogwarts.big_title > * {
    font-weight: bold;
    text-transform: none;
    text-shadow: none;
}

/* 普通标题样式 */
.reveal section .hogwarts.title {
    position: absolute;
    width: 100%;
    height: 10%;
    top: 5%;
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-end;
    text-align: left;
    text-transform: none;
    padding: 0.25rem;
}

.reveal section .hogwarts.title > * {
    text-transform: none;
    font-weight: bold;
}

/* 分割线 */
.reveal section .hogwarts.title > .hogwarts.line {
    position: inherit;
    height: 0.2rem;
    width: 100%;
    background-color: darkgrey;
}

/* 内容块布局 */
.reveal section .hogwarts.content {
    position: absolute;
    width: 100%;
    top: 15%;
    bottom: 10%;
    font-size: inherit;
    flex-flow: row;
}

/* 全是内容的时候，空间大一些 */
.reveal section .hogwarts.content.fill {
    top: 5%;
    bottom: 10%;
}

.reveal section .hogwarts.content.big {
    bottom: 10%;
}

/* 默认容器样式 */
.reveal section .hogwarts.content,
.reveal section p.hogwarts.container {
    max-width: 100%;
    max-height: 100%;
    margin: 0;

    display: flex;
    justify-content: center;
    justify-items: center;
    align-content: center;
    align-items: center;
    /* gap: 1rem; */
}

/* 主内容默认按行排版 */
.reveal section .hogwarts.content {
    flex-flow: row;
}

/* p默认按列拍板 */
.reveal section p.hogwarts.container {
    flex-flow: column;
}

/* 容器内的控件默认均分空间 */
.reveal section .hogwarts.content > *,
.reveal section .hogwarts.container > * {
    flex: 1;
    max-width: 100%;
    /* max-height: 100%; */
    margin: 2%;
}

/* 如果只有一个子控件就保持原样 */
.reveal section .hogwarts.content > *:only-child,
.reveal section .hogwarts.container > *:only-child {
    flex: none;
    max-width: 100%;
    max-height: 100%;
}

/* 容器内子容器默认最大 */
.reveal section .hogwarts.content > .hogwarts.container {
    height: 100%;
    max-width: 100%;
}

.reveal section .hogwarts.container > .hogwarts.container {
    width: 100%;
    max-height: 100%;
    /* 利用flex布局的grow机制 */
    height: 10%;
}

/* 如果只包含一个容器默认填满 */
.reveal section .hogwarts.content > .hogwarts.container:only-child,
.reveal section .hogwarts.container > .hogwarts.container:only-child {
    width: 100%;
    height: 100%;
}

/* 图片需要合理的缩放 */
.reveal section .hogwarts.container > img {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* 利用flex自动扩充 */
    height: 10%;
}

.reveal section .hogwarts.content > img {
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.reveal section .hogwarts.content > img:only-child,
.reveal section .hogwarts.container > img:only-child {
    flex: 1;
    object-fit: contain;
}

/* .reveal section .container.text > img:only-child {
  height: -webkit-fill-available;
} */

.reveal .code-wrapper code {
    /* overflow: scroll; */
    white-space: pre-wrap;
    max-height: 700px;
}

/* 容易超长的文字内容需要自适应 */
.reveal section .hogwarts.content ul:only-child,
.reveal section .hogwarts.content p:not(.container) {
    max-width: 100%;
    max-height: 100%;
    text-align: left;
}

/* 文本放大 */
.content .r-fit-text {
    font-weight: bold;
    align-self: center;
    height: auto !important;
}

/* 把stretch的图片方法 */
.content .r-stretch img {
    max-width: 100%;
    max-height: 100%;
    margin: 0 0 0 0;
}

.reveal .slides {
    text-align: left;
}

.ui.cards,
.ui.card {
    flex: 1 !important;
}

.ui.cards .card {
    flex: 1;
}

.hide,
.hidden {
    display: none !important;
}

.visible {
    display: block;
}

.h-card img {
    margin: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* 参考revealjs的标准 */
h1.hogwarts {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: none;
    text-transform: none;
}

h2.hogwarts {
    font-size: 1.75rem;
    font-weight: bold;
}

h3.hogwarts {
    font-size: 1.5rem;
    font-weight: bold;
}

h4.hogwarts {
    font-size: 1.25rem;
    font-weight: bold;
}

h5.hogwarts {
    font-size: 1rem;
    font-weight: bold;
}

.content > p:first-child,
.content > p:last-child {
    margin: 1rem 0;
}

.reveal strong {
    background-color: var(--r-main-color); /* 将背景色设为当前的文本颜色 */
    color: var(--r-background-color); /* 将文字颜色设为幻灯片背景色 */
}

/* 隐藏代码，不占空间 */
pre:has(> code.hide) {
    display: none;
}

/* pdf打印需要 */
html.print-pdf .reveal .slides section {
    top: 0px !important;
    display: flex !important;
}

.reveal .audio {
    display: none;
}

.reveal blockquote {
    font-style: unset;
}

.text-bg-primary h5,
.text-bg-success h5,
.text-bg-secondary h5,
.text-bg-danger h5,
.text-bg-warning h5,
.text-bg-info h5,
.text-bg-light h5,
.text-bg-dark h5,
.card h5 {
    color: unset;
}

.toc ul:not(:has(ul)) {
    column-count: 2;
}
