/* 基础样式 */
@font-face {
    font-family: 'GameFont';
    src: url('front.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: transparent;
    color: #333333;
    width: 100%;
    height: 100%;
    /* 防止移动端弹性滚动导致的屏幕抽搐 */
    overscroll-behavior: none;
    /* 禁用body滚动，避免双重滚动容器冲突 */
    overflow: hidden;
}

/* 优化滚动体验，防止滚动到边缘时的卡顿 */
html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

body,
input,
textarea,
select,
button {
    font-family: 'GameFont', '微软雅黑', Arial, sans-serif;
}

/* 页面容器 */
#app {
    width: 100%;
    height: 100%;
    position: relative;
    /* 只保留#app作为唯一滚动容器 */
    overflow-y: auto;
    /* 优化滚动体验，启用硬件加速 */
    -webkit-overflow-scrolling: touch;
    /* 防止滚动到边缘时的弹性效果导致抽搐 */
    overscroll-behavior-y: none;
    /* 提升滚动性能 */
    will-change: scroll-position;
}

/* 页面样式 */
.page {
    width: 100%;
    height: auto;
    min-height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

.page.active {
    display: block;
}

/* 背景 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FFF8DC;
    z-index: 0;
    /* 优化渲染性能，避免背景图抽搐 */
    will-change: transform;
    transform: translateZ(0);
}

/* 背景图使用伪元素实现，保持背景色不透明 */
.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/wallpaper.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* 移除background-attachment: fixed，避免移动端滚动抽搐 */
    opacity: 0.5;
    /* 优化渲染性能，避免背景图抽搐 */
    will-change: transform;
    transform: translateZ(0);
}

/* 响应式背景优化 */
@media (max-width: 768px) {
    .background::before {
        opacity: 0.3;
    }
}

/* 内容容器 */
.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

/* 文字描边效果 */
.outlined-text {
    color: #333333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

.outlined-text.success {
    color: #4CAF50;
}

.outlined-text.error {
    color: #FF5252;
}

/* 主标题 */
h1.outlined-text {
    font-size: 42px;
    margin-bottom: 20px;
}

/* 装饰文字 */
.decoration {
    font-size: 24px;
    color: #FF6B6B;
    margin: 10px 0;
}

/* 圆角按钮 */
.rounded-button {
    background-color: #FFB366;
    color: #333333;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 22px;
    font-family: 'GameFont', '微软雅黑', Arial, sans-serif;
    font-weight: bold;
    cursor: pointer;
    margin: 15px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    border: 3px solid #FFFFFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rounded-button:hover {
    background-color: #FF9933;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.rounded-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rounded-button.small {
    padding: 8px 15px;
    font-size: 12px;
    margin: 5px;
}

.rounded-button.success {
    background-color: #4CAF50;
    color: #FFFFFF;
}

.rounded-button.success:hover {
    background-color: #66BB6A;
}

.rounded-button.error {
    background-color: #FF5252;
    color: #FFFFFF;
}

.rounded-button.error:hover {
    background-color: #FF3333;
}

/* 按钮组 */
.button-group {
    margin: 20px 0;
}

/* 垂直按钮组布局 */
.button-group-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.button-group-vertical .rounded-button {
    margin: 0;
    width: 200px;
    max-width: 90%;
}

/* 响应式按钮组布局 */
@media (max-width: 768px) {
    .button-group {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 20px 0;
    }
    
    .button-group .rounded-button {
        flex: 1;
        margin: 0;
        max-width: 120px;
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .button-group-vertical {
        gap: 15px;
        margin: 20px 0;
    }
    
    .button-group-vertical .rounded-button {
        width: 160px;
        padding: 12px 24px;
        font-size: 18px;
    }
}

/* 返回首页按钮 - 基础样式（统一使用绝对定位） */
.home-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    background: linear-gradient(135deg, #FFB366 0%, #FF9933 100%);
    color: white;
    border: 2px solid #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    width: auto;
    min-width: auto;
    max-width: 120px;
    white-space: nowrap;
    padding: 8px 15px;
    font-size: 12px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #FF9933 0%, #FF8500 100%);
}

/* 确保返回首页按钮在所有设备上都保持合适尺寸 */
@media (max-width: 768px) {
    .home-btn {
        min-width: auto;
        max-width: 100px;
        padding: 6px 12px;
        font-size: 11px;
        top: 15px;
        left: 15px;
        height: 36px;
    }
}

/* 底部文字 */
.bottom-text {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #DEB887;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* BGM开关按钮 */
.bgm-toggle-btn-small {
    background-color: #FFB366;
    color: #333333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #FFFFFF;
}

.bgm-toggle-btn-small:hover {
    background-color: #FF9933;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bgm-toggle-btn-small:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 鬼畜模式按钮样式 */
.ghost-mode-btn {
    background-color: #FF6B6B;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 16px;
    font-family: 'GameFont', '微软雅黑', Arial, sans-serif;
    font-weight: bold;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    text-align: center;
}

.ghost-mode-btn:hover {
    background-color: #FF5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ghost-mode-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ghost-mode-btn.active {
    background-color: #4ECDC4;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ghost-mode-btn.active:hover {
    background-color: #45B7AA;
}

/* 设置页面样式 */
.settings-container {
    background-color: #FFFFFF;
    border: 2px solid #DEB887;
    padding: 30px;
    margin: 20px auto;
    max-width: 400px;
}

.setting-item {
    margin: 20px 0;
}

.setting-item label {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.setting-item input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

/* BGM选择下拉框样式 */
.bgm-select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    background-color: #f5f5f5;
    border: 2px solid #DEB887;
    border-radius: 5px;
    color: #333;
    margin: 10px 0;
    box-sizing: border-box;
    font-family: inherit;
}

.bgm-select:focus {
    outline: none;
    border-color: #FF9933;
    box-shadow: 0 0 5px rgba(255, 153, 51, 0.5);
}

/* 管理题库页面 */
.title {
    font-size: 36px;
    text-align: center;
    margin: 0 0 30px;
    z-index: 1;
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    font-weight: 900;
}

/* 手机版标题调整，避免被按钮挡住 */
@media (max-width: 768px) {
    .title {
        margin-top: 60px;
        font-size: 28px;
        letter-spacing: 1px;
    }
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    z-index: 1;
    flex-wrap: wrap;
}

.button-row .rounded-button {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 25px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F0F0 100%);
    border: 2px solid #DEB887;
    color: #333333;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.button-row .rounded-button:hover {
    background: linear-gradient(135deg, #F0F0F0 0%, #E0E0E0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: #FFB366;
}

/* 题库列表容器 */
.bank-list-container {
    width: 90%;
    max-width: 900px;
    height: 70vh;
    overflow-y: auto;
    margin: 0 auto 50px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* 题库列表容器滚动条样式 */
.bank-list-container::-webkit-scrollbar {
    width: 8px;
}

.bank-list-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.bank-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 179, 102, 0.8);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.bank-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 153, 51, 1);
}

/* 题库列表 */
.bank-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: transparent;
}

/* 题库项 */
.bank-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 248, 220, 0.95) 100%);
    border: none;
    border-radius: 16px;
    margin: 0;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 179, 102, 0.5);
}

.bank-item:active {
    transform: translateY(0);
}

.bank-item-info {
    flex: 1;
    min-width: 0;
}

.bank-item-info h3 {
    font-size: 20px;
    font-weight: bold;
    color: #333333;
    margin: 0 0 8px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bank-item-info p {
    font-size: 14px;
    color: #666666;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bank-item-info .bank-author {
    font-size: 13px;
    color: #888888;
    font-style: italic;
}

.bank-item-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.bank-item-buttons .rounded-button {
    padding: 8px 20px;
    font-size: 14px;
    margin: 0;
    min-width: 80px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.bank-item-buttons .rounded-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 开始按钮特殊样式 */
.bank-item-buttons .rounded-button:first-child {
    background: linear-gradient(135deg, #FFB366 0%, #FF9933 100%);
    color: white;
    border-color: #FF9933;
    font-weight: bold;
}

.bank-item-buttons .rounded-button:first-child:hover {
    background: linear-gradient(135deg, #FF9933 0%, #FF8500 100%);
    border-color: #FF8500;
}

/* 通用页面内容容器 */
.page-content {
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 80px 20px 120px;
    z-index: 1;
    /* 移除overflow: auto，避免与#app的滚动冲突 */
    box-sizing: border-box;
    max-width: 100%;
}



/* 编辑页面样式 */
.form-section {
    background-color: #FFFFFF;
    border: 2px solid #DEB887;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bank-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    justify-content: center;
}

.bank-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bank-info-item input {
    width: 100%;
    padding: 12px;
    border: 2px solid #DEB887;
    border-radius: 10px;
    font-size: 16px;
    background-color: #FFF8DC;
}

.bank-info-item input:focus {
    outline: none;
    border-color: #FF9933;
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.1);
}

.question-info {
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background-color: #FFF8DC;
    border-radius: 10px;
    border: 2px solid #DEB887;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    margin-bottom: 20px;
    min-height: 400px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.edit-left, .edit-right {
    background-color: #FFFFFF;
    border: 2px solid #DEB887;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-left h3, .edit-right label {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

/* 图片上传按钮 */
.image-button {
    flex: 1;
    border: 2px dashed #DEB887;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    background-color: #FFF8DC;
    transition: all 0.3s ease;
    min-height: 250px;
    overflow: hidden;
}

.image-button:hover {
    border-color: #FF9933;
    background-color: #FFF5E0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.2);
}

.image-button span {
    font-size: 18px;
    color: #666;
    text-align: center;
    padding: 20px;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.image-button img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* 表单样式 */
.form-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.form-item:last-child {
    margin-bottom: 0;
}

.form-item input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #DEB887;
    border-radius: 10px;
    font-size: 16px;
    background-color: #FFF8DC;
    transition: all 0.3s ease;
}

.form-item input:focus {
    outline: none;
    border-color: #FF9933;
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.1);
    background-color: #FFFFFF;
}

/* 编辑按钮组 */
.edit-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background-color: #FFFFFF;
    border: 2px solid #DEB887;
    border-radius: 15px;
}

.edit-buttons .rounded-button {
    padding: 12px 25px;
    font-size: 16px;
    margin: 0;
    min-width: 120px;
}

/* 保存按钮特殊样式 */
.edit-buttons .rounded-button.success {
    min-width: 140px;
    padding: 12px 30px;
    font-size: 18px;
}

/* 游戏页面样式 */
/* 顶部信息 */
.top-info {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    display: flex;
    gap: 30px;
    font-size: 14px;
}

/* 顶部图标 */
.top-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    gap: 15px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background-color: #FFFFFF;
    border: 2px solid #333333;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background-color: #FFB366;
    transform: scale(1.1);
}

.game-container {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    display: flex;
    gap: 30px;
    z-index: 1;
    margin-bottom: 100px;
    align-items: flex-start;
}

.game-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.game-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}



.image-box {
    background-color: #F5F5DC;
    border: 3px solid #66B3FF;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 电脑版图片容器优化 */
@media (min-width: 769px) {
    .image-box {
        min-height: 550px;
    }
}

.image-box img {
    max-width: 95%;
    max-height: 280px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
}

.image-box img.loading {
    opacity: 0.5;
    position: relative;
}

.image-box img.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #FFB366;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 电脑版竖屏图片优化 */
@media (min-width: 769px) {
    .image-box img {
        max-height: 500px;
    }
    
    .image-box img.loading::after {
        width: 60px;
        height: 60px;
        border-width: 6px;
        border-top-width: 6px;
    }
}

/* 调整顶部信息在游戏左侧的样式 */
.game-left .top-info {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 15px;
    align-self: stretch;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.image-text {
    font-size: 24px;
    font-weight: bold;
    color: #333333;
    text-align: center;
}

/* 右侧答题区域 */
.game-right {
    flex: 1;
    padding: 20px;
}

.answer-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 错误答案显示区域 */
.wrong-answers {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* 单个错误答案样式 */
.wrong-answer-item {
    display: flex;
    gap: 15px;
    align-items: center;
    opacity: 0.8;
    animation: fadeIn 0.3s ease-in-out;
    /* 添加换行属性，确保错误答案字符过多时能正确换行 */
    flex-wrap: wrap;
    /* 居中对齐换行后的字符 */
    justify-content: center;
}

/* 错误答案中的单个字符样式 */
.wrong-answer-item .char-box {
    width: 60px;
    height: 60px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #333333;
    border-radius: 8px;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333333;
}

/* 匹配正确答案的字符样式 */
.wrong-answer-item .char-box.char-correct {
    background-color: #E8F5E8;
    border-color: #4CAF50;
    color: #4CAF50;
    font-weight: bold;
}



/* 淡入动画 - 完整版本（用于页面元素） */
@keyframes fadeInFull {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* 标题动画 */
.title {
    animation: fadeInFull 0.6s ease-out forwards;
}

/* 题库列表容器动画 */
.bank-list-container {
    animation: fadeInFull 0.8s ease-out forwards;
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}



.answer-inputs {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    /* 添加换行属性，确保输入框超过5个时能正确换行 */
    flex-wrap: wrap;
    /* 居中对齐换行后的输入框 */
    justify-content: center;
    /* 限制最大宽度，避免过度拉伸 */
    max-width: 100%;
}



.answer-input {
    width: 60px;
    height: 60px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #333333;
    border-radius: 8px;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #66B3FF;
    box-shadow: 0 0 0 3px rgba(102, 179, 255, 0.3);
}

.answer-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

/* 响应式调整：手机端按钮样式 */
@media (max-width: 768px) {
    .answer-buttons {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
        flex-wrap: nowrap;
        padding: 0 5px;
        width: 100%;
    }
    
    .answer-buttons .rounded-button {
        width: auto;
        min-width: auto;
        max-width: none;
        padding: 12px 20px;
        font-size: 18px;
        margin: 0;
        flex: 0;
        flex-basis: auto;
        white-space: nowrap;
        border-radius: 25px;
        min-height: auto;
        box-sizing: border-box;
    }
}

.hint-btn {
    width: 50px;
    height: 50px;
    background-color: #FFFFFF;
    border: 2px solid #333333;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hint-btn:hover {
    background-color: #FFB366;
    transform: scale(1.1);
}

#result-text {
    font-size: 18px;
    margin: 20px 0;
    min-height: 30px;
    text-align: center;
    font-weight: bold;
}

/* 分隔线 */
.divider {
    width: 90%;
    max-width: 300px;
    height: 2px;
    background-color: #333333;
    margin: 15px 0;
}

/* 统计容器 */
.stats-container {
    background-color: #FFFFFF;
    border: 2px solid #DEB887;
    padding: 20px 40px;
    margin: 20px auto;
    max-width: 400px;
}

.stats-container h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.stats-container div {
    font-size: 14px;
    margin: 8px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1.outlined-text {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .decoration {
        font-size: 20px;
    }
    
    .rounded-button {
        padding: 12px 24px;
        font-size: 18px;
        margin: 10px;
        min-width: 120px;
        min-height: 44px;
    }
    
    /* 手机端输入框样式调整 */
    .answer-inputs {
        gap: 10px;
        margin: 20px 0;
        padding: 0 10px;
    }
    
    .answer-input {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    /* 手机端错误答案样式调整 */
    .wrong-answers {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .wrong-answer-item {
        gap: 10px;
        width: 100%;
        padding: 0 10px;
    }
    
    .wrong-answer-item .char-box {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .rounded-button.small {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 80px;
        min-height: 40px;
    }
    
    .edit-container {
        flex-direction: column;
        height: auto;
        top: 200px;
        bottom: 150px;
        gap: 15px;
        width: 95%;
    }
    
    .game-container {
        flex-direction: column;
        height: auto;
        top: 100px;
        bottom: 100px;
        gap: 15px;
        width: 95%;
        align-items: center;
    }
    
    .game-left {
        align-items: center;
        justify-content: center;
    }
    
    .game-right {
        align-items: center;
        justify-content: center;
    }
    
    .edit-buttons {
        flex-wrap: wrap;
        bottom: 20px;
        justify-content: center;
        gap: 8px;
    }
    
    .edit-buttons .rounded-button {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .button-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .button-row .rounded-button {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .edit-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }
    
    .edit-info input {
        width: 90%;
        max-width: 300px;
        padding: 10px;
        font-size: 14px;
    }
    
    #question-info {
        margin-left: 0;
        margin-top: 10px;
        font-size: 16px;
    }
    
    /* 游戏页面优化 */
    .game-info {
        top: 70px;
        right: 10px;
        left: 10px;
        justify-content: space-between;
    }
    
    .game-info span {
        font-size: 14px;
    }
    
    #game-answer-input {
        width: 90%;
        max-width: 300px;
        font-size: 18px;
        padding: 12px;
        margin-bottom: 15px;
    }
    
    #game-question {
        font-size: 18px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    /* 游戏页面按钮组优化 - 手机端 */
    .game-right .button-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 10px;
    }
    
    .game-right .button-group .rounded-button {
        flex: 1;
        max-width: none;
        padding: 10px 8px;
        font-size: 14px;
        margin: 0 5px;
        min-width: auto;
    }
    
    /* 编辑页面优化 */
    .edit-left, .edit-right {
        padding: 15px;
    }
    
    .form-item input {
        padding: 12px;
        font-size: 16px;
    }
    
    .image-button span {
        font-size: 14px;
        text-align: center;
        padding: 10px;
    }
    
    /* 题库项优化 - 移动端 */
    .bank-item {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        padding: 20px;
        text-align: center;
    }

    .bank-item-info {
        text-align: center;
    }

    .bank-item-info h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .bank-item-info p {
        justify-content: center;
        font-size: 13px;
        margin-bottom: 6px;
    }

    .bank-item-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .bank-item-buttons .rounded-button {
        padding: 10px 22px;
        font-size: 14px;
        min-width: 100px;
        flex: 1;
        max-width: 160px;
    }

    /* 题库列表容器 - 移动端 */
    .bank-list-container {
        width: 95%;
        padding: 15px;
        margin-bottom: 40px;
        height: 65vh;
    }

    .bank-list {
        gap: 12px;
    }

    /* 通用页面内容容器 - 移动端优化 */
    .page-content {
        padding: 70px 15px 80px;
    }
    
    /* 统计容器优化 */
    .stats-container {
        padding: 20px;
        margin: 15px;
    }
    
    .stats-container h3 {
        font-size: 20px;
    }
    
    .stats-container div {
        font-size: 16px;
    }
    
    /* 底部文字 */
    .bottom-text {
        font-size: 12px;
        bottom: 15px;
    }
}

@media (max-width: 768px) {
    /* 编辑页面响应式调整 */
    .page-content {
        padding: 60px 15px 100px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .edit-left, .edit-right {
        padding: 15px;
    }
    
    .image-button {
        min-height: 200px;
    }
    
    .image-button span {
        font-size: 16px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .bank-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .edit-buttons {
        gap: 10px;
        padding: 15px;
    }
    
    .edit-buttons .rounded-button {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .edit-buttons .rounded-button.success {
        min-width: 120px;
        padding: 10px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    h1.outlined-text {
        font-size: 26px;
    }
    
    h3.outlined-text {
        font-size: 16px;
    }
    
    .rounded-button {
        padding: 14px 24px;
        font-size: 18px;
        margin: 12px;
        min-width: 140px;
    }
    
    .rounded-button.small {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .settings-container {
        padding: 20px;
        margin: 10px;
        width: 95%;
    }
    
    .stats-container {
        padding: 20px;
        margin: 10px;
        width: 95%;
    }
    
    .bank-list-container {
        width: 95%;
        top: 200px;
        height: 65%;
    }
    
    .manage-btn {
        top: 15px;
        right: 15px;
    }
    
    .home-btn {
        top: 15px;
        left: 15px;
    }
    
    .content {
        padding: 0 15px;
    }
    
    /* 调整输入框大小 */
    input[type="text"] {
        font-size: 16px;
        padding: 12px;
    }
    
    input[type="range"] {
        height: 6px;
    }
    
    /* 游戏图片容器 */
    #game-image-container {
        width: 100%;
        height: 300px;
    }
    
    #game-image {
        max-width: 95%;
        max-height: 95%;
    }
    
    /* 编辑图片按钮 */
    .image-button {
        height: 200px;
        min-height: 180px;
    }
    
    /* 装饰文字 */
    .decoration {
        font-size: 18px;
    }
    
    /* 结果文本 */
    #result-text {
        font-size: 16px;
        margin: 20px 0;
    }
    
    /* 分隔线 */
    .divider {
        width: 90%;
        max-width: 250px;
    }
    
    /* 编辑页面手机端优化 */
    .page-content {
        padding: 50px 10px 80px;
    }
    
    .form-section {
        padding: 12px;
    }
    
    .edit-info input {
        font-size: 16px;
        padding: 12px;
    }
    
    .question-info {
        font-size: 14px;
        padding: 8px;
    }
    
    .edit-left h3, .edit-right label {
        font-size: 14px;
    }
    
    .form-item input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .edit-buttons {
        gap: 8px;
        padding: 12px;
    }
    
    .edit-buttons .rounded-button {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .edit-buttons .rounded-button.success {
        min-width: 100px;
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 加载进度条样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 248, 220, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-container {
    text-align: center;
    width: 80%;
    max-width: 500px;
}

.loading-container h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333333;
}

.progress-bar-container {
    background-color: #FFFFFF;
    border: 2px solid #DEB887;
    border-radius: 25px;
    padding: 5px;
    margin: 0 auto 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 30px;
    background-color: #FFB366;
    border-radius: 20px;
    width: 0%;
    transition: width 0.3s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#progress-text {
    font-size: 20px;
    margin-top: 10px;
    color: #333333;
    font-weight: bold;
}

/* 响应式加载进度条 */
@media (max-width: 768px) {
    .loading-container h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .progress-bar-container {
        max-width: 300px;
    }
    
    .progress-bar {
        height: 25px;
    }
    
    #progress-text {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .loading-container h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .progress-bar-container {
        max-width: 250px;
    }
    
    .progress-bar {
        height: 20px;
    }
    
    #progress-text {
        font-size: 16px;
    }
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background-color: #FFF8DC;
    border: 3px solid #DEB887;
    border-radius: 20px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #DEB887;
    position: relative;
}

.modal-header h1 {
    margin: 0;
    font-size: 32px;
}

.close-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #333;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.modal-body {
    padding: 10px 0;
    max-height: 50vh;
    overflow-y: auto;
}

/* 针对手机端的特殊样式，确保模态框不会占满整个屏幕 */
@media (max-width: 768px) {
    .modal-content {
        max-height: 80vh;
        overflow: hidden;
    }
    
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
        /* 自定义滚动条样式 */
        scrollbar-width: thin;
        scrollbar-color: #DEB887 #FFF8DC;
    }
    
    /* 针对WebKit浏览器的滚动条样式 */
    .modal-body::-webkit-scrollbar {
        width: 6px;
    }
    
    .modal-body::-webkit-scrollbar-track {
        background: #FFF8DC;
    }
    
    .modal-body::-webkit-scrollbar-thumb {
        background-color: #DEB887;
        border-radius: 3px;
        border: 1px solid #FFF8DC;
    }
}