body, html {
    margin: 0;
    padding: 0;
    height: 100%; /* 固定为视口高度 */
    min-height: 100%; /* 防止页面高度不足 */
    overflow: hidden; /* 禁止外溢滚动条 */
    /* height: var(--available-height); */
    /* display: flex;
    flex-direction: column; */
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    /* 禁用文字选中和长按弹出菜单 */
    -webkit-user-select: none; /* Chrome / Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    user-select: none;
    -webkit-touch-callout: none; /* 禁止 iOS 长按弹出菜单 */
}

.app-container {
    width: 100%;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.load-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: #333;
    z-index: 999;
}

.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 99;
}

.main-board {
    flex: 1; /* 填满除底部以外的所有空间 */
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative; /* 子元素相对于 page-board 定位 */
}

.pie-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: #222;
    /* overflow-y: auto; */
}

/* Bottom Sheet 样式 */
/* .bottom-sheet {
    position: absolute;
    bottom: -50%;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    transition: bottom 0.3s ease;
    z-index: 10;
}
  
.bottom-sheet.active {
    bottom: 0;
} */

.hidden {
    display: none !important;
}

/* pie 内容样式 */
.pie {
    position: absolute;
    width: 100%;
    height: 100%; /* 重要：确保 .pie 有高度，以便 translateY 相对于它工作 */
    top: 0;
    left: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

/* 新元素的初始状态，屏幕外底部，不可见 */
.pie.entering {
    transform: translateY(100%);
    opacity: 0;
}

/* 新元素的最终状态，进入视图 */
.pie.enter-active {
    transform: translateY(0%);
    opacity: 1;
}

/* 旧元素离开时的状态，屏幕外顶部，不可见 */
.pie.leaving {
    transform: translateY(-100%);
    opacity: 0;
}

/* 游戏界面样式 */
.game-page {
    height: 100%;
    border: none;
}

.game-page .game-iframe {
    display: block; /* 移除默认内联元素的额外空间 */
    width: 100%; /* 确保iframe填充容器 */
    height: 100%;
    border: none;
}

.game-page .game-error {
    color: red;
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
}

/* 问题页面样式 */
.puzzle-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    background: #e6e6e6;
    font-family: sans-serif;
    transition: all 0.3s ease;
}

.puzzle-page .card {
    width: 80%;
    height: 80%;
    max-width: 250px;
    max-height: 300px;
    padding: 16px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.puzzle-page .card-title {
    width: 100%;
    font-size: 14px;
    color: #555;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.puzzle-page .card-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.puzzle-page .card-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.puzzle-page .card-main {
    width: 100%;
    height: 70%;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.puzzle-page .card-footer {
    width: 100%;
    height: 30%;
    font-size: 20px;
    color: #444;
    display: flex;
    justify-content: center;
}

.puzzle-page .card-answer {
    width: 100%;
    padding-bottom: 8px;
    display: none;
}

.puzzle-page .card-answer.visible {
    display: block;
}

.puzzle-page .card-button {
    width: 80%;
    height: 40px;
    background: #222;
    color: white;
    border: none;
    border-radius: 9999px; /* 超大数值自动变成半圆两侧 */
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease; /* 所有支持过渡的属性都启用动画 */
}

.puzzle-page .next-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 250px;
    height: 36px;
    padding: 16px;
    cursor: pointer;
    border: none;
    font-size: 14px;
    border-radius: 8px;
    color: white;
    background-color: #F95A39;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 不支持的内容页面 */
.error-page {
    height: 100%;
    margin: 0;
    padding: 24px;
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #2ecc71;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-page .note {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-image: url('./img/note_bg.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-page .note-content {
    width: 60%;
    padding: 16px;
    font-size: 1.6rem;
    line-height: 1.6;
    color: #111;
    display: flex;
    justify-content: center;
}


