@media (max-width: 768px) {
    .container {
        margin: 10px 0px;
        border-radius: 10px;
    }
    
    /* 改善手机版触摸体验 */
    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* 允许文本选择 */
    .record-content, textarea, input[type="text"] {
        -webkit-user-select: text;
        -khtml-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* 确保按钮有足够的触摸区域 */
    button, .btn, .tab-btn, .refresh-btn {
        min-width: 35px;
        touch-action: manipulation;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .content {
        padding: 20px;
    }

    .record-item {
        position: relative;
        /* 添加相对定位 */
        flex-direction: row;
        /* 改回row，使内容和操作按钮在同一行 */
    }

    .record-item.batch-mode .record-actions {
        flex-direction: row;
        margin-left: 10px;
        margin-top: 0;
        /* 移除顶部边距 */
        align-self: flex-start;
        /* 改为flex-start，使按钮与内容顶部对齐 */
        gap: 6px;
    }

    .record-actions {
        position: absolute;
        /* 使用绝对定位 */
        right: 15px;
        /* 距离右边15px */
        top: 15px;
        /* 距离顶部15px */
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .copy-btn,
    .delete-btn {
        margin: 0;
        width: 50px;
        /* 调整按钮宽度 */
        height: 50px;
        /* 调整按钮高度 */
    }

    /* 批量操作工具栏样式已移至toolbar.css，避免重复定义 */
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .input-section textarea {
        min-height: 120px;
    }

    .input-section button {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .record-actions {
        right: 10px;
        /* 在更小的屏幕上调整右边距 */
        top: 10px;
        /* 在更小的屏幕上调整顶部边距 */
    }
}