/* --- 重置与基础 --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
body { 
    font-family: "Microsoft YaHei", sans-serif; 
    height: 100vh; 
    overflow: hidden; 
    background: #f0f0f0; 
}

/* --- 背景图 --- */
.bg-img { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: -1; 
    opacity: 0.8; 
    object-fit: cover; 
}

/* --- 容器 --- */
.container { 
    position: relative; 
    width: 100%; 
    height: 100vh; 
}

/* --- 标题 --- */
.title-box { 
    position: fixed; 
    top: 6vh; 
    width: 100%; 
    text-align: center; 
    z-index: 100; 
}
.title-main { 
    font-size: 28px; 
    font-weight: bold; 
    color: #774f36; 
    display: block; 
    margin-bottom: 10px; 
}
.title-sub { 
    position: absolute; 
    top: 10vh; 
    
    /* 核心修改：使用 fit-content 让宽度自适应内容 */
    width: fit-content;
    max-width: calc(100% - 40px); /* 防止在小屏幕上溢出，40px是估算的左右边距 */

    left: 50%;
    transform: translateX(-50%);

    /* 关键：添加和 .input-box 一样的 padding */
    /* 如果 .input-box 有 padding，这里必须一模一样 */
    padding: 0 20px; /* 请根据 .input-box 的实际 padding 修改这里的 20px */
    box-sizing: border-box;

    text-align: left;
    
    font-size: 10px; 
    color: #666; 
    display: block; 
}

/* --- 输入框与按钮组合 --- */
/* 只修改了这里的布局方式，其他样式由内部元素各自控制 */
.input-box { 
    position: absolute; 
    top: 18vh; 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 5px; 
    /* 强制横向排列 */
    flex-direction: row; 
}

/* --- 输入框 --- */
/* 恢复为原来的样式，只增加了右侧外边距以分隔按钮 */
input { 
    width: 100%; 
    max-width: 150px; 
    height: 40px; 
    border: 2px solid #ccc; 
    border-radius: 50px; 
    padding: 0 20px; 
    font-size: 15px; 
    background: rgba(255,255,255,0.9); 
    text-align: center; 
    outline: none; 
}

/* --- 随机按钮 --- */
/* 恢复为原来的样式，只调整了宽度以适应椭圆形状 */
.random-button { 
    /* 保持原有样式不变 */
    padding: 4px 10px; 
    font-size: 7.5px; 
    font-weight: bold; 
    cursor: pointer; 
    background-color: #edc339; 
    color: white; 
    border: none; 
    border-radius: 50px; 
    box-shadow: 0 6px 0 #c07306; 
    transition: all 0.1s; 
}
.random-button:hover { 
    background-color: #edc339; 
}
.random-button:active { 
    transform: translateY(6px); 
    box-shadow: 0 0 0 #c07306; 
}

/* --- 翻看葱葱回音按钮 (保持原样) --- */
.the-button { 
    position: absolute; 
    top: 34.5vh; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 60%; 
    height: 50px; 
    background-color: #FFCC33; 
    border: 3px solid #8B4513; 
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; 
    color: #8B4513; 
    font-size: 18px; 
    font-weight: bold; 
    text-align: center; 
    line-height: 44px; 
    box-shadow: 0 4px 0 #8B4513; 
    cursor: pointer; 
    transition: all 0.1s; 
}
.the-button:active { 
    transform: translate(-50%, -50%) scale(0.95); 
    box-shadow: 0 2px 0 #8B4513; 
}

/* --- 答案框 --- */
.result-box { 
    position: absolute; 
    top: 40vh; 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    padding: 0 20px; 
}
.answer-text { 
    width: 80%; 
    min-height: 80px; 
    padding: 15px; 
    background: rgba(255,255,255,0.95); 
    border-radius: 15px; 
    font-size: 20px; 
    color: #5e5926; 
    text-align: center; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    line-height: 1.6; 
}
