/* 自适应文本区域样式 - 确保不与现有样式冲突 */
.auto-resize-textarea {
    min-height: 100px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    resize: vertical !important;
    overflow-y: hidden !important;
    line-height: 1.5 !important;
    padding: 8px !important;
    border-radius: 4px !important;
    border: 1px solid #ccc !important;
}

/* 修复安卓上的空白问题 */
.poem-analysis {
    overflow: hidden !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
    margin-bottom: 20px !important;
}

/* 回到顶部按钮 - 确保样式生效 */
.back-to-top {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 40px !important;
    height: 40px !important;
    background-color: #4CAF50 !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    opacity: 0 !important;
    transition: opacity 0.3s !important;
    z-index: 9999 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
    /* 确保按钮可见 */
    pointer-events: auto !important;
}

/* 当按钮可见时的样式 */
.back-to-top.visible, 
.back-to-top[style*="opacity: 1"] {
    opacity: 1 !important;
    visibility: visible !important;
}

.back-to-top:hover {
    background-color: #45a049 !important; /* 与其他按钮的悬停颜色相同 */
}

/* 箭头样式 */
.back-to-top i {
    border: solid white !important;
    border-width: 0 3px 3px 0 !important;
    display: inline-block !important;
    padding: 5px !important;
    transform: rotate(-135deg) !important;
    -webkit-transform: rotate(-135deg) !important;
    margin-top: 5px !important;
}

/* 字符上下文菜单样式 */
.char-context-menu {
    position: absolute;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 8px;
    display: none;
    max-width: 200px;
    min-width: 150px;
}

.char-context-menu div {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 2px;
    font-size: 14px;
}

.char-context-menu div:hover {
    background-color: #f0f0f0;
}

/* 禁用移动设备上的长按默认行为 */
#gif-container {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* 字符样式 */
.tianying-char {
    display: inline-block;
    font-size: 80px;
    margin: 5px;
    cursor: pointer;
    touch-action: manipulation;
} 
