/* style.css */
body {
    -webkit-tap-highlight-color: transparent;
}

/* 隐藏滚动条但保持滚动功能 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 20px;
}

/* 手机端触控优化 */
.touch-manipulation {
    touch-action: manipulation;
    -webkit-touch-callout: none;
}

/* 手机端适配 */
@media (max-width: 768px) {
    main {
        margin-left: 0;
        width: 100%;
    }

    /* 增大输入框间距，防止误触 */
    textarea, select, button, input {
        font-size: 16px !important; /* 防止 iOS 自动缩放 */
    }

    /* 内容区域增大内边距 */
    #rewrite-result .p-6 {
        padding: 16px;
    }

    /* 结果内容文字增大 */
    #result-content {
        font-size: 15px;
        line-height: 1.8;
    }

    #result-content p {
        margin-bottom: 14px;
    }

    /* 按钮区域增加安全区 */
    .flex-col > .btn-rewrite-wrapper {
        margin-top: 12px;
    }
}

/* 防止双击缩放 */
* {
    touch-action: manipulation;
}

/* 原文切换按钮增大高度 */
#original-content {
    max-height: 240px;
    overflow-y: auto;
}

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

/* 弹窗动画 */
.modal-enter {
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 结果区域的富文本样式 */
#result-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

#result-content p {
    margin-bottom: 12px;
    line-height: 1.8;
}

#result-content h1, #result-content h2, #result-content h3 {
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: bold;
}

#result-content blockquote {
    border-left: 3px solid #4F46E5;
    padding-left: 16px;
    margin: 12px 0;
    color: #4B5563;
    background: #F9FAFB;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}

/* 卡片悬停效果 */
.hover-card {
    transition: all 0.2s ease;
}
.hover-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
