/* ========== 内嵌打包字体：Aa北岛幻境 花园假期 ========== */
@font-face {
    font-family: "Aa北岛幻境 花园假期";
    src: url("../fonts/AaBeiDaoHuanJing-HuaYuanJiaQi.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
}
body,html{
    overflow: hidden;
    font-size: 16px;
    color: white;
    height: 100%;
    width: 100%;
    font-family: "楷体", "KaiTi", "STKaiti", "华文楷体", "KaiTi_GB2312", serif;
}
/* 表单控件继承楷体字体 */
button, input, select, textarea {
    font-family: inherit;
}
body{
    overscroll-behavior: none;      /* 手机端：禁止下拉/回弹 */
    -webkit-touch-callout: none;    /* 手机端：禁止长按弹出菜单 */
}
a {
    text-decoration: none;
    color: #000;
}
ul li {
    list-style: none;
}
.fl {
    float: left;
}
.fr {
    float: right;
}
.clearFixed:after {
    content: "";
    display: block;
    clear: both;
}
#bg-wrap{
    width: 100%;
    height: 100%;
}
#wrap{
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 600px;
    background: #023b3b url("../img/ustc.png") center / cover no-repeat;
    perspective: 800px;
    touch-action: none;                       /* 手机端：禁止浏览器滚动/双击缩放手势 */
    -webkit-tap-highlight-color: transparent;
}
#box{
    /* 保持 3D 渲染上下文，否则透视与点击命中区域会与绘制脱节（Edge/Chrome 均受影响） */
    transform-style: preserve-3d;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}
#box ul{
    position: absolute;
    left: 50%;
    top: 50%;
    width: 120px;
    height: 160px;
    margin-left: -60px;
    margin-top: -80px;
    transform-style: preserve-3d;
    transform: translateZ(-2000px) rotateX(0deg) rotateY(0deg);
}
#box ul li{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,127,127,0.5);
    border: 1px solid rgba(127,255,255,0.25);
    box-shadow: 0 0 12px rgba(0,255,255,0.5);
    transition: 3s cubic-bezier(.94,.02,.49,.98);
}
#box ul li .liTitle{
    font-weight: bold;
    text-align: center;
    font-size: 22px;
    line-height: 44px;
    height: 44px;
    margin: 28px 4px 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#box ul li .liAuthor{
    text-align: center;
    font-size: 22px;
    font-family: inherit;
    margin: 6px auto 0;
    line-height: 28px;
}
#box ul li .liTime{
    text-align: center;
    font-size: 15px;
    margin: 4px auto 0;
    line-height: 22px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#tab{
    overflow: hidden;
    position: absolute;
    left: 10px;
    bottom: 20px;
    width: 280px;
}
#tab ul{
    height: inherit;
    width: inherit;
}
#tab ul li{
    float: left;
    height: 30px;
    text-align: center;
    line-height: 30px;
    border: 1px solid rgba(127,255,255,1);
    color: rgba(127,255,255,1);
    cursor: pointer;
    border-radius: 3px;
    padding: 0 5px;
    margin: 0 5px;
}
#tab ul li:hover{
    background: rgba(127,255,255,.4);
}

/* ========== 语录管理入口按钮 ========== */
#admin-btn{
    position: absolute;
    right: 10px;
    bottom: 20px;
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid rgba(127,255,255,1);
    color: rgba(127,255,255,1);
    background: rgba(0,127,127,0.35);
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    line-height: 30px;
    user-select: none;
    z-index: 100;
}
#admin-btn:hover{
    background: rgba(127,255,255,.4);
}

/* ========== 语录管理面板（管理员模块） ========== */
#admin-panel{
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.78);
    z-index: 9998;
    justify-content: center;
    align-items: center;
}
#admin-panel.active{ display: flex; }
#admin-panel .admin-shell{
    width: 760px;
    max-width: 92vw;
    max-height: 88vh;
    height: auto;
    background: rgba(2,59,59,0.92);
    border: 1px solid rgba(127,255,255,0.3);
    box-shadow: 0 0 40px rgba(0,255,255,0.3);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#admin-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0,70,70,0.9);
    border-bottom: 1px solid rgba(127,255,255,0.3);
    color: #fff;
    font-size: 20px;
}
#admin-close{
    cursor: pointer;
    font-size: 26px;
    color: rgba(127,255,255,0.8);
    line-height: 1;
}
#admin-close:hover{ color:#fff; transform: scale(1.2); }
#admin-body{
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}
.admin-desc{
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 14px;
}
.admin-row{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
#admin-upload-btn{
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid rgba(127,255,255,1);
    color: rgba(127,255,255,1);
    background: rgba(0,127,127,0.35);
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}
#admin-upload-btn:hover{ background: rgba(127,255,255,.4); }
#admin-excel-input{ display: none; }
#admin-download, #admin-reset{
    padding: 8px 16px;
    border: 1px solid rgba(127,255,255,0.8);
    color: rgba(127,255,255,1);
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}
#admin-download:hover, #admin-reset:hover{ background: rgba(127,255,255,.25); }
#admin-status{
    color: rgba(127,255,255,0.9);
    font-size: 13px;
    flex: 1;
    text-align: right;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.admin-preview-wrap{
    min-height: 260px;
    max-height: 52vh;
    overflow: auto;
    border: 1px solid rgba(127,255,255,0.25);
    border-radius: 4px;
    background: rgba(2,59,59,0.5);
}
#admin-table{
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-size: 13px;
}
#admin-table th, #admin-table td{
    border-bottom: 1px solid rgba(127,255,255,0.2);
    padding: 8px 12px;
    text-align: left;
}
#admin-table th{
    background: rgba(0,70,70,0.6);
    position: sticky;
    top: 0;
}
#admin-table td:nth-child(1){ width: 90px; }
#admin-table td:nth-child(2){ width: 70px; text-align: center; }
#admin-table tr:hover{ background: rgba(0,255,255,0.08); }

/* ========== 全屏语录层 ========== */
#quote-overlay{
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
    font-family: "Aa北岛幻境 花园假期", "楷体", "KaiTi", serif;
}
#quote-overlay.active{
    display: flex;
}
#quote-box{
    width: 86vw;
    max-width: 86vw;
    height: 72vh;
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}
#quote-elem{
    font-size: clamp(20px, 3.5vmin, 44px);
    color: rgba(127,255,255,0.75);
    letter-spacing: 4px;
    margin-bottom: 3vmin;
    flex-shrink: 0;
}
#quote-content{
    font-size: 5vmin;
    color: #fff;
    line-height: 1.7;
    text-shadow: 0 0 24px rgba(0,255,255,0.5);
    font-weight: 500;
    max-width: 100%;
}
#quote-author{
    margin-top: 4vmin;
    font-size: 3vmin;
    color: rgba(127,255,255,0.75);
    flex-shrink: 0;
    opacity: 1;
    transition: opacity 0.5s;
}
/* 逐字显示：末尾打字光标 */
#quote-content.typing::after{
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 4px;
    background: rgba(127,255,255,0.9);
    vertical-align: -0.1em;
    animation: quote-caret 0.7s steps(1) infinite;
}
@keyframes quote-caret{
    50% { opacity: 0; }
}
#quote-close{
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: rgba(127,255,255,0.6);
    cursor: pointer;
    z-index: 10000;
    transition: 0.3s;
    line-height: 1;
}
#quote-close:hover{
    color: #fff;
    transform: scale(1.2);
}
#quote-hint{
    position: fixed;
    bottom: 24px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(127,255,255,0.45);
    font-size: 3vmin;
    letter-spacing: 2px;
    z-index: 10000;
}


/* ========== 3D 场景操作工具条（旋转 / 移动 / 复位） ========== */
#view-tools{
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0,60,60,0.6);
    border: 1px solid rgba(127,255,255,0.35);
    border-radius: 22px;
    box-shadow: 0 0 18px rgba(0,255,255,0.2);
    z-index: 90;
    user-select: none;
}
#view-tools .vt-label{
    color: rgba(127,255,255,0.8);
    font-size: 13px;
}
#view-tools .vt-btn{
    border: 1px solid rgba(127,255,255,0.6);
    background: rgba(0,127,127,0.25);
    color: rgba(127,255,255,0.95);
    border-radius: 14px;
    padding: 4px 14px;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
    font-family: inherit;
}
#view-tools .vt-btn:hover{
    background: rgba(127,255,255,0.35);
}
#view-tools .vt-btn.active{
    background: rgba(0,255,255,0.55);
    color: #002b2b;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0,255,255,0.5);
}
#view-tools #vt-hint{
    color: rgba(127,255,255,0.55);
    font-size: 12px;
    font-style: normal;
    margin-left: 4px;
}

/* ========== 移动端适配（手机浏览器） ========== */
@media (max-width: 719px) {
    /* 去掉固定最小宽度，避免手机端横向溢出被裁剪 */
    #wrap{
        min-width: 0;
    }
    /* 形态切换移到顶部居中，避免与底部工具条重叠 */
    #tab{
        left: 0;
        right: 0;
        top: 8px;
        bottom: auto;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    #tab ul{
        width: auto;
        display: flex;
    }
    #tab ul li{
        float: none;
        height: 28px;
        line-height: 28px;
        font-size: 12px;
        padding: 0 10px;
        margin: 0 3px;
    }
    /* 语录管理入口移到顶部 tab 下方右侧 */
    #admin-btn{
        top: 44px;
        right: 8px;
        bottom: auto;
        font-size: 12px;
        padding: 3px 10px;
        line-height: 24px;
    }
    /* 底部工具条更紧凑，隐藏涉及 Shift/滚轮的桌面提示 */
    #view-tools{
        bottom: 14px;
        padding: 4px 10px;
        gap: 6px;
        border-radius: 18px;
    }
    #view-tools .vt-label{ font-size: 12px; }
    #view-tools .vt-btn{
        padding: 3px 10px;
        font-size: 12px;
        line-height: 1.6;
    }
    #view-tools #vt-hint{ display: none; }
    /* 语录弹层关闭按钮适配手机 */
    #quote-close{
        top: 12px;
        right: 14px;
        font-size: 28px;
    }
    /* 管理面板更紧凑 */
    #admin-header{ font-size: 16px; padding: 12px 14px; }
    #admin-body{ padding: 12px; }
    .admin-desc{ font-size: 12px; }
    #admin-upload-btn, #admin-download, #admin-reset{ font-size: 12px; padding: 6px 10px; }
    #admin-table td:nth-child(1){ width: 64px; }
}